Database reference - AdventureWorks2008

AdventureWorks2008 -  tables -  [Person].[AddressType]

Description

Types of addresses stored in the Address table.  

Table properties

namevalue
name[Person].[AddressType]
createdMar 19 2009 9:09PM
modifiedMar 19 2009 9:10PM 
ansi nullson 
quoted identifieron 
row count6
Size of data8 kb
Size of indexes40 kb
Maximum size of a single row228 bytes

Columns

columndatatypelengthbytesdefaultnullsPKFKUQcomputedcomment
AddressTypeIDint identity(1,1)104 no  yes    no  Primary key for AddressType records. 
NameName50200 no      no  Address type description. For example, Billing, Home, or Shipping. 
rowguiduniqueidentifier3616(newid())no      no  ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
ModifiedDatedatetime238(getdate())no      no  Date and time the record was last updated. 

Indexes

namedescriptioncolumncomment
AK_AddressType_Namenonclustered, unique located on PRIMARYNameUnique nonclustered index. 
AK_AddressType_rowguidnonclustered, unique located on PRIMARYrowguidUnique nonclustered index. Used to support replication samples. 
PK_AddressType_AddressTypeIDclustered, unique, primary key located on PRIMARYAddressTypeIDClustered index created by a primary key constraint. 

Referenced by

name
BusinessEntityAddress

Foreign key graph

AddressTypeBusinessEntityAddress

Defaults

default namecolumncomment
DF_AddressType_rowguidrowguidDefault constraint value of NEWID() 
DF_AddressType_ModifiedDateModifiedDateDefault constraint value of GETDATE() 

Dependency graph

DF_AddressType_ModifiedDateDF_AddressType_rowguidNameAddressTypeAK_AddressType_NameAK_AddressType_rowguidPK_AddressType_AddressTypeID...vVendorWithAddressesvIndividualCustomervStoreWithAddresses

Objects that [Person].[AddressType] depends on

nameobject typedatabaseserverlevel
NametypeAdventureWorks2008SPRING\KATMAI1

Objects that depend on [Person].[AddressType]

nameobject typedatabaseserverlevel
vVendorWithAddressesviewAdventureWorks2008SPRING\KATMAI1
vIndividualCustomerviewAdventureWorks2008SPRING\KATMAI1
vStoreWithAddressesviewAdventureWorks2008SPRING\KATMAI1

Sample rows

AddressTypeIDNamerowguidModifiedDate
Billing  b84f78b1-4efe-4a0e-8cb7-70e9f112f886  6/1/1998 12:00:00 AM 
Home  41bc2ff6-f0fc-475f-8eb9-cec0805aa0f2  6/1/1998 12:00:00 AM 
Main Office  8eeec28c-07a2-4fb9-ad0a-42d4a0bbc575  6/1/1998 12:00:00 AM 
Primary  24cb3088-4345-47c4-86c5-17b535133d1e  6/1/1998 12:00:00 AM 
Shipping  b29da3f8-19a3-47da-9daa-15c84f4a83a5  6/1/1998 12:00:00 AM 
Archive  a67f238a-5ba2-444b-966c-0467ed9c427f  6/1/1998 12:00:00 AM 

Code

CREATE TABLE [Person].[AddressType](
    [AddressTypeID] [int] IDENTITY(1,1) NOT NULL,
    [Name] [dbo].[Name] NOT NULL,
    [AddressTypeID] [int] IDENTITY(1,1) NOT NULL,
    [rowguid] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
    [ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_AddressType_AddressTypeID] PRIMARY KEY CLUSTERED 
(
    [AddressTypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [Person].[AddressType] ADD  CONSTRAINT [DF_AddressType_rowguid]  DEFAULT (newid()) FOR [rowguid]
ALTER TABLE [Person].[AddressType] ADD  CONSTRAINT [DF_AddressType_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]



Documentation generated by SqlSpec