Owner: | HumanResources |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 16 |
Index Size KB: | 32 |
Rows: | 290 |
Description: | Cross-reference table mapping employees to their address(es). |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
EmployeeID | int | 4 | Primary key. Foreign key to Employee.EmployeeID. | ||||||
AddressID | int | 4 | Primary key. Foreign key to Address.AddressID. | ||||||
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_EmployeeAddress_EmployeeID_AddressID | Primary key (clustered) constraint | |||
AK_EmployeeAddress_rowguid | Unique nonclustered index. Used to support replication samples. |
Table | Foreign Key | Primary Key or Unique Constraint | |
Person.Address | FK_EmployeeAddress_Address_AddressID | PK_Address_AddressID | |
HumanResources.Employee | FK_EmployeeAddress_Employee_EmployeeID | PK_Employee_EmployeeID |
Objects that [HumanResources].[EmployeeAddress] depends on
Object Name | Owner | Object Type | Dep Level | |
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 | |
CountryRegion | Person | Table | 2 | |
SalesTerritory | Sales | Table | 2 | |
Employee | HumanResources | Table | 3 | |
StateProvince | Person | Table | 3 | |
Address | Person | Table | 4 |
Objects that depend on [HumanResources].[EmployeeAddress]
Object Name | Owner | Object Type | Dep Level | |
vEmployee | HumanResources | View | 1 | |
vSalesPerson | Sales | View | 1 |
CREATE TABLE [EmployeeAddress] (
[EmployeeID] [int] NOT NULL ,
[AddressID] [int] NOT NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_EmployeeAddress_rowguid] DEFAULT (newid()),
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_EmployeeAddress_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_EmployeeAddress_EmployeeID_AddressID] PRIMARY KEY CLUSTERED
(
[EmployeeID],
[AddressID]
) ON [PRIMARY] ,
CONSTRAINT [FK_EmployeeAddress_Address_AddressID] FOREIGN KEY
(
[AddressID]
) REFERENCES [Address] (
[AddressID]
),
CONSTRAINT [FK_EmployeeAddress_Employee_EmployeeID] FOREIGN KEY
(
[EmployeeID]
) REFERENCES [Employee] (
[EmployeeID]
)
) ON [PRIMARY]
GO
See Also
List of tables