Owner: | Person |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 2224 |
Index Size KB: | 2440 |
Rows: | 19614 |
Description: | Street address information for customers, employees, and vendors. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
AddressID | int | 4 | Primary key for Address records. | ||||||
AddressLine1 | nvarchar | 60 | First street address line. | ||||||
AddressLine2 | nvarchar | 60 | Second street address line. | ||||||
City | nvarchar | 30 | Name of the city. | ||||||
StateProvinceID | int | 4 | Unique identification number for the state or province. Foreign key to StateProvince table. | ||||||
PostalCode | nvarchar | 15 | Postal code for the street address. | ||||||
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. |
Name | Seed | Increment | Not for replication | |
AddressID | 1 | 1 |
Index | Primary | Unique | Description | |
PK_Address_AddressID | Primary key (clustered) constraint | |||
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode | Nonclustered index. | |||
IX_Address_StateProvinceID | Nonclustered index. | |||
AK_Address_rowguid | Unique nonclustered index. Used to support replication samples. |
Table | Foreign Key | Primary Key or Unique Constraint | |
Person.StateProvince | FK_Address_StateProvince_StateProvinceID | PK_StateProvince_StateProvinceID |
Objects that [Person].[Address] depends on
Object Name | Owner | Object Type | Dep Level | |
Flag | dbo | User Defined type | 1 | |
Name | dbo | User Defined type | 1 | |
CountryRegion | Person | Table | 2 | |
SalesTerritory | Sales | Table | 2 | |
StateProvince | Person | Table | 3 |
Objects that depend on [Person].[Address]
Object Name | Owner | Object Type | Dep Level | |
CustomerAddress | Sales | Table | 1 | |
EmployeeAddress | HumanResources | Table | 1 | |
SalesOrderHeader | Sales | Table | 1 | |
VendorAddress | Purchasing | Table | 1 | |
vEmployee | HumanResources | View | 2 | |
vIndividualCustomer | Sales | View | 2 | |
vSalesPerson | Sales | View | 2 | |
vSalesPersonSalesByFiscalYears | Sales | View | 2 | |
vStoreWithDemographics | Sales | View | 2 | |
vVendor | Purchasing | View | 2 | |
SalesOrderDetail | Sales | Table | 2 | |
SalesOrderHeaderSalesReason | Sales | Table | 2 | |
uSalesOrderHeader | Sales | Trigger | 2 | |
iduSalesOrderDetail | Sales | Trigger | 3 |
CREATE TABLE [Address] (
[AddressID] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,
[AddressLine1] [nvarchar] (60) COLLATE Latin1_General_CS_AS NOT NULL ,
[AddressLine2] [nvarchar] (60) COLLATE Latin1_General_CS_AS NULL ,
[City] [nvarchar] (30) COLLATE Latin1_General_CS_AS NOT NULL ,
[StateProvinceID] [int] NOT NULL ,
[PostalCode] [nvarchar] (15) COLLATE Latin1_General_CS_AS NOT NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_Address_rowguid] DEFAULT (newid()),
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Address_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_Address_AddressID] PRIMARY KEY CLUSTERED
(
[AddressID]
) ON [PRIMARY] ,
CONSTRAINT [FK_Address_StateProvince_StateProvinceID] FOREIGN KEY
(
[StateProvinceID]
) REFERENCES [StateProvince] (
[StateProvinceID]
)
) ON [PRIMARY]
GO
See Also
List of tables