AdventureWorks

Basic Index   Expanded Index

Table Name:HumanResources.EmployeeAddress
Description:Cross-reference table mapping employees to their address(es).
Primary Keys:EmployeeID
AddressID
FieldTypeDefaultsNulls?Comments
EmployeeIDintNoneNoPrimary key. Foreign key to Employee.EmployeeID.
AddressIDintNoneNoPrimary key. Foreign key to Address.AddressID.
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_EmployeeAddress_EmployeeID_AddressIDYesYesEmployeeID
AddressID
AK_EmployeeAddress_rowguidNoYesrowguid

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_EmployeeAddress_Address_AddressIDAddressIDPerson.Address
FK_EmployeeAddress_Employee_EmployeeIDEmployeeIDHumanResources.Employee

No primary keys as foreign key constraints
No triggers