Northwind Database (Document! X Sample)
AdventureWorks Database / Person Schema / Person.AddressType Table
In This Topic
    Person.AddressType Table
    In This Topic
    Description
    Types of addresses stored in the Address table.
    Properties
    Creation Date27/10/2017 14:33
    File GroupPRIMARY
    Text File Group
    System Object
    Published for Replication
    Rows6
    Data Space Used8.00 KB
    Index Space Used40.00 KB
    Columns
     Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
    Primary Key Primary key for AddressType records.Integer4   
     Address type description. For example, Billing, Home, or Shipping.dbo.Name50   
     ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.GUID16 
    (newid())
     
     Date and time the record was last updated.DBTimeStamp4 
    (getdate())
     
    Indexes
    IndexDescriptionPrimaryUnique
    Unique nonclustered index. 
    Unique nonclustered index. Used to support replication samples. 
    Primary key (clustered) constraint
    Relationships
    RelationshipDescription
    Foreign key constraint referencing AddressType.AddressTypeID.
    Objects that depend on Person.AddressType
     Database ObjectObject TypeDescriptionDep Level
    Person.BusinessEntityAddress tablePerson.BusinessEntityAddressTableCross-reference table mapping customers, vendors, and employees to their addresses.1
    HumanResources.vEmployee viewHumanResources.vEmployeeViewEmployee names and addresses.2
    Sales.vIndividualCustomer viewSales.vIndividualCustomerViewIndividual customers (names and addresses) that purchase Adventure Works Cycles products online.2
    Sales.vSalesPerson viewSales.vSalesPersonViewSales representiatives (names and addresses) and their sales-related information.1
    Sales.vStoreWithAddresses viewSales.vStoreWithAddressesViewStores (including store addresses) that sell Adventure Works Cycles products to consumers.1
    Purchasing.vVendorWithAddresses viewPurchasing.vVendorWithAddressesViewVendor (company) names and addresses .2
    Objects that Person.AddressType depends on
     Database ObjectObject TypeDescriptionDep Level
    dbo.Name datatypedbo.NameUser Defined Data Type 2
    SQL
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    CREATE TABLE [Person].[AddressType](
        [AddressTypeID] [int] IDENTITY(1,1) NOT NULL,
        [Name] [dbo].[Name] 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]
    See Also