Difference between revisions of "Sales.Store (table)"

From dbscript Online Help
Jump to: navigation, search
Line 5: Line 5:
 
| '''Table
 
| '''Table
 
| Sales.Store
 
| Sales.Store
 +
|- valign="top"
 +
| '''Description
 +
| Customers (resellers) of Adventure Works products.
 
|-
 
|-
 
|}
 
|}
Line 15: Line 18:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''PK
+
| '''Description / PK / Index
| '''Index
 
 
 
|-
+
|- valign="top"
 
| CustomerID
 
| CustomerID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| PK_Store_CustomerID
+
| Primary key. Foreign key to Customer.CustomerID.<br />PK_Store_CustomerID
|
+
|- valign="top"
|-
 
 
| Name
 
| Name
 
| dbo.Name
 
| dbo.Name
 
| not null
 
| not null
 
|  
 
|  
|  
+
| Name of the store.<br />
|
+
|- valign="top"
|-
 
 
| SalesPersonID
 
| SalesPersonID
 
| int
 
| int
 
| null
 
| null
 
|  
 
|  
|  
+
| ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID.<br />IX_Store_SalesPersonID
| IX_Store_SalesPersonID
+
|- valign="top"
|-
 
 
| Demographics
 
| Demographics
 
| xml
 
| xml
 
| null
 
| null
 
|  
 
|  
|  
+
| Demographic informationg about the store such as the number of employees, annual sales and store type.<br />PXML_Store_Demographics
| PXML_Store_Demographics
+
|- valign="top"
|-
 
 
| rowguid
 
| rowguid
 
| uniqueidentifier
 
| uniqueidentifier
 
| not null
 
| not null
 
| (newid())
 
| (newid())
|  
+
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.<br />AK_Store_rowguid
| AK_Store_rowguid
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
|  
+
| Date and time the record was last updated.<br />
|
 
 
|}
 
|}
  
Line 103: Line 99:
 
| ON INSERT
 
| ON INSERT
 
|}
 
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Dependency Type
 +
| '''Object Type
 +
| '''Referenced Object
 +
 +
| '''Child Type
 +
| '''Child Object
 +
 +
|-
 +
| Data Type
 +
| Type
 +
| [[dbo.Name_(type)|dbo.Name]]
 +
 +
|
 +
|
 +
|-
 +
| Data Type
 +
| XML Schema Collection
 +
| [[Sales.StoreSurveySchemaCollection_(xml_schema_collection)|Sales.StoreSurveySchemaCollection]]
 +
 +
|
 +
|
 +
|-
 +
| Select
 +
| Table
 +
| [[Sales.Individual_(table)|Sales.Individual]]
 +
 +
| Trigger
 +
| iStore
 +
|-
 +
| Execute
 +
| Procedure
 +
| [[dbo.uspLogError_(procedure)|dbo.uspLogError]]
 +
 +
| Trigger
 +
| iStore
 +
|-
 +
| Execute
 +
| Procedure
 +
| [[dbo.uspPrintError_(procedure)|dbo.uspPrintError]]
 +
 +
| Trigger
 +
| iStore
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Reference Type
 +
| '''Object Type
 +
| '''Referencing Object
 +
 +
| '''Child Type
 +
| '''Child Object
 +
 +
|-
 +
| Select
 +
| View
 +
| [[Sales.vStoreWithDemographics_(view)|Sales.vStoreWithDemographics]]
 +
 +
|
 +
|
 +
|-
 +
| Select
 +
| Table
 +
| [[Sales.Individual_(table)|Sales.Individual]]
 +
 +
| Trigger
 +
| iuIndividual
 +
|}
 +
 +
 +
 
== automatically generated ==
 
== automatically generated ==
  

Revision as of 22:55, 28 December 2009

wikibot

Table Sales.Store
Description Customers (resellers) of Adventure Works products.


Column Data Type Nullable Default Description / PK / Index
CustomerID int not null Primary key. Foreign key to Customer.CustomerID.
PK_Store_CustomerID
Name dbo.Name not null Name of the store.
SalesPersonID int null ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID.
IX_Store_SalesPersonID
Demographics xml null Demographic informationg about the store such as the number of employees, annual sales and store type.
PXML_Store_Demographics
rowguid uniqueidentifier not null (newid()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_Store_rowguid
ModifiedDate datetime not null (getdate()) Date and time the record was last updated.


Relation Column Referenced Column
Sales.Customer CustomerID CustomerID
Sales.SalesPerson SalesPersonID SalesPersonID


Detail Table Column Referencing Column
Sales.StoreContact CustomerID CustomerID


Triggers Type
iStore ON INSERT


Dependency Type Object Type Referenced Object Child Type Child Object
Data Type Type dbo.Name
Data Type XML Schema Collection Sales.StoreSurveySchemaCollection
Select Table Sales.Individual Trigger iStore
Execute Procedure dbo.uspLogError Trigger iStore
Execute Procedure dbo.uspPrintError Trigger iStore


Reference Type Object Type Referencing Object Child Type Child Object
Select View Sales.vStoreWithDemographics
Select Table Sales.Individual Trigger iuIndividual


automatically generated

Table Sales.Store
Description Customers (resellers) of Adventure Works products.


Column Data Type Nullable Default Description / PK / Index
CustomerID int not null Primary key. Foreign key to Customer.CustomerID.
PK_Store_CustomerID
Name Name not null Name of the store.
SalesPersonID int null ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID.
IX_Store_SalesPersonID
Demographics XML null Demographic informationg about the store such as the number of employees, annual sales and store type.
PXML_Store_Demographics
rowguid uniqueidentifier not null (NEWID()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_Store_rowguid
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Relation Column Referenced Column
Sales.Customer CustomerID CustomerID
Sales.SalesPerson SalesPersonID SalesPersonID


Detail Table Column Referencing Column
Sales.StoreContact CustomerID CustomerID


Triggers Type
iStore ON INSERT


Dependency Type Object Type Referenced Object Child Type Child Object
Data Type Type dbo.Name
Schema Schema Sales
Data Type XML Schema Collection Sales.StoreSurveySchemaCollection
Select Table Sales.Individual Trigger iStore
Execute Procedure dbo.uspLogError Trigger iStore
Execute Procedure dbo.uspPrintError Trigger iStore


Reference Type Object Type Referencing Object Child Type Child Object
Select View Sales.vStoreWithDemographics
Select Table Sales.Individual Trigger iuIndividual