Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 808 
Index Size KB: 80 
Rows: 701 
Description: Customers (resellers) of Adventure Works products. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    CustomerID  int          Primary key. Foreign key to Customer.CustomerID. 
    Name  Name  100          Name of the store. 
    SalesPersonID  int          ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID. 
    Demographics  xml  -1          Demographic informationg about the store such as the number of employees, annual sales and store type. 
    rowguid  uniqueidentifier  16    (newid())      ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 6 column(s)


Index Primary Unique Description
  PK_Store_CustomerID      Primary key (clustered) constraint 
  IX_Store_SalesPersonID      Nonclustered index. 
  PXML_Store_Demographics      Primary XML index. 
  AK_Store_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 4 index(es)


Name Owner Instead Of Disabled Table/View Description
  iStore  Sales      Sales.Store  AFTER INSERT trigger inserting Store only if the Customer does not exist in the Individual table. 
Total: 1 trigger(s)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.StoreContact  FK_StoreContact_Store_CustomerID  PK_Store_CustomerID 
Total: 1 table(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.Customer  FK_Store_Customer_CustomerID  PK_Customer_CustomerID 
  Sales.SalesPerson  FK_Store_SalesPerson_SalesPersonID  PK_SalesPerson_SalesPersonID 
Total: 2 table(s)

Objects that [Sales].[Store] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  NameStyle  dbo  User Defined type 
  Phone  dbo  User Defined type 
  ufnLeadingZeros  dbo  Function 
  Contact  Person  Table 
  SalesTerritory  Sales  Table 
  Customer  Sales  Table 
  Employee  HumanResources  Table 
  SalesPerson  Sales  Table 
Total: 10 object(s)

Objects that depend on [Sales].[Store]

Object Name Owner Object Type Dep Level
  StoreContact  Sales  Table 
  iStore  Sales  Trigger 
  iuIndividual  Sales  Trigger 
  ufnGetContactInformation  dbo  Function 
  vStoreWithDemographics  Sales  View 
Total: 5 object(s)


    [CustomerID] [int] NOT NULL ,
    [Name] [Name] NOT NULL ,
    [SalesPersonID] [int] NULL ,
    [Demographics] [xml] NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_Store_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Store_ModifiedDate] DEFAULT (getdate()),
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_Store_Customer_CustomerID] FOREIGN KEY
    ) REFERENCES [Customer] (
    CONSTRAINT [FK_Store_SalesPerson_SalesPersonID] FOREIGN KEY
    ) REFERENCES [SalesPerson] (

See Also

List of tables