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

From dbscript Online Help
Jump to: navigation, search
Line 5: Line 5:
 
| '''Table
 
| '''Table
 
| Sales.StoreContact
 
| Sales.StoreContact
 +
|- valign="top"
 +
| '''Description
 +
| Cross-reference table mapping stores and their employees.
 
|-
 
|-
 
|}
 
|}
Line 15: Line 18:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''PK
+
| '''Description / PK / Index
| '''Index
 
 
 
|-
+
|- valign="top"
 
| CustomerID
 
| CustomerID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| PK_StoreContact_CustomerID_ContactID
+
| Store identification number. Foreign key to Customer.CustomerID.<br />PK_StoreContact_CustomerID_ContactID
|
+
|- valign="top"
|-
 
 
| ContactID
 
| ContactID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| PK_StoreContact_CustomerID_ContactID
+
| Contact (store employee) identification number. Foreign key to Contact.ContactID.<br />PK_StoreContact_CustomerID_ContactIDIX_StoreContact_ContactID
| IX_StoreContact_ContactID
+
|- valign="top"
|-
 
 
| ContactTypeID
 
| ContactTypeID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
|  
+
| Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID.<br />IX_StoreContact_ContactTypeID
| IX_StoreContact_ContactTypeID
+
|- 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_StoreContact_rowguid
| AK_StoreContact_rowguid
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
|  
+
| Date and time the record was last updated.<br />
|
 
 
|}
 
|}
  
Line 76: Line 73:
 
| CustomerID
 
| CustomerID
 
|}
 
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Reference Type
 +
| '''Object Type
 +
| '''Referencing Object
 +
 +
|-
 +
| Select
 +
| View
 +
| [[Sales.vStoreWithDemographics_(view)|Sales.vStoreWithDemographics]]
 +
 +
|-
 +
| Select
 +
| SQL table-valued-function
 +
| [[dbo.ufnGetContactInformation_(function)|dbo.ufnGetContactInformation]]
 +
 +
|}
 +
 +
 +
 
== automatically generated ==
 
== automatically generated ==
  

Revision as of 23:55, 28 December 2009

wikibot

Table Sales.StoreContact
Description Cross-reference table mapping stores and their employees.


Column Data Type Nullable Default Description / PK / Index
CustomerID int not null Store identification number. Foreign key to Customer.CustomerID.
PK_StoreContact_CustomerID_ContactID
ContactID int not null Contact (store employee) identification number. Foreign key to Contact.ContactID.
PK_StoreContact_CustomerID_ContactIDIX_StoreContact_ContactID
ContactTypeID int not null Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID.
IX_StoreContact_ContactTypeID
rowguid uniqueidentifier not null (newid()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_StoreContact_rowguid
ModifiedDate datetime not null (getdate()) Date and time the record was last updated.


Relation Column Referenced Column
Person.Contact ContactID ContactID
Person.ContactType ContactTypeID ContactTypeID
Sales.Store CustomerID CustomerID


Reference Type Object Type Referencing Object
Select View Sales.vStoreWithDemographics
Select SQL table-valued-function dbo.ufnGetContactInformation


automatically generated

Table Sales.StoreContact
Description Cross-reference table mapping stores and their employees.


Column Data Type Nullable Default Description / PK / Index
CustomerID int not null Store identification number. Foreign key to Customer.CustomerID.
PK_StoreContact_CustomerID_ContactID
ContactID int not null Contact (store employee) identification number. Foreign key to Contact.ContactID.
PK_StoreContact_CustomerID_ContactIDIX_StoreContact_ContactID
ContactTypeID int not null Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID.
IX_StoreContact_ContactTypeID
rowguid uniqueidentifier not null (NEWID()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_StoreContact_rowguid
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Relation Column Referenced Column
Person.Contact ContactID ContactID
Person.ContactType ContactTypeID ContactTypeID
Sales.Store CustomerID CustomerID


Dependency Type Object Type Referenced Object
Schema Schema Sales


Reference Type Object Type Referencing Object
Select View Sales.vStoreWithDemographics
Select SQL table-valued-function dbo.ufnGetContactInformation