Owner: | Sales |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 864 |
Index Size KB: | 552 |
Rows: | 19220 |
Description: | Cross-reference table mapping customers to their address(es). |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
CustomerID | int | 4 | Primary key. Foreign key to Customer.CustomerID. | ||||||
AddressID | int | 4 | Primary key. Foreign key to Address.AddressID. | ||||||
AddressTypeID | int | 4 | Address type. Foreign key to AddressType.AddressTypeID. | ||||||
rowguid | uniqueidentifier | 16 | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | |||||
ModifiedDate | datetime | 8 | (getdate()) | Date and time the record was last updated. |
Index | Primary | Unique | Description | |
PK_CustomerAddress_CustomerID_AddressID | Primary key (clustered) constraint | |||
AK_CustomerAddress_rowguid | Unique nonclustered index. Used to support replication samples. |
Table | Foreign Key | Primary Key or Unique Constraint | |
Person.Address | FK_CustomerAddress_Address_AddressID | PK_Address_AddressID | |
Person.AddressType | FK_CustomerAddress_AddressType_AddressTypeID | PK_AddressType_AddressTypeID | |
Sales.Customer | FK_CustomerAddress_Customer_CustomerID | PK_Customer_CustomerID |
Objects that [Sales].[CustomerAddress] depends on
Object Name | Owner | Object Type | Dep Level | |
Flag | dbo | User Defined type | 1 | |
Name | dbo | User Defined type | 1 | |
ufnLeadingZeros | dbo | Function | 2 | |
AddressType | Person | Table | 2 | |
CountryRegion | Person | Table | 2 | |
SalesTerritory | Sales | Table | 2 | |
Customer | Sales | Table | 3 | |
StateProvince | Person | Table | 3 | |
Address | Person | Table | 4 |
Objects that depend on [Sales].[CustomerAddress]
Object Name | Owner | Object Type | Dep Level | |
vIndividualCustomer | Sales | View | 1 | |
vStoreWithDemographics | Sales | View | 1 |
CREATE TABLE [CustomerAddress] (
[CustomerID] [int] NOT NULL ,
[AddressID] [int] NOT NULL ,
[AddressTypeID] [int] NOT NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_CustomerAddress_rowguid] DEFAULT (newid()),
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_CustomerAddress_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_CustomerAddress_CustomerID_AddressID] PRIMARY KEY CLUSTERED
(
[CustomerID],
[AddressID]
) ON [PRIMARY] ,
CONSTRAINT [FK_CustomerAddress_Address_AddressID] FOREIGN KEY
(
[AddressID]
) REFERENCES [Address] (
[AddressID]
),
CONSTRAINT [FK_CustomerAddress_AddressType_AddressTypeID] FOREIGN KEY
(
[AddressTypeID]
) REFERENCES [AddressType] (
[AddressTypeID]
),
CONSTRAINT [FK_CustomerAddress_Customer_CustomerID] FOREIGN KEY
(
[CustomerID]
) REFERENCES [Customer] (
[CustomerID]
)
) ON [PRIMARY]
GO
See Also
List of tables