Table: [AdventureWorks2016CTP3].[Person].[BusinessEntityContact]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [Person]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  1045578763
 Located on  PRIMARY
 Data size KB  48 KB
 Index size KB  144 KB
 Rows  909
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID]
 Filetable streamid unique   
 Filetable fullpath unique   
 Filetable is enabled   
 Is memory optimized   
 Durability  SCHEMA_AND_DATA

Collapse image Creation options


Name  Value 
QUOTED_IDENTIFIER ON
ANSI_NULLS ON
ANSI_PADDING OFF

Collapse image Columns


    Name  Description  Data type  Max length  Nullable  Default IsGUID  SPARSE Computed value
Primary key Foreign key BusinessEntityID     int 4        
Primary key Foreign key PersonID     int 4        
Primary key Foreign key ContactTypeID     int 4        
    rowguid     uniqueidentifier 16   (newid())  
    ModifiedDate     datetime 8   (getdate())    
Total: 5 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID] BusinessEntityID   192 0
[AK_BusinessEntityContact_rowguid] rowguid     48 0
[IX_BusinessEntityContact_ContactTypeID] ContactTypeID       40 0
[IX_BusinessEntityContact_PersonID] PersonID       40 0
Total: 4 Index/indexes

Collapse image Columnstore indexes


No columnstore indexes exist

Collapse image Referenced tables


Table  Primary key or unique constraint  Foreign key 
[Person].[BusinessEntity] PK_BusinessEntity_BusinessEntityID FK_BusinessEntityContact_BusinessEntity_BusinessEntityID
[Person].[ContactType] PK_ContactType_ContactTypeID FK_BusinessEntityContact_ContactType_ContactTypeID
[Person].[Person] PK_Person_BusinessEntityID FK_BusinessEntityContact_Person_PersonID
Total: 3 table(s)

Collapse image Objects that depend on [Person].[BusinessEntityContact]


Object name Object type Dep level
[dbo].[ufnGetContactInformation] Function 1
[Sales].[vStoreWithContacts] View 1
[Purchasing].[vVendorWithContacts] View 1
Total 3 object(s)

Collapse image Objects that [Person].[BusinessEntityContact] depends on


Object name Object type Dep level
[Person] Schema 1
[Person].[BusinessEntity] Table 1
[Person].[ContactType] Table 1
[Person].[Person] Table 1
Total 4 object(s)

Collapse image Extended properties


Name  Value 
MS_Description Cross-reference table mapping stores, vendors, and employees to people

Collapse image Table options


Name  Value 
Pintable OFF
Table lock on bulk load OFF
Insert row lock OFF
Text in row 0
Large value types out of row OFF

Collapse image SQL


SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING OFF
GO
CREATE TABLE [Person].[BusinessEntityContact] (
        [BusinessEntityID]     [int] NOT NULL,
        [PersonID]             [int] NOT NULL,
        [ContactTypeID]        [int] NOT NULL,
        [rowguid]              [uniqueidentifier] NOT NULL ROWGUIDCOL,
        [ModifiedDate]         [datetime] NOT NULL,
        CONSTRAINT [PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID]
        PRIMARY KEY
        CLUSTERED
        ([BusinessEntityID], [PersonID], [ContactTypeID])
    ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'CONSTRAINT', N'PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'INDEX', N'PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID'
GO
ALTER TABLE [Person].[BusinessEntityContact]
    ADD
    CONSTRAINT [DF_BusinessEntityContact_ModifiedDate]
    DEFAULT (getdate()) FOR [ModifiedDate]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'CONSTRAINT', N'DF_BusinessEntityContact_ModifiedDate'
GO
ALTER TABLE [Person].[BusinessEntityContact]
    ADD
    CONSTRAINT [DF_BusinessEntityContact_rowguid]
    DEFAULT (newid()) FOR [rowguid]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of NEWID()', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'CONSTRAINT', N'DF_BusinessEntityContact_rowguid'
GO
ALTER TABLE [Person].[BusinessEntityContact]
    WITH CHECK
    ADD CONSTRAINT [FK_BusinessEntityContact_BusinessEntity_BusinessEntityID]
    FOREIGN KEY ([BusinessEntityID]) REFERENCES [Person].[BusinessEntity] ([BusinessEntityID])
ALTER TABLE [Person].[BusinessEntityContact]
    CHECK CONSTRAINT [FK_BusinessEntityContact_BusinessEntity_BusinessEntityID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing BusinessEntity.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'CONSTRAINT', N'FK_BusinessEntityContact_BusinessEntity_BusinessEntityID'
GO
ALTER TABLE [Person].[BusinessEntityContact]
    WITH CHECK
    ADD CONSTRAINT [FK_BusinessEntityContact_ContactType_ContactTypeID]
    FOREIGN KEY ([ContactTypeID]) REFERENCES [Person].[ContactType] ([ContactTypeID])
ALTER TABLE [Person].[BusinessEntityContact]
    CHECK CONSTRAINT [FK_BusinessEntityContact_ContactType_ContactTypeID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing ContactType.ContactTypeID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'CONSTRAINT', N'FK_BusinessEntityContact_ContactType_ContactTypeID'
GO
ALTER TABLE [Person].[BusinessEntityContact]
    WITH CHECK
    ADD CONSTRAINT [FK_BusinessEntityContact_Person_PersonID]
    FOREIGN KEY ([PersonID]) REFERENCES [Person].[Person] ([BusinessEntityID])
ALTER TABLE [Person].[BusinessEntityContact]
    CHECK CONSTRAINT [FK_BusinessEntityContact_Person_PersonID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Person.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'CONSTRAINT', N'FK_BusinessEntityContact_Person_PersonID'
GO
CREATE UNIQUE NONCLUSTERED INDEX [AK_BusinessEntityContact_rowguid]
    ON [Person].[BusinessEntityContact] ([rowguid])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index. Used to support replication samples.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'INDEX', N'AK_BusinessEntityContact_rowguid'
GO
CREATE NONCLUSTERED INDEX [IX_BusinessEntityContact_ContactTypeID]
    ON [Person].[BusinessEntityContact] ([ContactTypeID])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'INDEX', N'IX_BusinessEntityContact_ContactTypeID'
GO
CREATE NONCLUSTERED INDEX [IX_BusinessEntityContact_PersonID]
    ON [Person].[BusinessEntityContact] ([PersonID])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'INDEX', N'IX_BusinessEntityContact_PersonID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key. Foreign key to BusinessEntity.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'COLUMN', N'BusinessEntityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.  Foreign key to ContactType.ContactTypeID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'COLUMN', N'ContactTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key. Foreign key to Person.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'COLUMN', N'PersonID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', 'COLUMN', N'rowguid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Cross-reference table mapping stores, vendors, and employees to people', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityContact', NULL, NULL
GO

Collapse image See also


List of tables