AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.CustomerAddress
Description:Cross-reference table mapping customers to their address(es).
Primary Keys:CustomerID
AddressID
FieldTypeDefaultsNulls?Comments
CustomerIDintNoneNoPrimary key. Foreign key to Customer.CustomerID.
AddressIDintNoneNoPrimary key. Foreign key to Address.AddressID.
AddressTypeIDintNoneNoAddress type. Foreign key to AddressType.AddressTypeID.
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_CustomerAddress_CustomerID_AddressIDYesYesCustomerID
AddressID
AK_CustomerAddress_rowguidNoYesrowguid

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_CustomerAddress_Address_AddressIDAddressIDPerson.Address
FK_CustomerAddress_AddressType_AddressTypeIDAddressTypeIDPerson.AddressType
FK_CustomerAddress_Customer_CustomerIDCustomerIDSales.Customer

No primary keys as foreign key constraints
No triggers