Tables | SQL 2005 Adventure Works OLTP |
Customers (resellers) of Adventure Works products.
Columns
Name Data type Nullable Description CustomerID int No Primary key. Foreign key to Customer.CustomerID. Name Name No Name of the store. SalesPersonID int Yes ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID. Demographics XML(Sales.StoreSurveySchemaCollection) Yes Demographic informationg about the store such as the number of employees, annual sales and store type. rowguid uniqueidentifier No Default value: NEWID()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDate datetime No Default value: GETDATE()
Date and time the record was last updated.
Constraints
Name Type Columns Description DF_Store_rowguid DEFAULT rowguid Value: NEWID()
Default constraint value of NEWID()DF_Store_ModifiedDate DEFAULT ModifiedDate Value: GETDATE()
Default constraint value of GETDATE()PK_Store_CustomerID PRIMARY KEY CustomerID Clustered index created by a primary key constraint. FK_Store_Customer_CustomerID FOREIGN KEY CustomerID Reference table: Sales.Customer
Foreign key constraint referencing Customer.CustomerID.FK_Store_SalesPerson_SalesPersonID FOREIGN KEY SalesPersonID Reference table: Sales.SalesPerson
Foreign key constraint referencing SalesPerson.SalesPersonID
Indices
Name Description AK_Store_rowguid Unique nonclustered index.Used to support replication samples. IX_Store_SalesPersonID Nonclustered index. PXML_Store_Demographics Primary XML index.
Triggers
Name Description Sales.iStore AFTER INSERT trigger inserting Store only if the Customer does not exist in the Individual table. Sales.uStore AFTER UPDATE trigger setting the ModifiedDate column in the Store table to the current date.
Linked tables
Name Description Sales.StoreContact Cross-reference table mapping stores and their employees.
Accessed by
Name Description Product Line Sales Adventure Works top five sales people and stores. This report illustrates a dataset with queries containing the TOP clause. It also illustrates the use of tables, charts, parameters, calculated fields, and drillthrough links. Sales Order Detail Detail of an individual Adventure Works order. This report can be accessed as a drillthrough report from the Employee Sales Summary and Territory Sales drilldown report. This report illustrates the use of lists, tables, parameters, and expressions. Sales.iuIndividual AFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the ModifiedDate column in the Individual table to the current date. Sales.vStoreWithDemographics Stores (names and addresses) that sell Adventure Works Cycles products to consumers.
Modified by
Name Description Sales.uStore AFTER UPDATE trigger setting the ModifiedDate column in the Store table to the current date.
Applies to
Tables | User