Properties

Owner: Person 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 4536 
Index Size KB: 1896 
Rows: 19972 
Description: Names of each employee, customer contact, and vendor contact. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    ContactID  int          Primary key for Contact records. 
    NameStyle  NameStyle    ((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          A courtesy title. For example, Mr. or Ms. 
    FirstName  Name  100          First name of the person. 
    MiddleName  Name  100          Middle name or middle initial of the person. 
    LastName  Name  100          Last name of the person. 
    Suffix  nvarchar  10          Surname suffix. For example, Sr. or Jr. 
    EmailAddress  nvarchar  50          E-mail address for the person. 
    EmailPromotion  int    ((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.  
    Phone  Phone  50          Phone number associated with the person. 
    PasswordHash  varchar  128          Password for the e-mail account. 
    PasswordSalt  varchar  10          Random value concatenated with the password string before the password is hashed. 
    AdditionalContactInfo  xml  -1          Additional contact information about the person stored in xml format.  
    rowguid  uniqueidentifier  16    (newid())      ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 15 column(s)

Identity column

Name Seed Increment Not for replication
  ContactID   

Indexes

Index Primary Unique Description
  PK_Contact_ContactID      Primary key (clustered) constraint 
  IX_Contact_EmailAddress      Nonclustered index. 
  PXML_Contact_AddContact      Primary XML index. 
  AK_Contact_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 4 index(es)

Check Constraints

Name Expression
  CK_Contact_EmailPromotion  ([EmailPromotion]>=(0) AND [EmailPromotion]<=(2)) 
Total: 1 constraint(s)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.Individual  FK_Individual_Contact_ContactID  PK_Contact_ContactID 
  Sales.SalesOrderHeader  FK_SalesOrderHeader_Contact_ContactID  PK_Contact_ContactID 
  Sales.StoreContact  FK_StoreContact_Contact_ContactID  PK_Contact_ContactID 
  Purchasing.VendorContact  FK_VendorContact_Contact_ContactID  PK_Contact_ContactID 
  Sales.ContactCreditCard  FK_ContactCreditCard_Contact_ContactID  PK_Contact_ContactID 
  HumanResources.Employee  FK_Employee_Contact_ContactID  PK_Contact_ContactID 
Total: 6 table(s)

Objects that [Person].[Contact] depends on

Object Name Owner Object Type Dep Level
  Name  dbo  User Defined type 
  NameStyle  dbo  User Defined type 
  Phone  dbo  User Defined type 
Total: 3 object(s)

Objects that depend on [Person].[Contact]

Object Name Owner Object Type Dep Level
  vAdditionalContactInfo  Person  View 
  ContactCreditCard  Sales  Table 
  Employee  HumanResources  Table 
  Individual  Sales  Table 
  VendorContact  Purchasing  Table 
  vIndividualCustomer  Sales  View 
  vIndividualDemographics  Sales  View 
  vVendor  Purchasing  View 
  EmployeeAddress  HumanResources  Table 
  EmployeeDepartmentHistory  HumanResources  Table 
  EmployeePayHistory  HumanResources  Table 
  JobCandidate  HumanResources  Table 
  PurchaseOrderHeader  Purchasing  Table 
  SalesPerson  Sales  Table 
  uspGetEmployeeManagers  dbo  Procedure 
  uspGetManagerEmployees  dbo  Procedure 
  uspUpdateEmployeeLogin  HumanResources  Procedure 
  uspUpdateEmployeePersonalInfo  HumanResources  Procedure 
  dEmployee  HumanResources  Trigger 
  vEmployee  HumanResources  View 
  vEmployeeDepartment  HumanResources  View 
  vEmployeeDepartmentHistory  HumanResources  View 
  vJobCandidate  HumanResources  View 
  vJobCandidateEducation  HumanResources  View 
  vJobCandidateEmployment  HumanResources  View 
  vSalesPerson  Sales  View 
  PurchaseOrderDetail  Purchasing  Table 
  SalesOrderHeader  Sales  Table 
  SalesPersonQuotaHistory  Sales  Table 
  SalesTerritoryHistory  Sales  Table 
  Store  Sales  Table 
  uspUpdateEmployeeHireInfo  HumanResources  Procedure 
  uPurchaseOrderHeader  Purchasing  Trigger 
  vSalesPersonSalesByFiscalYears  Sales  View 
  SalesOrderDetail  Sales  Table 
  SalesOrderHeaderSalesReason  Sales  Table 
  StoreContact  Sales  Table 
  iPurchaseOrderDetail  Purchasing  Trigger 
  iStore  Sales  Trigger 
  iuIndividual  Sales  Trigger 
  uPurchaseOrderDetail  Purchasing  Trigger 
  uSalesOrderHeader  Sales  Trigger 
  ufnGetContactInformation  dbo  Function 
  vStoreWithDemographics  Sales  View 
  iduSalesOrderDetail  Sales  Trigger 
Total: 45 object(s)

SQL

CREATE TABLE [Contact] (
    [ContactID] [int] IDENTITY (1, 1) NOT FOR REPLICATION  NOT NULL ,
    [NameStyle] [NameStyle] NOT NULL CONSTRAINT [DF_Contact_NameStyle] DEFAULT ((0)),
    [Title] [nvarchar] (8) COLLATE Latin1_General_CS_AS NULL ,
    [FirstName] [Name] NOT NULL ,
    [MiddleName] [Name] NULL ,
    [LastName] [Name] NOT NULL ,
    [Suffix] [nvarchar] (10) COLLATE Latin1_General_CS_AS NULL ,
    [EmailAddress] [nvarchar] (50) COLLATE Latin1_General_CS_AS NULL ,
    [EmailPromotion] [int] NOT NULL CONSTRAINT [DF_Contact_EmailPromotion] DEFAULT ((0)),
    [Phone] [Phone] NULL ,
    [PasswordHash] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL ,
    [PasswordSalt] [varchar] (10) COLLATE Latin1_General_CS_AS NOT NULL ,
    [AdditionalContactInfo] [xml] NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_Contact_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Contact_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_Contact_ContactID] PRIMARY KEY  CLUSTERED
    (
        [ContactID]
    )  ON [PRIMARY] ,
    CONSTRAINT [CK_Contact_EmailPromotion] CHECK ([EmailPromotion]>=(0) AND [EmailPromotion]<=(2))
) ON [PRIMARY]
GO


See Also

List of tables