• lsrep17 Documentation
  • Tables [Person].[BusinessEntityAddress]
    Cross-reference table mapping customers, vendors, and employees to their addresses.
    PropertyValue
    Row Count (~)19614
    Created13:14:19 14 marca 2012
    Last Modified13:14:53 14 marca 2012
    KeyNameData TypeMax Length (Bytes)Allow NullsDefaultDescription
    Cluster Primary Key PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID: BusinessEntityID\AddressID\AddressTypeIDForeign Keys FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID: [Person].[BusinessEntity].BusinessEntityIDBusinessEntityIDint4
    False
    Primary key. Foreign key to BusinessEntity.BusinessEntityID.
    Cluster Primary Key PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID: BusinessEntityID\AddressID\AddressTypeIDIndexes IX_BusinessEntityAddress_AddressIDForeign Keys FK_BusinessEntityAddress_Address_AddressID: [Person].[Address].AddressIDAddressIDint4
    False
    Primary key. Foreign key to Address.AddressID.
    Cluster Primary Key PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID: BusinessEntityID\AddressID\AddressTypeIDIndexes IX_BusinessEntityAddress_AddressTypeIDForeign Keys FK_BusinessEntityAddress_AddressType_AddressTypeID: [Person].[AddressType].AddressTypeIDAddressTypeIDint4
    False
    Primary key. Foreign key to AddressType.AddressTypeID.
    Indexes AK_BusinessEntityAddress_rowguidrowguiduniqueidentifier16
    False
    (newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
    ModifiedDatedatetime8
    False
    (getdate())Date and time the record was last updated.
    KeyNameKey ColumnsUniqueDescription
    Cluster Primary Key PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID: BusinessEntityID\AddressID\AddressTypeIDPK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeIDBusinessEntityID, AddressID, AddressTypeID
    True
    Primary key (clustered) constraint
    AK_BusinessEntityAddress_rowguidrowguid
    True
    Unique nonclustered index. Used to support replication samples.
    IX_BusinessEntityAddress_AddressIDAddressIDNonclustered index.
    IX_BusinessEntityAddress_AddressTypeIDAddressTypeIDNonclustered index.
    NameColumnsDescription
    FK_BusinessEntityAddress_Address_AddressIDAddressID->[Person].[Address].[AddressID]Foreign key constraint referencing Address.AddressID.
    FK_BusinessEntityAddress_AddressType_AddressTypeIDAddressTypeID->[Person].[AddressType].[AddressTypeID]Foreign key constraint referencing AddressType.AddressTypeID.
    FK_BusinessEntityAddress_BusinessEntity_BusinessEntityIDBusinessEntityID->[Person].[BusinessEntity].[BusinessEntityID]Foreign key constraint referencing BusinessEntity.BusinessEntityID.
    CREATE TABLE [Person].[BusinessEntityAddress]
    (
    [BusinessEntityID] [int] NOT NULL,
    [AddressID] [int] NOT NULL,
    [AddressTypeID] [int] NOT NULL,
    [rowguid] [uniqueidentifier] NOT NULL ROWGUIDCOL CONSTRAINT [DF_BusinessEntityAddress_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_BusinessEntityAddress_ModifiedDate] DEFAULT (getdate())
    ) ON [PRIMARY]
    GO
    ALTER TABLE [Person].[BusinessEntityAddress] ADD CONSTRAINT [PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID] PRIMARY KEY CLUSTERED  ([BusinessEntityID], [AddressID], [AddressTypeID]) ON [PRIMARY]
    GO
    CREATE NONCLUSTERED INDEX [IX_BusinessEntityAddress_AddressID] ON [Person].[BusinessEntityAddress] ([AddressID]) ON [PRIMARY]
    GO
    CREATE NONCLUSTERED INDEX [IX_BusinessEntityAddress_AddressTypeID] ON [Person].[BusinessEntityAddress] ([AddressTypeID]) ON [PRIMARY]
    GO
    CREATE UNIQUE NONCLUSTERED INDEX [AK_BusinessEntityAddress_rowguid] ON [Person].[BusinessEntityAddress] ([rowguid]) ON [PRIMARY]
    GO
    ALTER TABLE [Person].[BusinessEntityAddress] ADD CONSTRAINT [FK_BusinessEntityAddress_Address_AddressID] FOREIGN KEY ([AddressID]) REFERENCES [Person].[Address] ([AddressID])
    GO
    ALTER TABLE [Person].[BusinessEntityAddress] ADD CONSTRAINT [FK_BusinessEntityAddress_AddressType_AddressTypeID] FOREIGN KEY ([AddressTypeID]) REFERENCES [Person].[AddressType] ([AddressTypeID])
    GO
    ALTER TABLE [Person].[BusinessEntityAddress] ADD CONSTRAINT [FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID] FOREIGN KEY ([BusinessEntityID]) REFERENCES [Person].[BusinessEntity] ([BusinessEntityID])
    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
    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'Default constraint value of GETDATE()', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'CONSTRAINT', N'DF_BusinessEntityAddress_ModifiedDate'
    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
    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
    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
    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
    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'Unique nonclustered index. Used to support replication samples.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'AK_BusinessEntityAddress_rowguid'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'IX_BusinessEntityAddress_AddressID'
    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'Clustered index created by a primary key constraint.', 'SCHEMA', N'Person', 'TABLE', N'BusinessEntityAddress', 'INDEX', N'PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID'
    GO