AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.StoreContact
Description:Cross-reference table mapping stores and their employees.
Primary Keys:CustomerID
ContactID
FieldTypeDefaultsNulls?Comments
CustomerIDintNoneNoStore identification number. Foreign key to Customer.CustomerID.
ContactIDintNoneNoContact (store employee) identification number. Foreign key to Contact.ContactID.
ContactTypeIDintNoneNoContact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID.
rowguiduniqueidentifier(newid())NoROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_StoreContact_CustomerID_ContactIDYesYesCustomerID
ContactID
AK_StoreContact_rowguidNoYesrowguid
IX_StoreContact_ContactIDNoNoContactID
IX_StoreContact_ContactTypeIDNoNoContactTypeID

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_StoreContact_Contact_ContactIDContactIDPerson.Contact
FK_StoreContact_ContactType_ContactTypeIDContactTypeIDPerson.ContactType
FK_StoreContact_Store_CustomerIDCustomerIDSales.Store

No primary keys as foreign key constraints
No triggers