Owner: | Purchasing |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 8 |
Index Size KB: | 40 |
Rows: | 156 |
Description: | Cross-reference table mapping vendors and their employees. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
VendorID | int | 4 | Primary key. | ||||||
ContactID | int | 4 | Contact (Vendor employee) identification number. Foreign key to Contact.ContactID. | ||||||
ContactTypeID | int | 4 | Contact type such as sales manager, or sales agent. | ||||||
ModifiedDate | datetime | 8 | (getdate()) | Date and time the record was last updated. |
Index | Primary | Unique | Description | |
PK_VendorContact_VendorID_ContactID | Primary key (clustered) constraint | |||
IX_VendorContact_ContactID | Nonclustered index. | |||
IX_VendorContact_ContactTypeID | Nonclustered index. |
Table | Foreign Key | Primary Key or Unique Constraint | |
Person.Contact | FK_VendorContact_Contact_ContactID | PK_Contact_ContactID | |
Person.ContactType | FK_VendorContact_ContactType_ContactTypeID | PK_ContactType_ContactTypeID | |
Purchasing.Vendor | FK_VendorContact_Vendor_VendorID | PK_Vendor_VendorID |
Objects that [Purchasing].[VendorContact] depends on
Object Name | Owner | Object Type | Dep Level | |
AccountNumber | dbo | User Defined type | 1 | |
Flag | dbo | User Defined type | 1 | |
Name | dbo | User Defined type | 1 | |
NameStyle | dbo | User Defined type | 1 | |
Phone | dbo | User Defined type | 1 | |
Contact | Person | Table | 2 | |
ContactType | Person | Table | 2 | |
Vendor | Purchasing | Table | 2 |
Objects that depend on [Purchasing].[VendorContact]
Object Name | Owner | Object Type | Dep Level | |
ufnGetContactInformation | dbo | Function | 1 | |
vVendor | Purchasing | View | 1 |
CREATE TABLE [VendorContact] (
[VendorID] [int] NOT NULL ,
[ContactID] [int] NOT NULL ,
[ContactTypeID] [int] NOT NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_VendorContact_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_VendorContact_VendorID_ContactID] PRIMARY KEY CLUSTERED
(
[VendorID],
[ContactID]
) ON [PRIMARY] ,
CONSTRAINT [FK_VendorContact_Contact_ContactID] FOREIGN KEY
(
[ContactID]
) REFERENCES [Contact] (
[ContactID]
),
CONSTRAINT [FK_VendorContact_ContactType_ContactTypeID] FOREIGN KEY
(
[ContactTypeID]
) REFERENCES [ContactType] (
[ContactTypeID]
),
CONSTRAINT [FK_VendorContact_Vendor_VendorID] FOREIGN KEY
(
[VendorID]
) REFERENCES [Vendor] (
[VendorID]
)
) ON [PRIMARY]
GO
See Also
List of tables