| Owner: | Sales |
| Creation Date: | 04/26/2006 |
| Located On: | PRIMARY |
| Data Size KB: | 24648 |
| Index Size KB: | 56 |
| Rows: | 18484 |
| Description: | Demographic data about customers that purchase Adventure Works products online. |
| Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
| CustomerID | int | 4 | Unique customer identification number. Foreign key to Customer.CustomerID. | ||||||
| ContactID | int | 4 | Identifies the customer in the Contact table. Foreign key to Contact.ContactID. | ||||||
| Demographics | xml | -1 | Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis. | ||||||
| ModifiedDate | datetime | 8 | (getdate()) | Date and time the record was last updated. |
| Index | Primary | Unique | Description | |
| PK_Individual_CustomerID | Primary key (clustered) constraint | |||
| 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. |
| Name | Owner | Instead Of | Disabled | Table/View | Description | |
| iuIndividual | Sales | Sales.Individual | 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. |
| Table | Foreign Key | Primary Key or Unique Constraint | |
| Person.Contact | FK_Individual_Contact_ContactID | PK_Contact_ContactID | |
| Sales.Customer | FK_Individual_Customer_CustomerID | PK_Customer_CustomerID |
Objects that [Sales].[Individual] 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 | |
| ufnLeadingZeros | dbo | Function | 2 | |
| Contact | Person | Table | 2 | |
| SalesTerritory | Sales | Table | 2 | |
| Customer | Sales | Table | 3 |
Objects that depend on [Sales].[Individual]
| Object Name | Owner | Object Type | Dep Level | |
| ufnGetContactInformation | dbo | Function | 1 | |
| vIndividualCustomer | Sales | View | 1 | |
| vIndividualDemographics | Sales | View | 1 | |
| iduSalesOrderDetail | Sales | Trigger | 1 | |
| iStore | Sales | Trigger | 1 | |
| iuIndividual | Sales | Trigger | 1 |
CREATE TABLE [Individual] (
[CustomerID] [int] NOT NULL ,
[ContactID] [int] NOT NULL ,
[Demographics] [xml] NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Individual_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_Individual_CustomerID] PRIMARY KEY CLUSTERED
(
[CustomerID]
) ON [PRIMARY] ,
CONSTRAINT [FK_Individual_Contact_ContactID] FOREIGN KEY
(
[ContactID]
) REFERENCES [Contact] (
[ContactID]
),
CONSTRAINT [FK_Individual_Customer_CustomerID] FOREIGN KEY
(
[CustomerID]
) REFERENCES [Customer] (
[CustomerID]
)
) ON [PRIMARY]
GO
See Also
List of tables