Tables | SQL 2005 Adventure Works OLTP |
Cross-reference table mapping stores and their employees.
Columns
Name Data type Nullable Description CustomerID int No Store identification number. Foreign key to Customer.CustomerID. ContactID int No Contact (store employee) identification number. Foreign key to Contact.ContactID. ContactTypeID int No Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID. 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_StoreContact_rowguid DEFAULT rowguid Value: NEWID()
Default constraint value of NEWID()DF_StoreContact_ModifiedDate DEFAULT ModifiedDate Value: GETDATE()
Default constraint value of GETDATE()PK_StoreContact_CustomerID_ContactID PRIMARY KEY CustomerID
ContactIDClustered index created by a primary key constraint. FK_StoreContact_Contact_ContactID FOREIGN KEY ContactID Reference table: Person.Contact
Foreign key constraint referencing Contact.ContactID.FK_StoreContact_ContactType_ContactTypeID FOREIGN KEY ContactTypeID Reference table: Person.ContactType
Foreign key constraint referencing ContactType.ContactTypeID.FK_StoreContact_Store_CustomerID FOREIGN KEY CustomerID Reference table: Sales.Store
Foreign key constraint referencing Store.CustomerID.
Indices
Name Description AK_StoreContact_rowguid Unique nonclustered index.Used to support replication samples. IX_StoreContact_ContactID Nonclustered index. IX_StoreContact_ContactTypeID Nonclustered index.
Triggers
Name Description Sales.uStoreContact AFTER UPDATE trigger setting the ModifiedDate column in the StoreContact table to the current date.
Accessed by
Name Description dbo.ufnGetContactInformation Table value function returning the first name, last name, job title and contact type for a given contact. Sales.vStoreWithDemographics Stores (names and addresses) that sell Adventure Works Cycles products to consumers.
Modified by
Name Description Sales.uStoreContact AFTER UPDATE trigger setting the ModifiedDate column in the StoreContact table to the current date.
Applies to
Tables | User