1 Person Move the mouse over tables & columns to read the comments. Fk FK_BusinessEntityAddress_Address_AddressID BusinessEntityAddress ref Address ( AddressID ) Fk FK_BusinessEntityAddress_AddressType_AddressTypeID BusinessEntityAddress ref AddressType ( AddressTypeID ) Fk FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID BusinessEntityAddress ref BusinessEntity ( BusinessEntityID ) Fk FK_BusinessEntityContact_BusinessEntity_BusinessEntityID BusinessEntityContact ref BusinessEntity ( BusinessEntityID ) Fk FK_BusinessEntityContact_ContactType_ContactTypeID BusinessEntityContact ref ContactType ( ContactTypeID ) Fk FK_BusinessEntityContact_Person_PersonID BusinessEntityContact ref Person ( PersonID -> BusinessEntityID ) Fk FK_Password_Person_BusinessEntityID Password ref Person ( BusinessEntityID ) Fk FK_EmailAddress_Person_BusinessEntityID EmailAddress ref Person ( BusinessEntityID ) Fk FK_PersonPhone_Person_BusinessEntityID PersonPhone ref Person ( BusinessEntityID ) Fk FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID PersonPhone ref PhoneNumberType ( PhoneNumberTypeID ) Fk FK_Address_StateProvince_StateProvinceID Address ref StateProvince ( StateProvinceID ) Fk FK_StateProvince_CountryRegion_CountryRegionCode StateProvince ref CountryRegion ( CountryRegionCode ) PhoneNumberTypeTable Person.PhoneNumberType Type of phone number of a person. Pk PK_PhoneNumberType_PhoneNumberTypeID ( PhoneNumberTypeID ) Clustered index created by a primary key constraint. PhoneNumberTypeIDintPhoneNumberTypeID * int Primary key for telephone number type records. Referred by PersonPhone ( PhoneNumberTypeID ) NamenameName * name Name of the telephone number type t ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d BusinessEntityAddressTable Person.BusinessEntityAddress Cross-reference table mapping customers, vendors, and employees to their addresses. Pk PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID ( BusinessEntityID, AddressID, AddressTypeID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int Primary key. Foreign key to BusinessEntity.BusinessEntityID. References BusinessEntity ( BusinessEntityID ) Pk PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID ( BusinessEntityID, AddressID, AddressTypeID ) Clustered index created by a primary key constraint.IX_BusinessEntityAddress_AddressID ( AddressID ) Nonclustered index. AddressIDintAddressID * int Primary key. Foreign key to Address.AddressID. References Address ( AddressID ) Pk PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID ( BusinessEntityID, AddressID, AddressTypeID ) Clustered index created by a primary key constraint.IX_BusinessEntityAddress_AddressTypeID ( AddressTypeID ) Nonclustered index. AddressTypeIDintAddressTypeID * int Primary key. Foreign key to AddressType.AddressTypeID. References AddressType ( AddressTypeID ) Unq AK_BusinessEntityAddress_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d BusinessEntityContactTable Person.BusinessEntityContact Cross-reference table mapping stores, vendors, and employees to people Pk PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID ( BusinessEntityID, PersonID, ContactTypeID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int Primary key. Foreign key to BusinessEntity.BusinessEntityID. References BusinessEntity ( BusinessEntityID ) Pk PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID ( BusinessEntityID, PersonID, ContactTypeID ) Clustered index created by a primary key constraint.IX_BusinessEntityContact_PersonID ( PersonID ) Nonclustered index. PersonIDintPersonID * int Primary key. Foreign key to Person.BusinessEntityID. References Person ( PersonID -> BusinessEntityID ) Pk PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID ( BusinessEntityID, PersonID, ContactTypeID ) Clustered index created by a primary key constraint.IX_BusinessEntityContact_ContactTypeID ( ContactTypeID ) Nonclustered index. ContactTypeIDintContactTypeID * int Primary key. Foreign key to ContactType.ContactTypeID. References ContactType ( ContactTypeID ) Unq AK_BusinessEntityContact_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d PersonTable Person.Person Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts. Pk PK_Person_BusinessEntityID ( BusinessEntityID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int Primary key for Person records. References BusinessEntity ( BusinessEntityID ) Referred by Employee ( BusinessEntityID ) Referred by BusinessEntityContact ( PersonID -> BusinessEntityID ) Referred by EmailAddress ( BusinessEntityID ) Referred by Password ( BusinessEntityID ) Referred by PersonPhone ( BusinessEntityID ) Referred by Customer ( PersonID -> BusinessEntityID ) Referred by PersonCreditCard ( BusinessEntityID ) PersonTypenchar(2)PersonType * nchar(2) Primary type of person: SC = Store Contact, IN = Individual (retail) customer, SP = Sales person, EM = Employee (non-sales), VC = Vendor contact, GC = General contact c NameStylenamestyleNameStyle * namestyle default 0 0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order. b Titlenvarchar(8)Title nvarchar(8) A courtesy title. For example, Mr. or Ms. t IX_Person_LastName_FirstName_MiddleName ( LastName, FirstName, MiddleName ) FirstNamenameFirstName * name First name of the person. t IX_Person_LastName_FirstName_MiddleName ( LastName, FirstName, MiddleName ) MiddleNamenameMiddleName name Middle name or middle initial of the person. t IX_Person_LastName_FirstName_MiddleName ( LastName, FirstName, MiddleName ) LastNamenameLastName * name Last name of the person. t Suffixnvarchar(10)Suffix nvarchar(10) Surname suffix. For example, Sr. or Jr. t EmailPromotionintEmailPromotion * int default 0 0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact does wish to receive e-mail promotions from AdventureWorks and selected partners. # AdditionalContactInfoxmlAdditionalContactInfo xml Additional contact information about the person stored in xml format. t DemographicsxmlDemographics xml Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis. t Unq AK_Person_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d PasswordTable Person.Password One way hashed authentication information Pk PK_Password_BusinessEntityID ( BusinessEntityID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int References Person ( BusinessEntityID ) PasswordHashvarchar(128)PasswordHash * varchar(128) Password for the e-mail account. t PasswordSaltvarchar(10)PasswordSalt * varchar(10) Random value concatenated with the password string before the password is hashed. t rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d EmailAddressTable Person.EmailAddress Where to send a person email. Pk PK_EmailAddress_BusinessEntityID_EmailAddressID ( BusinessEntityID, EmailAddressID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int Primary key. Person associated with this email address. Foreign key to Person.BusinessEntityID References Person ( BusinessEntityID ) Pk PK_EmailAddress_BusinessEntityID_EmailAddressID ( BusinessEntityID, EmailAddressID ) Clustered index created by a primary key constraint. EmailAddressIDintEmailAddressID * int Primary key. ID of this email address. # IX_EmailAddress_EmailAddress ( EmailAddress ) Nonclustered index. EmailAddressnvarchar(50)EmailAddress nvarchar(50) E-mail address for the person. t rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d PersonPhoneTable Person.PersonPhone Telephone number and type of a person. Pk PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID ( BusinessEntityID, PhoneNumber, PhoneNumberTypeID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int Business entity identification number. Foreign key to Person.BusinessEntityID. References Person ( BusinessEntityID ) Pk PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID ( BusinessEntityID, PhoneNumber, PhoneNumberTypeID ) Clustered index created by a primary key constraint.IX_PersonPhone_PhoneNumber ( PhoneNumber ) Nonclustered index. PhoneNumberphonePhoneNumber * phone Telephone number identification number. t Pk PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID ( BusinessEntityID, PhoneNumber, PhoneNumberTypeID ) Clustered index created by a primary key constraint. PhoneNumberTypeIDintPhoneNumberTypeID * int Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID. References PhoneNumberType ( PhoneNumberTypeID ) ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d AddressTypeTable Person.AddressType Types of addresses stored in the Address table. Pk PK_AddressType_AddressTypeID ( AddressTypeID ) Clustered index created by a primary key constraint. AddressTypeIDintAddressTypeID * int Primary key for AddressType records. Referred by BusinessEntityAddress ( AddressTypeID ) Unq AK_AddressType_Name ( Name ) Unique nonclustered index. NamenameName * name Address type description. For example, Billing, Home, or Shipping. t Unq AK_AddressType_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d AddressTable Person.Address Street address information for customers, employees, and vendors. Pk PK_Address_AddressID ( AddressID ) Clustered index created by a primary key constraint. AddressIDintAddressID * int Primary key for Address records. Referred by BusinessEntityAddress ( AddressID ) Referred by SalesOrderHeader ( BillToAddressID -> AddressID ) Referred by SalesOrderHeader ( ShipToAddressID -> AddressID ) Unq IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode ( AddressLine1, AddressLine2, City, StateProvinceID, PostalCode ) Nonclustered index. AddressLine1nvarchar(60)AddressLine1 * nvarchar(60) First street address line. t Unq IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode ( AddressLine1, AddressLine2, City, StateProvinceID, PostalCode ) Nonclustered index. AddressLine2nvarchar(60)AddressLine2 nvarchar(60) Second street address line. t Unq IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode ( AddressLine1, AddressLine2, City, StateProvinceID, PostalCode ) Nonclustered index. Citynvarchar(30)City * nvarchar(30) Name of the city. t Unq IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode ( AddressLine1, AddressLine2, City, StateProvinceID, PostalCode ) Nonclustered index.IX_Address_StateProvinceID ( StateProvinceID ) Nonclustered index. StateProvinceIDintStateProvinceID * int Unique identification number for the state or province. Foreign key to StateProvince table. References StateProvince ( StateProvinceID ) Unq IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode ( AddressLine1, AddressLine2, City, StateProvinceID, PostalCode ) Nonclustered index. PostalCodenvarchar(15)PostalCode * nvarchar(15) Postal code for the street address. t SpatialLocationgeographySpatialLocation geography Latitude and longitude of this address. ~ Unq AK_Address_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d StateProvinceTable Person.StateProvince State and province lookup table. Pk PK_StateProvince_StateProvinceID ( StateProvinceID ) Clustered index created by a primary key constraint. StateProvinceIDintStateProvinceID * int Primary key for StateProvince records. Referred by Address ( StateProvinceID ) Referred by SalesTaxRate ( StateProvinceID ) Unq AK_StateProvince_StateProvinceCode_CountryRegionCode ( StateProvinceCode, CountryRegionCode ) Unique nonclustered index. StateProvinceCodenchar(3)StateProvinceCode * nchar(3) ISO standard state or province code. c Unq AK_StateProvince_StateProvinceCode_CountryRegionCode ( StateProvinceCode, CountryRegionCode ) Unique nonclustered index. CountryRegionCodenvarchar(3)CountryRegionCode * nvarchar(3) ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. References CountryRegion ( CountryRegionCode ) IsOnlyStateProvinceFlagflagIsOnlyStateProvinceFlag * flag default 1 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. b Unq AK_StateProvince_Name ( Name ) Unique nonclustered index. NamenameName * name State or province description. t TerritoryIDintTerritoryID * int ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. References SalesTerritory ( TerritoryID ) Unq AK_StateProvince_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d CountryRegionTable Person.CountryRegion Lookup table containing the ISO standard codes for countries and regions. Pk PK_CountryRegion_CountryRegionCode ( CountryRegionCode ) Clustered index created by a primary key constraint. CountryRegionCodenvarchar(3)CountryRegionCode * nvarchar(3) ISO standard code for countries and regions. Referred by StateProvince ( CountryRegionCode ) Referred by CountryRegionCurrency ( CountryRegionCode ) Referred by SalesTerritory ( CountryRegionCode ) Unq AK_CountryRegion_Name ( Name ) Unique nonclustered index. NamenameName * name Country or region name. t ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d BusinessEntityTable Person.BusinessEntity Source of the ID that connects vendors, customers, and employees with address and contact information. Pk PK_BusinessEntity_BusinessEntityID ( BusinessEntityID ) Clustered index created by a primary key constraint. BusinessEntityIDintBusinessEntityID * int Primary key for all customers, vendors, and employees. Referred by BusinessEntityAddress ( BusinessEntityID ) Referred by BusinessEntityContact ( BusinessEntityID ) Referred by Person ( BusinessEntityID ) Referred by Vendor ( BusinessEntityID ) Referred by Store ( BusinessEntityID ) Unq AK_BusinessEntity_rowguid ( rowguid ) Unique nonclustered index. Used to support replication samples. rowguiduniqueidentifierrowguid * uniqueidentifier default newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. c ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d ContactTypeTable Person.ContactType Lookup table containing the types of business entity contacts. Pk PK_ContactType_ContactTypeID ( ContactTypeID ) Clustered index created by a primary key constraint. ContactTypeIDintContactTypeID * int Primary key for ContactType records. Referred by BusinessEntityContact ( ContactTypeID ) Unq AK_ContactType_Name ( Name ) Unique nonclustered index. NamenameName * name Contact type description. t ModifiedDatedatetimeModifiedDate * datetime default getdate() Date and time the record was last updated. d


Table Address

Street address information for customers, employees, and vendors.

IndexesField NameData TypeDescription
* AddressID int AUTOINCREMENT Primary key for Address records.
* AddressLine1 nvarchar( 60 ) First street address line.
AddressLine2 nvarchar( 60 ) Second street address line.
* City nvarchar( 30 ) Name of the city.
* StateProvinceID int Unique identification number for the state or province. Foreign key to StateProvince table.
* PostalCode nvarchar( 15 ) Postal code for the street address.
  SpatialLocation geography Latitude and longitude of this address.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_Address_AddressID ON AddressID Clustered index created by a primary key constraint.
AK_Address_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode ON AddressLine1, AddressLine2, City, StateProvinceID, PostalCode Nonclustered index.
IX_Address_StateProvinceID ON StateProvinceID Nonclustered index.
Foreign Keys
FK_Address_StateProvince_StateProvinceID ( StateProvinceID ) ref StateProvince (StateProvinceID) Foreign key constraint referencing StateProvince.StateProvinceID.


Table AddressType

Types of addresses stored in the Address table.

IndexesField NameData TypeDescription
* AddressTypeID int AUTOINCREMENT Primary key for AddressType records.
* Name name Address type description. For example, Billing, Home, or Shipping.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_AddressType_AddressTypeID ON AddressTypeID Clustered index created by a primary key constraint.
AK_AddressType_Name ON Name Unique nonclustered index.
AK_AddressType_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.


Table BusinessEntity

Source of the ID that connects vendors, customers, and employees with address and contact information.

IndexesField NameData TypeDescription
* BusinessEntityID int AUTOINCREMENT Primary key for all customers, vendors, and employees.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_BusinessEntity_BusinessEntityID ON BusinessEntityID Clustered index created by a primary key constraint.
AK_BusinessEntity_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.


Table BusinessEntityAddress

Cross-reference table mapping customers, vendors, and employees to their addresses.

IndexesField NameData TypeDescription
* BusinessEntityID int Primary key. Foreign key to BusinessEntity.BusinessEntityID.
* AddressID int Primary key. Foreign key to Address.AddressID.
* AddressTypeID int Primary key. Foreign key to AddressType.AddressTypeID.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID ON BusinessEntityID, AddressID, AddressTypeID Clustered index created by a primary key constraint.
AK_BusinessEntityAddress_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.
IX_BusinessEntityAddress_AddressID ON AddressID Nonclustered index.
IX_BusinessEntityAddress_AddressTypeID ON AddressTypeID Nonclustered index.
Foreign Keys
FK_BusinessEntityAddress_Address_AddressID ( AddressID ) ref Address (AddressID) Foreign key constraint referencing Address.AddressID.
FK_BusinessEntityAddress_AddressType_AddressTypeID ( AddressTypeID ) ref AddressType (AddressTypeID) Foreign key constraint referencing AddressType.AddressTypeID.
FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID ( BusinessEntityID ) ref BusinessEntity (BusinessEntityID) Foreign key constraint referencing BusinessEntity.BusinessEntityID.


Table BusinessEntityContact

Cross-reference table mapping stores, vendors, and employees to people

IndexesField NameData TypeDescription
* BusinessEntityID int Primary key. Foreign key to BusinessEntity.BusinessEntityID.
* PersonID int Primary key. Foreign key to Person.BusinessEntityID.
* ContactTypeID int Primary key. Foreign key to ContactType.ContactTypeID.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID ON BusinessEntityID, PersonID, ContactTypeID Clustered index created by a primary key constraint.
AK_BusinessEntityContact_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.
IX_BusinessEntityContact_ContactTypeID ON ContactTypeID Nonclustered index.
IX_BusinessEntityContact_PersonID ON PersonID Nonclustered index.
Foreign Keys
FK_BusinessEntityContact_BusinessEntity_BusinessEntityID ( BusinessEntityID ) ref BusinessEntity (BusinessEntityID) Foreign key constraint referencing BusinessEntity.BusinessEntityID.
FK_BusinessEntityContact_ContactType_ContactTypeID ( ContactTypeID ) ref ContactType (ContactTypeID) Foreign key constraint referencing ContactType.ContactTypeID.
FK_BusinessEntityContact_Person_PersonID ( PersonID ) ref Person (BusinessEntityID) Foreign key constraint referencing Person.BusinessEntityID.


Table ContactType

Lookup table containing the types of business entity contacts.

IndexesField NameData TypeDescription
* ContactTypeID int AUTOINCREMENT Primary key for ContactType records.
* Name name Contact type description.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_ContactType_ContactTypeID ON ContactTypeID Clustered index created by a primary key constraint.
AK_ContactType_Name ON Name Unique nonclustered index.


Table CountryRegion

Lookup table containing the ISO standard codes for countries and regions.

IndexesField NameData TypeDescription
* CountryRegionCode nvarchar( 3 ) ISO standard code for countries and regions.
* Name name Country or region name.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_CountryRegion_CountryRegionCode ON CountryRegionCode Clustered index created by a primary key constraint.
AK_CountryRegion_Name ON Name Unique nonclustered index.


Table EmailAddress

Where to send a person email.

IndexesField NameData TypeDescription
* BusinessEntityID int Primary key. Person associated with this email address. Foreign key to Person.BusinessEntityID
* EmailAddressID int AUTOINCREMENT Primary key. ID of this email address.
EmailAddress nvarchar( 50 ) E-mail address for the person.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_EmailAddress_BusinessEntityID_EmailAddressID ON BusinessEntityID, EmailAddressID Clustered index created by a primary key constraint.
IX_EmailAddress_EmailAddress ON EmailAddress Nonclustered index.
Foreign Keys
FK_EmailAddress_Person_BusinessEntityID ( BusinessEntityID ) ref Person (BusinessEntityID) Foreign key constraint referencing Person.BusinessEntityID.


Table Password

One way hashed authentication information

IndexesField NameData TypeDescription
* BusinessEntityID int
* PasswordHash varchar( 128 ) Password for the e-mail account.
* PasswordSalt varchar( 10 ) Random value concatenated with the password string before the password is hashed.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_Password_BusinessEntityID ON BusinessEntityID Clustered index created by a primary key constraint.
Foreign Keys
FK_Password_Person_BusinessEntityID ( BusinessEntityID ) ref Person (BusinessEntityID) Foreign key constraint referencing Person.BusinessEntityID.


Table Person

Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.

IndexesField NameData TypeDescription
* BusinessEntityID int Primary key for Person records.
* PersonType nchar( 2 ) Primary type of person: SC = Store Contact, IN = Individual (retail) customer, SP = Sales person, EM = Employee (non-sales), VC = Vendor contact, GC = General contact
* NameStyle namestyle DEFAULT 0 0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order.
  Title nvarchar( 8 ) A courtesy title. For example, Mr. or Ms.
* FirstName name First name of the person.
MiddleName name Middle name or middle initial of the person.
* LastName name Last name of the person.
  Suffix nvarchar( 10 ) Surname suffix. For example, Sr. or Jr.
* EmailPromotion int DEFAULT 0 0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact does wish to receive e-mail promotions from AdventureWorks and selected partners.
  AdditionalContactInfo xml Additional contact information about the person stored in xml format.
  Demographics xml Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_Person_BusinessEntityID ON BusinessEntityID Clustered index created by a primary key constraint.
AK_Person_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.
IX_Person_LastName_FirstName_MiddleName ON LastName, FirstName, MiddleName
Foreign Keys
FK_Person_BusinessEntity_BusinessEntityID ( BusinessEntityID ) ref BusinessEntity (BusinessEntityID) Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Constraints
  CK_Person_PersonType [PersonType] IS NULL OR (upper([PersonType])='GC' OR upper([PersonType])='SP' OR upper([PersonType])='EM' OR upper([PersonType])='IN' OR upper([PersonType])='VC' OR upper([PersonType])='SC')
  CK_Person_EmailPromotion [EmailPromotion]>=(0) AND [EmailPromotion]<=(2)
Triggers
  iuPerson


Table PersonPhone

Telephone number and type of a person.

IndexesField NameData TypeDescription
* BusinessEntityID int Business entity identification number. Foreign key to Person.BusinessEntityID.
* PhoneNumber phone Telephone number identification number.
* PhoneNumberTypeID int Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID ON BusinessEntityID, PhoneNumber, PhoneNumberTypeID Clustered index created by a primary key constraint.
IX_PersonPhone_PhoneNumber ON PhoneNumber Nonclustered index.
Foreign Keys
FK_PersonPhone_Person_BusinessEntityID ( BusinessEntityID ) ref Person (BusinessEntityID) Foreign key constraint referencing Person.BusinessEntityID.
FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID ( PhoneNumberTypeID ) ref PhoneNumberType (PhoneNumberTypeID) Foreign key constraint referencing PhoneNumberType.PhoneNumberTypeID.


Table PhoneNumberType

Type of phone number of a person.

IndexesField NameData TypeDescription
* PhoneNumberTypeID int AUTOINCREMENT Primary key for telephone number type records.
* Name name Name of the telephone number type
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_PhoneNumberType_PhoneNumberTypeID ON PhoneNumberTypeID Clustered index created by a primary key constraint.


Table StateProvince

State and province lookup table.

IndexesField NameData TypeDescription
* StateProvinceID int AUTOINCREMENT Primary key for StateProvince records.
* StateProvinceCode nchar( 3 ) ISO standard state or province code.
* CountryRegionCode nvarchar( 3 ) ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
* IsOnlyStateProvinceFlag flag DEFAULT 1 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
* Name name State or province description.
* TerritoryID int ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.
* rowguid uniqueidentifier DEFAULT newid() ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
* ModifiedDate datetime DEFAULT getdate() Date and time the record was last updated.
Indexes
PK_StateProvince_StateProvinceID ON StateProvinceID Clustered index created by a primary key constraint.
AK_StateProvince_Name ON Name Unique nonclustered index.
AK_StateProvince_rowguid ON rowguid Unique nonclustered index. Used to support replication samples.
AK_StateProvince_StateProvinceCode_CountryRegionCode ON StateProvinceCode, CountryRegionCode Unique nonclustered index.
Foreign Keys
FK_StateProvince_CountryRegion_CountryRegionCode ( CountryRegionCode ) ref CountryRegion (CountryRegionCode) Foreign key constraint referencing CountryRegion.CountryRegionCode.
FK_StateProvince_SalesTerritory_TerritoryID ( TerritoryID ) ref SalesTerritory (TerritoryID) Foreign key constraint referencing SalesTerritory.TerritoryID.

Powered by DbSchema