Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Page History: Sales Customer (table)

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2010/02/11 09:07


wikibot

TableSales.Customer
DescriptionCurrent customer information. Also see the Individual and Store tables.

Columns

ColumnData TypeNullableDefaultDescription
CustomerIDintnot null Primary key for Customer records.
TerritoryIDintnull ID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID.
AccountNumber   Unique number identifying the customer assigned by the accounting system.
CustomerTypenchar(1)not null Customer type: I = Individual, S = Store
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Primary Key

Primary KeyColumns
PK_Customer_CustomerIDCustomerID

Indexes

IndexTypeColumns
AK_Customer_rowguidUniquerowguid
AK_Customer_AccountNumberUniqueAccountNumber
IX_Customer_TerritoryID TerritoryID

Check Constraints

Check ConstraintExpressionDescription
CK_Customer_CustomerType(upper(CustomerType)='I' OR upper(CustomerType)='S')Check constraint CustomerType='I' OR CustomerType='i' OR CustomerType='S' OR CustomerType='s'

Foreign Keys

RelationColumnReferenced Column
Sales.SalesTerritoryTerritoryIDTerritoryID

Detail Tables

Detail TableColumnReferencing Column
Sales.CustomerAddressCustomerIDCustomerID
Sales.IndividualCustomerIDCustomerID
Sales.SalesOrderHeaderCustomerIDCustomerID
Sales.StoreCustomerIDCustomerID

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

Dependencies

Reference TypeObject TypeReferencing Object
SelectViewSales.vIndividualCustomer
SelectViewSales.vStoreWithDemographics

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.