AdventureWorks

Basic Index   Expanded Index

Table Name:Purchasing.VendorContact
Description:Cross-reference table mapping vendors and their employees.
Primary Keys:VendorID
ContactID
FieldTypeDefaultsNulls?Comments
VendorIDintNoneNoPrimary key.
ContactIDintNoneNoContact (Vendor employee) identification number. Foreign key to Contact.ContactID.
ContactTypeIDintNoneNoContact type such as sales manager, or sales agent.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_VendorContact_VendorID_ContactIDYesYesVendorID
ContactID
IX_VendorContact_ContactIDNoNoContactID
IX_VendorContact_ContactTypeIDNoNoContactTypeID

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_VendorContact_Contact_ContactIDContactIDPerson.Contact
FK_VendorContact_ContactType_ContactTypeIDContactTypeIDPerson.ContactType
FK_VendorContact_Vendor_VendorIDVendorIDPurchasing.Vendor

No primary keys as foreign key constraints
No triggers