Tables SQL 2005 Adventure Works OLTP

Sales.StoreContact

Object type: Table

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
ContactID 
Clustered 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
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.