AdventureWorks

Basic Index   Expanded Index

Table Name:Person.Address
Description:Street address information for customers, employees, and vendors.
Primary Keys:AddressID
FieldTypeDefaultsNulls?Comments
AddressIDint - IdentityNoneNoPrimary key for Address records.
AddressLine1nvarchar (60)NoneNoFirst street address line.
AddressLine2nvarchar (60)NoneYesSecond street address line.
Citynvarchar (30)NoneNoName of the city.
StateProvinceIDintNoneNoUnique identification number for the state or province. Foreign key to StateProvince table.
PostalCodenvarchar (15)NoneNoPostal code for the street address.
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_Address_AddressIDYesYesAddressID
AK_Address_rowguidNoYesrowguid
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCodeNoYesAddressLine1
AddressLine2
City
StateProvinceID
PostalCode
IX_Address_StateProvinceIDNoNoStateProvinceID

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_Address_StateProvince_StateProvinceIDStateProvinceIDPerson.StateProvince

Primary Key as Foreign Key ConstraintAffected TableAffected Field
FK_CustomerAddress_Address_AddressIDSales.CustomerAddressAddressID
FK_EmployeeAddress_Address_AddressIDHumanResources.EmployeeAddressAddressID
FK_SalesOrderHeader_Address_BillToAddressIDSales.SalesOrderHeaderBillToAddressID
FK_SalesOrderHeader_Address_ShipToAddressIDSales.SalesOrderHeaderShipToAddressID
FK_VendorAddress_Address_AddressIDPurchasing.VendorAddressAddressID

No triggers