Tables SQL 2005 Adventure Works OLTP

Sales.Individual

Object type: Table

Demographic data about customers that purchase Adventure Works products online.

Columns 

Name  Data type  Nullable  Description 
CustomerID  int  No Unique customer identification number. Foreign key to Customer.CustomerID. 
ContactID  int  No Identifies the customer in the Contact table. Foreign key to Contact.ContactID. 
Demographics  XML(Sales.IndividualSurveySchemaCollection)  Yes Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_Individual_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
PK_Individual_CustomerID  PRIMARY KEY  CustomerID  Clustered index created by a primary key constraint. 
FK_Individual_Customer_CustomerID  FOREIGN KEY  CustomerID  Reference table: Sales.Customer
Foreign key constraint referencing Customer.CustomerID. 
FK_Individual_Contact_ContactID  FOREIGN KEY  ContactID  Reference table: Person.Contact
Foreign key constraint referencing Contact.ContactID. 

Indices 

Name  Description 
PXML_Individual_Demographics  Primary XML index. 
XMLPATH_Individual_Demographics  Secondary XML index for path. 
XMLPROPERTY_Individual_Demographics  Secondary XML index for property. 
XMLVALUE_Individual_Demographics  Secondary XML index for value. 

Triggers 

Name  Description 
Sales.iuIndividual  AFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the ModifiedDate column in the Individual table to the current date. 

Accessed by 

Name  Description 
dbo.ufnGetContactInformation  Table value function returning the first name, last name, job title and contact type for a given contact. 
Sales.iStore  AFTER INSERT trigger inserting Store only if the Customer does not exist in the Individual table. 
Sales.vIndividual  Individual customers (names and addresses) that purchase Adventure Works Cycles products online. 
Sales.vIndividualDemographics  Displays the content from each element in the xml column Demographics for each customer in the Sales.Individual table. 

Modified by 

Name  Description 
Sales.iduSalesOrderDetail  AFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column. 
Sales.iuIndividual  AFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the ModifiedDate column in the Individual table to the current date. 

Applies to

Tables | User
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.