Difference between revisions of "Sales.StoreContact (table)"
| Line 12: | Line 12: | ||
| + | === Columns === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 18: | Line 19: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
| − | | '''Description | + | | '''Description |
|- valign="top" | |- valign="top" | ||
| Line 25: | Line 26: | ||
| not null | | not null | ||
| | | | ||
| − | | Store identification number. Foreign key to Customer.CustomerID. | + | | Store identification number. Foreign key to Customer.CustomerID. |
|- valign="top" | |- valign="top" | ||
| ContactID | | ContactID | ||
| Line 31: | Line 32: | ||
| not null | | not null | ||
| | | | ||
| − | | Contact (store employee) identification number. Foreign key to Contact.ContactID. | + | | Contact (store employee) identification number. Foreign key to Contact.ContactID. |
|- valign="top" | |- valign="top" | ||
| ContactTypeID | | ContactTypeID | ||
| Line 37: | Line 38: | ||
| not null | | not null | ||
| | | | ||
| − | | Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID. | + | | Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID. |
|- valign="top" | |- valign="top" | ||
| rowguid | | rowguid | ||
| Line 43: | Line 44: | ||
| not null | | not null | ||
| (newid()) | | (newid()) | ||
| − | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
| Line 49: | Line 50: | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
| − | | Date and time the record was last updated. | + | | Date and time the record was last updated. |
|} | |} | ||
| + | === Primary Key === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Primary Key | ||
| + | | '''Columns | ||
| + | |- | ||
| + | | PK_StoreContact_CustomerID_ContactID | ||
| + | | CustomerID, ContactID | ||
| + | |} | ||
| + | === Indexes === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Index | ||
| + | | '''Type | ||
| + | | '''Columns | ||
| + | |||
| + | |- | ||
| + | | AK_StoreContact_rowguid | ||
| + | | Unique | ||
| + | | rowguid | ||
| + | |- | ||
| + | | IX_StoreContact_ContactID | ||
| + | | | ||
| + | | ContactID | ||
| + | |- | ||
| + | | IX_StoreContact_ContactTypeID | ||
| + | | | ||
| + | | ContactTypeID | ||
| + | |} | ||
| + | === Foreign Keys === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 74: | Line 105: | ||
|} | |} | ||
| + | === References === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Dependency Type | ||
| + | | '''Object Type | ||
| + | | '''Referenced Object | ||
| + | |||
| + | |- | ||
| + | | Schema | ||
| + | | Schema | ||
| + | | [[Sales_(schema)|Sales]] | ||
| + | |||
| + | |} | ||
| + | === Dependencies === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 92: | Line 137: | ||
|} | |} | ||
| − | |||
Revision as of 23:05, 2 February 2010
Contents
wikibot
| Table | Sales.StoreContact |
| Description | Cross-reference table mapping stores and their employees. |
Columns
| Column | Data Type | Nullable | Default | Description |
| CustomerID | int | not null | Store identification number. Foreign key to Customer.CustomerID. | |
| ContactID | int | not null | Contact (store employee) identification number. Foreign key to Contact.ContactID. | |
| ContactTypeID | int | not null | Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID. | |
| rowguid | uniqueidentifier | not null | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
| ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated. |
Primary Key
| Primary Key | Columns |
| PK_StoreContact_CustomerID_ContactID | CustomerID, ContactID |
Indexes
| Index | Type | Columns |
| AK_StoreContact_rowguid | Unique | rowguid |
| IX_StoreContact_ContactID | ContactID | |
| IX_StoreContact_ContactTypeID | ContactTypeID |
Foreign Keys
| Relation | Column | Referenced Column |
| Person.Contact | ContactID | ContactID |
| Person.ContactType | ContactTypeID | ContactTypeID |
| Sales.Store | CustomerID | CustomerID |
References
| Dependency Type | Object Type | Referenced Object |
| Schema | Schema | Sales |
Dependencies
| 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 |