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. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
ContactID | int | 4 | Primary key for Contact records. | ||||||
NameStyle | NameStyle | 1 | ((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 | 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 | 4 | ((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 | 8 | (getdate()) | Date and time the record was last updated. |
Name | Seed | Increment | Not for replication | |
ContactID | 1 | 1 |
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. |
Name | Expression | |
CK_Contact_EmailPromotion | ([EmailPromotion]>=(0) AND [EmailPromotion]<=(2)) |
Objects that [Person].[Contact] depends on
Object Name | Owner | Object Type | Dep Level | |
Name | dbo | User Defined type | 1 | |
NameStyle | dbo | User Defined type | 1 | |
Phone | dbo | User Defined type | 1 |
Objects that depend on [Person].[Contact]
Object Name | Owner | Object Type | Dep Level | |
vAdditionalContactInfo | Person | View | 1 | |
ContactCreditCard | Sales | Table | 1 | |
Employee | HumanResources | Table | 1 | |
Individual | Sales | Table | 1 | |
VendorContact | Purchasing | Table | 1 | |
vIndividualCustomer | Sales | View | 2 | |
vIndividualDemographics | Sales | View | 2 | |
vVendor | Purchasing | View | 2 | |
EmployeeAddress | HumanResources | Table | 2 | |
EmployeeDepartmentHistory | HumanResources | Table | 2 | |
EmployeePayHistory | HumanResources | Table | 2 | |
JobCandidate | HumanResources | Table | 2 | |
PurchaseOrderHeader | Purchasing | Table | 2 | |
SalesPerson | Sales | Table | 2 | |
uspGetEmployeeManagers | dbo | Procedure | 2 | |
uspGetManagerEmployees | dbo | Procedure | 2 | |
uspUpdateEmployeeLogin | HumanResources | Procedure | 2 | |
uspUpdateEmployeePersonalInfo | HumanResources | Procedure | 2 | |
dEmployee | HumanResources | Trigger | 2 | |
vEmployee | HumanResources | View | 3 | |
vEmployeeDepartment | HumanResources | View | 3 | |
vEmployeeDepartmentHistory | HumanResources | View | 3 | |
vJobCandidate | HumanResources | View | 3 | |
vJobCandidateEducation | HumanResources | View | 3 | |
vJobCandidateEmployment | HumanResources | View | 3 | |
vSalesPerson | Sales | View | 3 | |
PurchaseOrderDetail | Purchasing | Table | 3 | |
SalesOrderHeader | Sales | Table | 3 | |
SalesPersonQuotaHistory | Sales | Table | 3 | |
SalesTerritoryHistory | Sales | Table | 3 | |
Store | Sales | Table | 3 | |
uspUpdateEmployeeHireInfo | HumanResources | Procedure | 3 | |
uPurchaseOrderHeader | Purchasing | Trigger | 3 | |
vSalesPersonSalesByFiscalYears | Sales | View | 4 | |
SalesOrderDetail | Sales | Table | 4 | |
SalesOrderHeaderSalesReason | Sales | Table | 4 | |
StoreContact | Sales | Table | 4 | |
iPurchaseOrderDetail | Purchasing | Trigger | 4 | |
iStore | Sales | Trigger | 4 | |
iuIndividual | Sales | Trigger | 4 | |
uPurchaseOrderDetail | Purchasing | Trigger | 4 | |
uSalesOrderHeader | Sales | Trigger | 4 | |
ufnGetContactInformation | dbo | Function | 5 | |
vStoreWithDemographics | Sales | View | 5 | |
iduSalesOrderDetail | Sales | Trigger | 5 |
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