Table: [AdventureWorks2016CTP3].[Person].[BusinessEntityAddress]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [Person]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  997578592
 Located on  PRIMARY
 Data size KB  880 KB
 Index size KB  1432 KB
 Rows  19614
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID]
 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 AddressID     int 4        
Primary key Foreign key AddressTypeID     int 4        
    rowguid     uniqueidentifier 16   (newid())  
    ModifiedDate     datetime 8   (getdate())    
Total: 5 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID] BusinessEntityID   2312 0
[AK_BusinessEntityAddress_rowguid] rowguid     680 0
[IX_BusinessEntityAddress_AddressID] AddressID       368 0
[IX_BusinessEntityAddress_AddressTypeID] AddressTypeID       368 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].[Address] PK_Address_AddressID FK_BusinessEntityAddress_Address_AddressID
[Person].[AddressType] PK_AddressType_AddressTypeID FK_BusinessEntityAddress_AddressType_AddressTypeID
[Person].[BusinessEntity] PK_BusinessEntity_BusinessEntityID FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID
Total: 3 table(s)

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


Object name Object type Dep level
[HumanResources].[vEmployee] View 1
[Sales].[vIndividualCustomer] View 1
[Sales].[vSalesPerson] View 1
[Sales].[vStoreWithAddresses] View 1
[Purchasing].[vVendorWithAddresses] View 1
Total 5 object(s)

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


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

Collapse image Extended properties


Name  Value 
MS_Description Cross-reference table mapping customers, vendors, and employees to their addresses.

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].[BusinessEntityAddress] (
        [BusinessEntityID]     [int] NOT NULL,
        [AddressID]            [int] NOT NULL,
        [AddressTypeID]        [int] NOT NULL,
        [rowguid]              [uniqueidentifier] NOT NULL ROWGUIDCOL,
        [ModifiedDate]         [datetime] NOT NULL,
        CONSTRAINT [PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID]
        PRIMARY KEY
        CLUSTERED
        ([BusinessEntityID], [AddressID], [AddressTypeID])
    ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID'
GO
ALTER TABLE [Person].[BusinessEntityAddress]
    ADD
    CONSTRAINT [DF_BusinessEntityAddress_ModifiedDate]
    DEFAULT (getdate()) FOR [ModifiedDate]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'DF_BusinessEntityAddress_ModifiedDate'
GO
ALTER TABLE [Person].[BusinessEntityAddress]
    ADD
    CONSTRAINT [DF_BusinessEntityAddress_rowguid]
    DEFAULT (newid()) FOR [rowguid]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of NEWID()', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'DF_BusinessEntityAddress_rowguid'
GO
ALTER TABLE [Person].[BusinessEntityAddress]
    WITH CHECK
    ADD CONSTRAINT [FK_BusinessEntityAddress_Address_AddressID]
    FOREIGN KEY ([AddressID]) REFERENCES [Person].[Address] ([AddressID])
ALTER TABLE [Person].[BusinessEntityAddress]
    CHECK CONSTRAINT [FK_BusinessEntityAddress_Address_AddressID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Address.AddressID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'FK_BusinessEntityAddress_Address_AddressID'
GO
ALTER TABLE [Person].[BusinessEntityAddress]
    WITH CHECK
    ADD CONSTRAINT [FK_BusinessEntityAddress_AddressType_AddressTypeID]
    FOREIGN KEY ([AddressTypeID]) REFERENCES [Person].[AddressType] ([AddressTypeID])
ALTER TABLE [Person].[BusinessEntityAddress]
    CHECK CONSTRAINT [FK_BusinessEntityAddress_AddressType_AddressTypeID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing AddressType.AddressTypeID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'FK_BusinessEntityAddress_AddressType_AddressTypeID'
GO
ALTER TABLE [Person].[BusinessEntityAddress]
    WITH CHECK
    ADD CONSTRAINT [FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID]
    FOREIGN KEY ([BusinessEntityID]) REFERENCES [Person].[BusinessEntity] ([BusinessEntityID])
ALTER TABLE [Person].[BusinessEntityAddress]
    CHECK CONSTRAINT [FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing BusinessEntity.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID'
GO
CREATE UNIQUE NONCLUSTERED INDEX [AK_BusinessEntityAddress_rowguid]
    ON [Person].[BusinessEntityAddress] ([rowguid])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index. Used to support replication samples.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'AK_BusinessEntityAddress_rowguid'
GO
CREATE NONCLUSTERED INDEX [IX_BusinessEntityAddress_AddressID]
    ON [Person].[BusinessEntityAddress] ([AddressID])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'IX_BusinessEntityAddress_AddressID'
GO
CREATE NONCLUSTERED INDEX [IX_BusinessEntityAddress_AddressTypeID]
    ON [Person].[BusinessEntityAddress] ([AddressTypeID])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'IX_BusinessEntityAddress_AddressTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key. Foreign key to Address.AddressID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'COLUMN', N'AddressID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key. Foreign key to AddressType.AddressTypeID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'COLUMN', N'AddressTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key. Foreign key to BusinessEntity.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'COLUMN', N'BusinessEntityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'COLUMN', N'ModifiedDate'
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'BusinessEntityAddress', 'COLUMN', N'rowguid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Cross-reference table mapping customers, vendors, and employees to their addresses.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', NULL, NULL
GO

Collapse image See also


List of tables