Tables | SQL 2005 Adventure Works OLTP |
Names of each employee, customer contact, and vendor contact.
Columns
Name Data type Nullable Description ContactID int No Column has identity seed value of 1 with a step value of 1.
Primary key for Contact records.NameStyle NameStyle No Default value: 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) Yes A courtesy title. For example, Mr. or Ms. FirstName Name No First name of the person. MiddleName Name Yes Middle name or middle initial of the person. LastName Name No Last name of the person. Suffix nvarchar(10) Yes Surname suffix. For example, Sr. or Jr. EmailAddress nvarchar(50) Yes E-mail address for the person. EmailPromotion int No Default value: 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 Yes Phone number associated with the person. PasswordHash varchar(40) No Password for the e-mail account. PasswordSalt varchar(10) No Random value concatenated with the password string before the password is hashed. AdditionalContactInfo XML(Person.AdditionalContactInfoSchemaCollection) Yes Additional contact information about the person stored in xml format. rowguid uniqueidentifier No Default value: NEWID()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDate datetime No Default value: GETDATE()
Date and time the record was last updated.
Constraints
Name Type Columns Description DF_Contact_NameStyle DEFAULT NameStyle Value: 0
Default constraint value of 0DF_Contact_EmailPromotion DEFAULT EmailPromotion Value: 0
Default constraint value of 0DF_Contact_rowguid DEFAULT rowguid Value: NEWID()
Default constraint value of NEWID()DF_Contact_ModifiedDate DEFAULT ModifiedDate Value: GETDATE()
Default constraint value of GETDATE()CK_Contact_EmailPromotion CHECK N/A Value: ([EmailPromotion] BETWEEN 0 AND 2)
Check constraint [EmailPromotion]>=(0) AND [EmailPromotion]<=(2)PK_Contact_ContactID PRIMARY KEY ContactID Clustered index created by a primary key constraint.
Indices
Name Description AK_Contact_rowguid Unique nonclustered index. Used to support replication samples. IX_Contact_EmailAddress Nonclustered index. PXML_Contact_AddContact Primary XML index.
Triggers
Name Description Person.uContact AFTER UPDATE trigger setting the ModifiedDate column in the Contact table to the current date.
Linked tables
Name Description HumanResources.Employee Employee information such as salary, department, and title. Purchasing.VendorContact Cross-reference table mapping vendors and their employees. Sales.ContactCreditCard Cross-reference table mapping customers in the Contact table to their credit card information in the CreditCard table. Sales.Individual Demographic data about customers that purchase Adventure Works products online. Sales.SalesOrderHeader General sales order information. Sales.StoreContact Cross-reference table mapping stores and their employees.
Accessed by
Name Description dbo.ufnGetContactInformation Table value function returning the first name, last name, job title and contact type for a given contact. dbo.uspGetEmployeeManagers Stored procedure using a recursive query to return the direct and indirect managers of the specified employee. dbo.uspGetManagerEmployees Stored procedure using a recursive query to return the direct and indirect employees of the specified manager. Employee Sales Summary Adventure Works sales for an individual employee. This report includes Sales Comparison and Current Month Sales Comparison charts in addition to a Current Month Order Summary table with drillthrough to individual orders. This report illustrates the use of multiple datasets, charts, tables, drillthrough, and dynamic parameters. HumanResources.vEmployee Employee names and addresses. HumanResources.vEmployeeDepartment Returns employee name, title, and current department. HumanResources.vEmployeeDepartmentHistory Returns employee name and current and previous departments. Person.vAdditionalContactInfo Displays the contact name and content from each element in the xml column AdditionalContactInfo for that person. Product Line Sales Adventure Works top five sales people and stores. This report illustrates a dataset with queries containing the TOP clause. It also illustrates the use of tables, charts, parameters, calculated fields, and drillthrough links. Purchasing.vVendor Vendor (company) names and addresses and the names of vendor employees to contact. Sales Order Detail Detail of an individual Adventure Works order. This report can be accessed as a drillthrough report from the Employee Sales Summary and Territory Sales drilldown report. This report illustrates the use of lists, tables, parameters, and expressions. Sales.vIndividual Individual customers (names and addresses) that purchase Adventure Works Cycles products online. Sales.vSalesPerson Sales representiatives (names and addresses) and their sales-related information. Sales.vSalesPersonSalesByFiscalYears Uses PIVOT to return aggregated sales information for each sales representative. Sales.vStoreWithDemographics Stores (names and addresses) that sell Adventure Works Cycles products to consumers. Territory Sales Drilldown Adventure Works sales by territory. This report drills down through salesperson and order number with drillthrough to individual orders. This report illustrates the use of a table data region that provides drilldown from summary data into detail data by showing and hiding rows. This report also illustrates the use of drillthrough links and conditional formatting.
Modified by
Name Description Person.uContact AFTER UPDATE trigger setting the ModifiedDate column in the Contact table to the current date.
Applies to
Tables | User