Docstoc

Adventure Works Database Schema

Document Sample
Adventure Works Database Schema Powered By Docstoc
					                 Adventure Works Database Schema
Table of Contents
Summary
Tables
    dbo.AWBuildVersion
    dbo.DatabaseLog
    dbo.ErrorLog
    HumanResources.Department
    HumanResources.Employee
    HumanResources.EmployeeAddress
    HumanResources.EmployeeDepartmentHistory
    HumanResources.EmployeePayHistory
    HumanResources.JobCandidate
    HumanResources.Shift
    Person.Address
    Person.AddressType
    Person.Contact
    Person.ContactType
    Person.CountryRegion
    Person.StateProvince
    Production.BillOfMaterials
    Production.Culture
    Production.Document
    Production.Illustration
    Production.Location
    Production.Product
    Production.ProductCategory
    Production.ProductCostHistory
    Production.ProductDescription
    Production.ProductDocument
    Production.ProductInventory
    Production.ProductListPriceHistory
    Production.ProductModel
    Production.ProductModelIllustration
    Production.ProductModelProductDescriptionCulture
    Production.ProductPhoto
    Production.ProductProductPhoto
    Production.ProductReview
    Production.ProductSubcategory
    Production.ScrapReason
    Production.TransactionHistory
    Production.TransactionHistoryArchive
    Production.UnitMeasure
    Production.WorkOrder
    Production.WorkOrderRouting
    Purchasing.ProductVendor
    Purchasing.PurchaseOrderDetail
    Purchasing.PurchaseOrderHeader
    Purchasing.ShipMethod
    Purchasing.Vendor
    Purchasing.VendorAddress
    Purchasing.VendorContact
    Sales.ContactCreditCard
    Sales.CountryRegionCurrency
    Sales.CreditCard
    Sales.Currency
    Sales.CurrencyRate
    Sales.Customer
    Sales.CustomerAddress
    Sales.Individual
    Sales.SalesOrderDetail
    Sales.SalesOrderHeader
    Sales.SalesOrderHeaderSalesReason
    Sales.SalesPerson
    Sales.SalesPersonQuotaHistory
    Sales.SalesReason
    Sales.SalesTaxRate
    Sales.SalesTerritory
    Sales.SalesTerritoryHistory
    Sales.ShoppingCartItem
    Sales.SpecialOffer
    Sales.SpecialOfferProduct
    Sales.Store
    Sales.StoreContact
Views
    HumanResources.vEmployee
    HumanResources.vEmployeeDepartment
    HumanResources.vEmployeeDepartmentHistory
    HumanResources.vJobCandidate
    HumanResources.vJobCandidateEducation
    HumanResources.vJobCandidateEmployment
    Person.vAdditionalContactInfo
    Person.vStateProvinceCountryRegion
    Production.vProductAndDescription
    Production.vProductModelCatalogDescription
    Production.vProductModelInstructions
    Purchasing.vVendor
    Sales.vIndividualCustomer
    Sales.vIndividualDemographics
    Sales.vSalesPerson
    Sales.vSalesPersonSalesByFiscalYears
    Sales.vStoreWithDemographics
Procedures and Functions
    dbo.ufnGetAccountingEndDate
    dbo.ufnGetAccountingStartDate
    dbo.ufnGetContactInformation
    dbo.ufnGetDocumentStatusText
    dbo.ufnGetProductDealerPrice
     dbo.ufnGetProductListPrice
     dbo.ufnGetProductStandardCost
     dbo.ufnGetPurchaseOrderStatusText
     dbo.ufnGetSalesOrderStatusText
     dbo.ufnGetStock
     dbo.ufnLeadingZeros
     dbo.uspGetBillOfMaterials
     dbo.uspGetEmployeeManagers
     dbo.uspGetManagerEmployees
     dbo.uspGetWhereUsedProductID
     dbo.uspLogError
     dbo.uspPrintError
     HumanResources.uspUpdateEmployeeHireInfo
     HumanResources.uspUpdateEmployeeLogin
     HumanResources.uspUpdateEmployeePersonalInfo
 Rules
 Database Level Triggers
 Data Types

Summary
 Property                                                        Value
 Report created                                                  20-May-2011 15:49
 DBMS and version                                                Microsoft SQL Server [ 09.00.1399 ]
 Server                                                          DTM-XP
 Database name                                                   AdventureWorks
 User/Login                                                      sa
 Schema/Owner
 Driver and version                                              sqlncli10.dll [ 10.00.4000 ]
 DTM Schema Reporter                                             Version 1.24.23, (C) 2003-2011 DTM soft.


Tables, 70 items
Table: 'dbo.AWBuildVersion'
4 fields. 83 bytes.

 Field Name            Data Type   Size   Original   Default           Nullable        Description     Check
                                          Type
 SystemInformationID   tinyint            tinyint                      Not null        Primary key
                       identity                                                        for
                                                                                       AWBuildVer
                                                                                       sion records.
 Database Version      nvarchar    25                                  Not null        Version
                                                                                       number of
                                                                                       the database
                                                                                       in
                                                                                       9.yy.mm.dd.
                                                                                       00 format.
 VersionDate           datetime                                        Not null        Date and
                                                                                       time the
                                                                                       record was
                                                                                       last updated.
 ModifiedDate          datetime                      getdate()         Not null        Date and
                                                                                       time the
                                                                                       record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'dbo.AWBuildVersion'

 Primary Key Name                                                                        Field Name
 PK_AWBuildVersion_SystemInformationID                                                   SystemInformationID
There are no Foreign Keys for this table.

Indexes for table 'dbo.AWBuildVersion', 1 item

 Index Name                              Description               Clustered                 Unique                      Fields
 PK_AWBuildVersion_SystemInfor           Clustered index           Yes                       Yes                         SystemInformationID
 mationID                                created by a primary
                                         key constraint.

Triggers for table 'dbo.AWBuildVersion', 1 item

 Name                                             Description                     Type                             Enabled
 uAWBuildVersion                                  AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  AWBuildVersion table to
                                                  the current date.

Dependencies for table 'dbo.AWBuildVersion', 1 item

 Object Name                                                    Type                                        Field Name
 dbo.uAWBuildVersion                                            trigger                                     N/A


Table: 'dbo.DatabaseLog'
8 fields. 1044 bytes.

Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured
by the database trigger ddlDatabaseTriggerLog.

 Field Name               Data Type        Size             Original           Default           Nullable        Description     Check
                                                            Type
 DatabaseLogID            int identity                      int                                  Not null        Primary key
                                                                                                                 for
                                                                                                                 DatabaseLo
                                                                                                                 g records.
 PostTime                 datetime                                                               Not null        The date
                                                                                                                 and time the
                                                                                                                 DDL change
                                                                                                                 occurred.
 DatabaseUser             sysname          128              nvarchar(12                          Not null        The user
                                                            8)                                                   who
                                                                                                                 implemented
                                                                                                                 the DDL
                                                                                                                 change.
 Event                    sysname          128              nvarchar(12                          Not null        The type of
                                                            8)                                                   DDL
                                                                                                                 statement
                                                                                                                 that was
                                                                                                                 executed.
 Schema                   sysname          128              nvarchar(12                          Null            The schema
                                                              8)                                           to which the
                                                                                                           changed
                                                                                                           object
                                                                                                           belongs.
 Object                    sysname            128             nvarchar(12                       Null       The object
                                                              8)                                           that was
                                                                                                           changed by
                                                                                                           the DDL
                                                                                                           statment.
 TSQL                      nvarchar           max                                               Not null   The exact
                                                                                                           Transact-SQ
                                                                                                           L statement
                                                                                                           that was
                                                                                                           executed.
 XmlEvent                  xml                                                                  Not null   The raw
                                                                                                           XML data
                                                                                                           generated by
                                                                                                           database
                                                                                                           trigger.

Extended Properties
The object has no extended properties.

Primary key for table 'dbo.DatabaseLog'

 Primary Key Name                                                                          Field Name
 PK_DatabaseLog_DatabaseLogID                                                              DatabaseLogID
There are no Foreign Keys for this table.

Indexes for table 'dbo.DatabaseLog', 1 item

 Index Name                                 Description            Clustered                  Unique              Fields
 PK_DatabaseLog_DatabaseLogID               Nonclustered index     No                         Yes                 DatabaseLogID
                                            created by a primary
                                            key constraint.
There are no Triggers for this table.
There are no Dependencies for this object.

Table: 'dbo.ErrorLog'
9 fields. 8544 bytes.

Audit table tracking errors in the the AdventureWorks database that are caught by the
CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure
dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH
construct.

 Field Name                Data Type          Size            Original         Default          Nullable   Description    Check
                                                              Type
 ErrorLogID                int identity                       int                               Not null   Primary key
                                                                                                           for ErrorLog
                                                                                                           records.
 ErrorTime                 datetime                                            getdate()        Not null   The date
                                                                                                           and time at
                                                                                                           which the
                                                                                                           error
                                                                                                           occurred.
 UserName                  sysname            128             nvarchar(12                       Not null   The user
                                                              8)                                           who
                                                                                                           executed the
                                                                                                           batch in
                                                                                                           which the
                                                                                                                 error
                                                                                                                 occurred.
 ErrorNumber                int                                                                  Not null        The error
                                                                                                                 number of
                                                                                                                 the error that
                                                                                                                 occurred.
 ErrorSeverity              int                                                                  Null            The severity
                                                                                                                 of the error
                                                                                                                 that
                                                                                                                 occurred.
 ErrorState                 int                                                                  Null            The state
                                                                                                                 number of
                                                                                                                 the error that
                                                                                                                 occurred.
 ErrorProcedure             nvarchar          126                                                Null            The name of
                                                                                                                 the stored
                                                                                                                 procedure or
                                                                                                                 trigger where
                                                                                                                 the error
                                                                                                                 occurred.
 ErrorLine                  int                                                                  Null            The line
                                                                                                                 number at
                                                                                                                 which the
                                                                                                                 error
                                                                                                                 occurred.
 ErrorMessage               nvarchar          4000                                               Not null        The
                                                                                                                 message
                                                                                                                 text of the
                                                                                                                 error that
                                                                                                                 occurred.

Extended Properties
The object has no extended properties.

Primary key for table 'dbo.ErrorLog'

 Primary Key Name                                                                           Field Name
 PK_ErrorLog_ErrorLogID                                                                     ErrorLogID
There are no Foreign Keys for this table.

Indexes for table 'dbo.ErrorLog', 1 item

 Index Name                                 Description               Clustered                Unique                    Fields
 PK_ErrorLog_ErrorLogID                     Clustered index           Yes                      Yes                       ErrorLogID
                                            created by a primary
                                            key constraint.
There are no Triggers for this table.

Dependencies for table 'dbo.ErrorLog', 1 item

 Object Name                                                       Type                                     Field Name
 dbo.uspLogError                                                   stored procedure                         N/A


Table: 'HumanResources.Department'
4 fields. 218 bytes.

Lookup table containing the departments within the Adventure Works Cycles company.

 Field Name                 Data Type         Size            Original            Default        Nullable        Description      Check
                                                              Type
 DepartmentID               smallint                          smallint                           Not null        Primary key
                           identity                                                                                 for
                                                                                                                    Department
                                                                                                                    records.
 Name                      Name                                nvarchar(50)                         Not null        Name of the
                                                                                                                    department.
 GroupName                 Name                                nvarchar(50)                         Not null        Name of the
                                                                                                                    group to
                                                                                                                    which the
                                                                                                                    department
                                                                                                                    belongs.
 ModifiedDate              datetime                                               getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.Department'

 Primary Key Name                                                                             Field Name
 PK_Department_DepartmentID                                                                   DepartmentID
There are no Foreign Keys for this table.

Indexes for table 'HumanResources.Department', 2 items

 Index Name                                 Description               Clustered                   Unique                    Fields
 PK_Department_DepartmentID                 Clustered index           Yes                         Yes                       DepartmentID
                                            created by a primary
                                            key constraint.
 AK_Department_Name                         Unique nonclustered       No                          Yes                       Name
                                            index.

Triggers for table 'HumanResources.Department', 1 item

 Name                                                Description                     Type                             Enabled
 uDepartment                                         AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Department
                                                     table to the current date.

Dependencies for table 'HumanResources.Department', 3 items

 Object Name                                                       Type                                        Field Name
 HumanResources.uDepartment                                        trigger                                     N/A
 HumanResources.vEmployeeDepartment                                view                                        N/A
 HumanResources.vEmployeeDepartmentHistory                         view                                        N/A


Table: 'HumanResources.Employee'
16 fields. 728 bytes.

Employee information such as salary, department, and title.

 Field Name                Data Type          Size             Original           Default           Nullable        Description     Check
                                                               Type
 EmployeeID                int identity                        int                                  Not null        Primary key
                                                                                                                    for
                                                                                                                    Employee
                                                                                                                    records.
NationalIDNumber   nvarchar   15                Not null   Unique
                                                           national
                                                           identification
                                                           number such
                                                           as a social
                                                           security
                                                           number.
ContactID          int                          Not null   Identifies the
                                                           employee in
                                                           the Contact
                                                           table.
                                                           Foreign key
                                                           to
                                                           Contact.Cont
                                                           actID.
LoginID            nvarchar   256               Not null   Network
                                                           login.
ManagerID          int                          Null       Manager to
                                                           whom the
                                                           employee is
                                                           assigned.
                                                           Foreign Key
                                                           to
                                                           Employee.M
Title              nvarchar   50                Not null   Work title
                                                           such as
                                                           Buyer or
                                                           Sales
                                                           Representati
                                                           ve.
BirthDate          datetime                     Not null   Date of birth.   ([BirthDate]>
                                                                            ='1930-01-0
                                                                            1' AND
                                                                            [BirthDate]<
                                                                            =dateadd(ye
                                                                            ar,(-18),getd
                                                                            ate()))
MaritalStatus      nchar      1                 Not null   M = Married,     (upper([Marit
                                                           S = Single       alStatus])='S'
                                                                            OR
                                                                            upper([Marit
                                                                            alStatus])='M
                                                                            ')
Gender             nchar      1                 Not null   M = Male, F      (upper([Gen
                                                           = Female         der])='F' OR
                                                                            upper([Gend
                                                                            er])='M')
HireDate           datetime                     Not null   Employee         ([HireDate]>
                                                           hired on this    ='1996-07-0
                                                           date.            1' AND
                                                                            [HireDate]<=
                                                                            dateadd(day,
                                                                            (1),getdate())
                                                                            )
SalariedFlag       Flag             bit   (1)   Not null   Job
                                                           classification
                                                           . 0 = Hourly,
                                                           not exempt
                                                           from
                                                           collective
                                                           bargaining. 1
                                                           = Salaried,
                                                           exempt from
                                                           collective
                                                           bargaining.
VacationHours      smallint               (0)   Not null   Number of        ([VacationHo
                                                                                                                   available        urs]>=(-40)
                                                                                                                   vacation         AND
                                                                                                                   hours.           [VacationHo
                                                                                                                                    urs]<=(240))
 SickLeaveHours           smallint                                               (0)               Not null        Number of        ([SickLeave
                                                                                                                   available        Hours]>=(0)
                                                                                                                   sick leave       AND
                                                                                                                   hours.           [SickLeaveH
                                                                                                                                    ours]<=(120)
                                                                                                                                    )
 CurrentFlag              Flag                              bit                  (1)               Not null        0 = Inactive,
                                                                                                                   1 = Active
 rowguid                  uniqueidentif                                          newid()           Not null        ROWGUIDC
                          ier                                                                                      OL number
                                                                                                                   uniquely
                                                                                                                   identifying
                                                                                                                   the record.
                                                                                                                   Used to
                                                                                                                   support a
                                                                                                                   merge
                                                                                                                   replication
                                                                                                                   sample.
 ModifiedDate             datetime                                               getdate()         Not null        Date and
                                                                                                                   time the
                                                                                                                   record was
                                                                                                                   last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.Employee'

 Primary Key Name                                                                            Field Name
 PK_Employee_EmployeeID                                                                      EmployeeID

Foreign keys for table 'HumanResources.Employee', 2 items

 Foreign                                                          Primary                                     Key Name
 Employee.ManagerID                                               Employee.EmployeeID                         FK_Employee_Employee_ManagerI
                                                                                                              D
 Employee.ContactID                                               Contact.ContactID                           FK_Employee_Contact_ContactID

Indexes for table 'HumanResources.Employee', 5 items

 Index Name                               Description                Clustered                    Unique                  Fields
 PK_Employee_EmployeeID                   Clustered index            Yes                          Yes                     EmployeeID
                                          created by a primary
                                          key constraint.
 AK_Employee_LoginID                      Unique nonclustered        No                           Yes                     LoginID
                                          index.
 AK_Employee_NationalIDNumber             Unique nonclustered        No                           Yes                     NationalIDNumber
                                          index.
 AK_Employee_rowguid                      Unique nonclustered        No                           Yes                     rowguid
                                          index. Used to
                                          support replication
                                          samples.
 IX_Employee_ManagerID                    Nonclustered index.        No                           No                      ManagerID

Triggers for table 'HumanResources.Employee', 2 items

 Name                                             Description                          Type                          Enabled
 dEmployee                                        INSTEAD OF DELETE                    instead of Delete             Yes
                                             trigger which keeps
                                             Employees from being
                                             deleted.
 uEmployee                                   AFTER UPDATE trigger             after Update                     Yes
                                             setting the ModifiedDate
                                             column in the Employee
                                             table to the current date.

Dependencies for table 'HumanResources.Employee', 18 items

 Object Name                                               Type                                         Field Name
 dbo.ufnGetContactInformation                              table function                               N/A
 dbo.uspGetEmployeeManagers                                stored procedure                             N/A
 dbo.uspGetManagerEmployees                                stored procedure                             N/A
 HumanResources.CK_Employee_BirthDate                      check cns                                    N/A
 HumanResources.CK_Employee_Gender                         check cns                                    N/A
 HumanResources.CK_Employee_HireDate                       check cns                                    N/A
 HumanResources.CK_Employee_MaritalStatus                  check cns                                    N/A
 HumanResources.CK_Employee_SickLeaveHours                 check cns                                    N/A
 HumanResources.CK_Employee_VacationHours                  check cns                                    N/A
 HumanResources.uEmployee                                  trigger                                      N/A
 HumanResources.uspUpdateEmployeeHireInfo                  stored procedure                             N/A
 HumanResources.uspUpdateEmployeeLogin                     stored procedure                             N/A
 HumanResources.uspUpdateEmployeePersonalInfo              stored procedure                             N/A
 HumanResources.vEmployee                                  view                                         N/A
 HumanResources.vEmployeeDepartment                        view                                         N/A
 HumanResources.vEmployeeDepartmentHistory                 view                                         N/A
 Sales.vSalesPerson                                        view                                         N/A
 Sales.vSalesPersonSalesByFiscalYears                      view                                         N/A


Table: 'HumanResources.EmployeeAddress'
4 fields. 40 bytes.

Cross-reference table mapping employees to their address(es).

 Field Name           Data Type       Size              Original          Default            Nullable        Description     Check
                                                        Type
 EmployeeID           int                                                                    Not null        Primary key.
                                                                                                             Foreign key
                                                                                                             to
                                                                                                             Employee.E
                                                                                                             mployeeID.
 AddressID            int                                                                    Not null        Primary key.
                                                                                                             Foreign key
                                                                                                             to
                                                                                                             Address.Add
                                                                                                             ressID.
 rowguid              uniqueidentif                                       newid()            Not null        ROWGUIDC
                      ier                                                                                    OL number
                                                                                                             uniquely
                                                                                                             identifying
                                                                                                             the record.
                                                                                                             Used to
                                                                                                             support a
                                                                                                             merge
                                                                                                             replication
                                                                                                             sample.
 ModifiedDate         datetime                                            getdate()          Not null        Date and
                                                                                                             time the
                                                                                                             record was
                                                                                                             last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.EmployeeAddress'

 Primary Key Name                                                                        Field Names
 PK_EmployeeAddress_EmployeeID_AddressID                                                 EmployeeID, AddressID

Foreign keys for table 'HumanResources.EmployeeAddress', 2 items

 Foreign                                                        Primary                                     Key Name
 EmployeeAddress.EmployeeID                                     Employee.EmployeeID                         FK_EmployeeAddress_Employee_E
                                                                                                            mployeeID
 EmployeeAddress.AddressID                                      Address.AddressID                           FK_EmployeeAddress_Address_Ad
                                                                                                            dressID

Indexes for table 'HumanResources.EmployeeAddress', 2 items

 Index Name                              Description               Clustered                 Unique                      Fields
 PK_EmployeeAddress_EmployeeI            Clustered index           Yes                       Yes                         EmployeeID,
 D_AddressID                             created by a primary                                                            AddressID
                                         key constraint.
 AK_EmployeeAddress_rowguid              Unique nonclustered       No                        Yes                         rowguid
                                         index. Used to
                                         support replication
                                         samples.

Triggers for table 'HumanResources.EmployeeAddress', 1 item

 Name                                             Description                     Type                             Enabled
 uEmployeeAddress                                 AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  EmployeeAddress table to
                                                  the current date.

Dependencies for table 'HumanResources.EmployeeAddress', 3 items

 Object Name                                                    Type                                        Field Name
 HumanResources.uEmployeeAddress                                trigger                                     N/A
 HumanResources.vEmployee                                       view                                        N/A
 Sales.vSalesPerson                                             view                                        N/A


Table: 'HumanResources.EmployeeDepartmentHistory'
6 fields. 55 bytes.

Employee department transfers.

 Field Name               Data Type        Size            Original            Default           Nullable        Description       Check
                                                           Type
 EmployeeID               int                                                                    Not null        Employee
                                                                                                                 identification
                                                                                                                 number.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Employee.E
                                                                                                                 mployeeID.
 DepartmentID             smallint                                                               Not null        Department
                                                                                                                 in which the
                                                                                                                 employee
                                                                                                                 worked
                                                                                                                 including
                                                                                                                 currently.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Department.
                                                                                                                 DepartmentI
                                                                                                                 D.
 ShiftID                  tinyint                                                                Not null        Identifies
                                                                                                                 which 8-hour
                                                                                                                 shift the
                                                                                                                 employee
                                                                                                                 works.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Shift.Shift.ID.
 StartDate                datetime                                                               Not null        Date the
                                                                                                                 employee
                                                                                                                 started work
                                                                                                                 in the
                                                                                                                 department.
 EndDate                  datetime                                                               Null            Date the
                                                                                                                 employee
                                                                                                                 left the
                                                                                                                 department.
                                                                                                                 NULL =
                                                                                                                 Current
                                                                                                                 department.
 ModifiedDate             datetime                                              getdate()        Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.EmployeeDepartmentHistory'

 Primary Key Name                                                                           Field Names
 PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID                             EmployeeID, StartDate, DepartmentID, ShiftID

Foreign keys for table 'HumanResources.EmployeeDepartmentHistory', 3 items

 Foreign                                                        Primary                                     Key Name
 EmployeeDepartmentHistory.DepartmentID                         Department.DepartmentID                     FK_EmployeeDepartmentHistory_D
                                                                                                            epartment_DepartmentID
 EmployeeDepartmentHistory.EmployeeID                           Employee.EmployeeID                         FK_EmployeeDepartmentHistory_E
                                                                                                            mployee_EmployeeID
 EmployeeDepartmentHistory.ShiftID                              Shift.ShiftID                               FK_EmployeeDepartmentHistory_S
                                                                                                            hift_ShiftID

Indexes for table 'HumanResources.EmployeeDepartmentHistory', 3 items

 Index Name                              Description               Clustered                    Unique                   Fields
 PK_EmployeeDepartmentHistory_           Clustered index           Yes                          Yes                      EmployeeID,
 EmployeeID_StartDate_Departmen          created by a primary                                                            StartDate,
 tID                                     key constraint.                                                                 DepartmentID, ShiftID
 IX_EmployeeDepartmentHistory_D          Nonclustered index.       No                           No                       DepartmentID
 epartmentID
 IX_EmployeeDepartmentHistory_S          Nonclustered index.       No                           No                       ShiftID
 hiftID

Triggers for table 'HumanResources.EmployeeDepartmentHistory', 1 item

 Name                                           Description                    Type                              Enabled
 uEmployeeDepartmentHistory                     AFTER UPDATE trigger           after Update                      Yes
                                                setting the ModifiedDate
                                                column in the
                                                EmployeeDepartmentHistor
                                                y table to the current date.

Dependencies for table 'HumanResources.EmployeeDepartmentHistory', 4 items

 Object Name                                                 Type                                        Field Name
 HumanResources.CK_EmployeeDepartmentHistory_End             check cns                                   N/A
 Date
 HumanResources.uEmployeeDepartmentHistory                   trigger                                     N/A
 HumanResources.vEmployeeDepartment                          view                                        N/A
 HumanResources.vEmployeeDepartmentHistory                   view                                        N/A


Table: 'HumanResources.EmployeePayHistory'
5 fields. 58 bytes.

Employee pay history.

 Field Name               Data Type      Size             Original         Default            Nullable         Description      Check
                                                          Type
 EmployeeID               int                                                                 Not null         Employee
                                                                                                               identification
                                                                                                               number.
                                                                                                               Foreign key
                                                                                                               to
                                                                                                               Employee.E
                                                                                                               mployeeID.
 RateChangeDate           datetime                                                            Not null         Date the
                                                                                                               change in
                                                                                                               pay is
                                                                                                               effective
 Rate                     money          19,4             decimal(19,4                        Not null         Salary hourly    ([Rate]>=(6.
                                                          )                                                    rate.            50) AND
                                                                                                                                [Rate]<=(200
                                                                                                                                .00))
 PayFrequency             tinyint                                                             Not null         1 = Salary       ([PayFreque
                                                                                                               received         ncy]=(2) OR
                                                                                                               monthly, 2 =     [PayFrequen
                                                                                                               Salary           cy]=(1))
                                                                                                               received
                                                                                                               biweekly
 ModifiedDate             datetime                                         getdate()          Not null         Date and
                                                                                                               time the
                                                                                                               record was
                                                                                                               last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.EmployeePayHistory'

 Primary Key Name                                                                      Field Names
 PK_EmployeePayHistory_EmployeeID_RateChangeDate                                       EmployeeID, RateChangeDate
Foreign keys for table 'HumanResources.EmployeePayHistory', 1 item

 Foreign                                                     Primary                                      Key Name
 EmployeePayHistory.EmployeeID                               Employee.EmployeeID                          FK_EmployeePayHistory_Employee
                                                                                                          _EmployeeID

Indexes for table 'HumanResources.EmployeePayHistory', 1 item

 Index Name                           Description               Clustered                 Unique                        Fields
 PK_EmployeePayHistory_Employe        Clustered index           Yes                       Yes                           EmployeeID,
 eID_RateChangeDate                   created by a primary                                                              RateChangeDate
                                      key constraint.

Triggers for table 'HumanResources.EmployeePayHistory', 1 item

 Name                                          Description                      Type                              Enabled
 uEmployeePayHistory                           AFTER UPDATE trigger             after Update                      Yes
                                               setting the ModifiedDate
                                               column in the
                                               EmployeePayHistory table
                                               to the current date.

Dependencies for table 'HumanResources.EmployeePayHistory', 4 items

 Object Name                                                 Type                                         Field Name
 HumanResources.CK_EmployeePayHistory_PayFrequen             check cns                                    N/A
 cy
 HumanResources.CK_EmployeePayHistory_Rate                   check cns                                    N/A
 HumanResources.uEmployeePayHistory                          trigger                                      N/A
 HumanResources.uspUpdateEmployeeHireInfo                    stored procedure                             N/A


Table: 'HumanResources.JobCandidate'
4 fields. 24 bytes.

Resumes submitted to Human Resources by job applicants.

 Field Name            Data Type        Size            Original            Default            Nullable         Description      Check
                                                        Type
 JobCandidateID        int identity                     int                                    Not null         Primary key
                                                                                                                for
                                                                                                                JobCandidat
                                                                                                                e records.
 EmployeeID            int                                                                     Null             Employee
                                                                                                                identification
                                                                                                                number if
                                                                                                                applicant
                                                                                                                was hired.
                                                                                                                Foreign key
                                                                                                                to
                                                                                                                Employee.E
                                                                                                                mployeeID.
 Resume                xml                                                                     Null             Resume in
                                                                                                                XML format.
 ModifiedDate          datetime                                             getdate()          Not null         Date and
                                                                                                                time the
                                                                                                                record was
                                                                                                                last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.JobCandidate'

 Primary Key Name                                                                          Field Name
 PK_JobCandidate_JobCandidateID                                                            JobCandidateID

Foreign keys for table 'HumanResources.JobCandidate', 1 item

 Foreign                                                        Primary                                     Key Name
 JobCandidate.EmployeeID                                        Employee.EmployeeID                         FK_JobCandidate_Employee_Empl
                                                                                                            oyeeID

Indexes for table 'HumanResources.JobCandidate', 2 items

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_JobCandidate_JobCandidateID          Clustered index           Yes                         Yes                       JobCandidateID
                                         created by a primary
                                         key constraint.
 IX_JobCandidate_EmployeeID              Nonclustered index.       No                          No                        EmployeeID

Triggers for table 'HumanResources.JobCandidate', 1 item

 Name                                             Description                     Type                             Enabled
 uJobCandidate                                    AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the JobCandidat
                                                  table to the current date.

Dependencies for table 'HumanResources.JobCandidate', 4 items

 Object Name                                                    Type                                        Field Name
 HumanResources.uJobCandidate                                   trigger                                     N/A
 HumanResources.vJobCandidate                                   view                                        N/A
 HumanResources.vJobCandidateEducation                          view                                        N/A
 HumanResources.vJobCandidateEmployment                         view                                        N/A


Table: 'HumanResources.Shift'
5 fields. 149 bytes.

Work shift lookup table.

 Field Name               Data Type        Size             Original           Default           Nullable        Description     Check
                                                            Type
 ShiftID                  tinyint                           tinyint                              Not null        Primary key
                          identity                                                                               for Shift
                                                                                                                 records.
 Name                     Name                              nvarchar(50)                         Not null        Shift
                                                                                                                 description.
 StartTime                datetime                                                               Not null        Shift start
                                                                                                                 time.
 EndTime                  datetime                                                               Not null        Shift end
                                                                                                                 time.
 ModifiedDate             datetime                                             getdate()         Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'HumanResources.Shift'

 Primary Key Name                                                                             Field Name
 PK_Shift_ShiftID                                                                             ShiftID
There are no Foreign Keys for this table.

Indexes for table 'HumanResources.Shift', 3 items

 Index Name                                 Description               Clustered                  Unique                       Fields
 PK_Shift_ShiftID                           Clustered index           Yes                        Yes                          ShiftID
                                            created by a primary
                                            key constraint.
 AK_Shift_Name                              Unique nonclustered       No                         Yes                          Name
                                            index.
 AK_Shift_StartTime_EndTime                 Unique nonclustered       No                         Yes                          StartTime, EndTime
                                            index.

Triggers for table 'HumanResources.Shift', 1 item

 Name                                                Description                       Type                             Enabled
 uShift                                              AFTER UPDATE trigger              after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Shift table to
                                                     the current date.

Dependencies for table 'HumanResources.Shift', 2 items

 Object Name                                                       Type                                          Field Name
 HumanResources.uShift                                             trigger                                       N/A
 HumanResources.vEmployeeDepartmentHistory                         view                                          N/A


Table: 'Person.Address'
8 fields. 370 bytes.

Street address information for customers, employees, and vendors.

 Field Name                Data Type          Size              Original            Default           Nullable        Description       Check
                                                                Type
 AddressID                 int identity                         int                                   Not null        Primary key
                                                                                                                      for Address
                                                                                                                      records.
 AddressLine1              nvarchar           60                                                      Not null        First street
                                                                                                                      address line.
 AddressLine2              nvarchar           60                                                      Null            Second
                                                                                                                      street
                                                                                                                      address line.
 City                      nvarchar           30                                                      Not null        Name of the
                                                                                                                      city.
 StateProvinceID           int                                                                        Not null        Unique
                                                                                                                      identification
                                                                                                                      number for
                                                                                                                      the state or
                                                                                                                      province.
                                                                                                                      Foreign key
                                                                                                                      to
                                                                                                                    StateProvinc
                                                                                                                    e table.
 PostalCode                nvarchar          15                                                    Not null         Postal code
                                                                                                                    for the street
                                                                                                                    address.
 rowguid                   uniqueidentif                                         newid()           Not null         ROWGUIDC
                           ier                                                                                      OL number
                                                                                                                    uniquely
                                                                                                                    identifying
                                                                                                                    the record.
                                                                                                                    Used to
                                                                                                                    support a
                                                                                                                    merge
                                                                                                                    replication
                                                                                                                    sample.
 ModifiedDate              datetime                                              getdate()         Not null         Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Person.Address'

 Primary Key Name                                                                            Field Name
 PK_Address_AddressID                                                                        AddressID

Foreign keys for table 'Person.Address', 1 item

 Foreign                                                          Primary                                     Key Name
 Address.StateProvinceID                                          StateProvince.StateProvinceID               FK_Address_StateProvince_StatePr
                                                                                                              ovinceID

Indexes for table 'Person.Address', 4 items

 Index Name                                Description               Clustered                  Unique                      Fields
 PK_Address_AddressID                      Clustered index           Yes                        Yes                         AddressID
                                           created by a primary
                                           key constraint.
 AK_Address_rowguid                        Unique nonclustered       No                         Yes                         rowguid
                                           index. Used to
                                           support replication
                                           samples.
 IX_Address_AddressLine1_Addres            Nonclustered index.       No                         Yes                         AddressLine1,
 sLine2_City_StateProvinceID_Post                                                                                           AddressLine2, City,
 alCode                                                                                                                     StateProvinceID,
                                                                                                                            PostalCode
 IX_Address_StateProvinceID                Nonclustered index.       No                         No                          StateProvinceID

Triggers for table 'Person.Address', 1 item

 Name                                              Description                      Type                              Enabled
 uAddress                                          AFTER UPDATE trigger             after Update                      Yes
                                                   setting the ModifiedDate
                                                   column in the Address table
                                                   to the current date.

Dependencies for table 'Person.Address', 6 items

 Object Name                                                      Type                                        Field Name
 HumanResources.vEmployee                                          view                                       N/A
 Person.uAddress                                                   trigger                                    N/A
 Purchasing.vVendor                                                view                                       N/A
 Sales.vIndividualCustomer                                         view                                       N/A
 Sales.vSalesPerson                                                view                                       N/A
 Sales.vStoreWithDemographics                                      view                                       N/A


Table: 'Person.AddressType'
4 fields. 136 bytes.

Types of addresses stored in the Address table.

 Field Name                Data Type          Size            Original            Default          Nullable         Description      Check
                                                              Type
 AddressTypeID             int identity                       int                                  Not null         Primary key
                                                                                                                    for
                                                                                                                    AddressTyp
                                                                                                                    e records.
 Name                      Name                               nvarchar(50)                         Not null         Address type
                                                                                                                    description.
                                                                                                                    For example,
                                                                                                                    Billing,
                                                                                                                    Home, or
                                                                                                                    Shipping.
 rowguid                   uniqueidentif                                          newid()          Not null         ROWGUIDC
                           ier                                                                                      OL number
                                                                                                                    uniquely
                                                                                                                    identifying
                                                                                                                    the record.
                                                                                                                    Used to
                                                                                                                    support a
                                                                                                                    merge
                                                                                                                    replication
                                                                                                                    sample.
 ModifiedDate              datetime                                               getdate()        Not null         Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Person.AddressType'

 Primary Key Name                                                                             Field Name
 PK_AddressType_AddressTypeID                                                                 AddressTypeID
There are no Foreign Keys for this table.

Indexes for table 'Person.AddressType', 3 items

 Index Name                                 Description               Clustered                   Unique                   Fields
 PK_AddressType_AddressTypeID               Clustered index           Yes                         Yes                      AddressTypeID
                                            created by a primary
                                            key constraint.
 AK_AddressType_Name                        Unique nonclustered       No                          Yes                      Name
                                            index.
 AK_AddressType_rowguid                     Unique nonclustered       No                          Yes                      rowguid
                                            index. Used to
                                            support replication
                                            samples.
Triggers for table 'Person.AddressType', 1 item

 Name                                        Description                        Type                             Enabled
 uAddressType                                AFTER UPDATE trigger               after Update                     Yes
                                             setting the ModifiedDate
                                             column in the AddressType
                                             table to the current date.

Dependencies for table 'Person.AddressType', 3 items

 Object Name                                                 Type                                         Field Name
 Person.uAddressType                                         trigger                                      N/A
 Sales.vIndividualCustomer                                   view                                         N/A
 Sales.vStoreWithDemographics                                view                                         N/A


Table: 'Person.Contact'
15 fields. 577 bytes.

Names of each employee, customer contact, and vendor contact.

 Field Name            Data Type      Size             Original           Default              Nullable        Description      Check
                                                       Type
 ContactID             int identity                    int                                     Not null        Primary key
                                                                                                               for Contact
                                                                                                               records.
 NameStyle             NameStyle                       bit                (0)                  Not null        0 = The data
                                                                                                               in FirstName
                                                                                                               and
                                                                                                               LastName
                                                                                                               are stored in
                                                                                                               western style
                                                                                                               (first name,
                                                                                                               last name)
                                                                                                               order. 1 =
                                                                                                               Eastern style
                                                                                                               (last name,
                                                                                                               first name)
                                                                                                               order.
 Title                 nvarchar       8                                                        Null            A courtesy
                                                                                                               title. For
                                                                                                               example, Mr.
                                                                                                               or Ms.
 FirstName             Name                            nvarchar(50)                            Not null        First name of
                                                                                                               the person.
 MiddleName            Name                            nvarchar(50)                            Null            Middle name
                                                                                                               or middle
                                                                                                               initial of the
                                                                                                               person.
 LastName              Name                            nvarchar(50)                            Not null        Last name of
                                                                                                               the person.
 Suffix                nvarchar       10                                                       Null            Surname
                                                                                                               suffix. For
                                                                                                               example, Sr.
                                                                                                               or Jr.
 EmailAddress          nvarchar       50                                                       Null            E-mail
                                                                                                               address for
                                                                                                               the person.
 EmailPromotion        int                                                (0)                  Not null        0 = Contact      ([EmailProm
                                                                                                               does not         otion]>=(0)
                                                                                                               wish to          AND
                                                                                                               receive          [EmailPromo
                                                                                             e-mail          tion]<=(2))
                                                                                             promotions,
                                                                                             1 = Contact
                                                                                             does wish to
                                                                                             receive
                                                                                             e-mail
                                                                                             promotions
                                                                                             from
                                                                                             AdventureW
                                                                                             orks, 2 =
                                                                                             Contact
                                                                                             does wish to
                                                                                             receive
                                                                                             e-mail
                                                                                             promotions
                                                                                             from
                                                                                             AdventureW
                                                                                             orks and
                                                                                             selected
                                                                                             partners.
 Phone                   Phone                        nvarchar(25)                Null       Phone
                                                                                             number
                                                                                             associated
                                                                                             with the
                                                                                             person.
 PasswordHash            varchar         40                                       Not null   Password for
                                                                                             the e-mail
                                                                                             account.
 PasswordSalt            varchar         10                                       Not null   Random
                                                                                             value
                                                                                             concatenate
                                                                                             d with the
                                                                                             password
                                                                                             string before
                                                                                             the
                                                                                             password is
                                                                                             hashed.
 AdditionalContactInfo   xml                                                      Null       Additional
                                                                                             contact
                                                                                             information
                                                                                             about the
                                                                                             person
                                                                                             stored in xml
                                                                                             format.
 rowguid                 uniqueidentif                               newid()      Not null   ROWGUIDC
                         ier                                                                 OL number
                                                                                             uniquely
                                                                                             identifying
                                                                                             the record.
                                                                                             Used to
                                                                                             support a
                                                                                             merge
                                                                                             replication
                                                                                             sample.
 ModifiedDate            datetime                                    getdate()    Not null   Date and
                                                                                             time the
                                                                                             record was
                                                                                             last updated.

Extended Properties

 Object Type                                  Object Name               Property Name         Property Value
 TABLE                                        Contact                   Author                Mike Filony

Primary key for table 'Person.Contact'
 Primary Key Name                                                                              Field Name
 PK_Contact_ContactID                                                                          ContactID
There are no Foreign Keys for this table.

Indexes for table 'Person.Contact', 3 items

 Index Name                                 Description               Clustered                   Unique                     Fields
 PK_Contact_ContactID                       Clustered index           Yes                         Yes                        ContactID
                                            created by a primary
                                            key constraint.
 AK_Contact_rowguid                         nonclustered, unique      No                          Yes                        rowguid
                                            located on PRIMARY
 IX_Contact_EmailAddress                    Nonclustered index.       No                          No                         EmailAddress

Triggers for table 'Person.Contact', 1 item

 Name                                                Description                      Type                             Enabled
 uContact                                            AFTER UPDATE trigger             after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Contact table
                                                     to the current date.

Dependencies for table 'Person.Contact', 14 items

 Object Name                                                       Type                                         Field Name
 dbo.ufnGetContactInformation                                      table function                               N/A
 dbo.uspGetEmployeeManagers                                        stored procedure                             N/A
 dbo.uspGetManagerEmployees                                        stored procedure                             N/A
 HumanResources.vEmployee                                          view                                         N/A
 HumanResources.vEmployeeDepartment                                view                                         N/A
 HumanResources.vEmployeeDepartmentHistory                         view                                         N/A
 Person.CK_Contact_EmailPromotion                                  check cns                                    N/A
 Person.uContact                                                   trigger                                      N/A
 Person.vAdditionalContactInfo                                     view                                         N/A
 Purchasing.vVendor                                                view                                         N/A
 Sales.vIndividualCustomer                                         view                                         N/A
 Sales.vSalesPerson                                                view                                         N/A
 Sales.vSalesPersonSalesByFiscalYears                              view                                         N/A
 Sales.vStoreWithDemographics                                      view                                         N/A


Table: 'Person.ContactType'
3 fields. 120 bytes.

Lookup table containing the types of contacts stored in Contact.

 Field Name                Data Type          Size             Original            Default           Nullable        Description       Check
                                                               Type
 ContactTypeID             int identity                        int                                   Not null        Primary key
                                                                                                                     for
                                                                                                                     ContactType
                                                                                                                     records.
 Name                      Name                                nvarchar(50)                          Not null        Contact type
                                                                                                                     description.
 ModifiedDate              datetime                                                getdate()         Not null        Date and
                                                                                                                     time the
                                                                                                                     record was
                                                                                                                     last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'Person.ContactType'

 Primary Key Name                                                                               Field Name
 PK_ContactType_ContactTypeID                                                                   ContactTypeID
There are no Foreign Keys for this table.

Indexes for table 'Person.ContactType', 2 items

 Index Name                                 Description               Clustered                     Unique                    Fields
 PK_ContactType_ContactTypeID               Clustered index           Yes                           Yes                       ContactTypeID
                                            created by a primary
                                            key constraint.
 AK_ContactType_Name                        Unique nonclustered       No                            Yes                       Name
                                            index.

Triggers for table 'Person.ContactType', 1 item

 Name                                                Description                       Type                             Enabled
 uContactType                                        AFTER UPDATE trigger              after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the ContactType
                                                     table to the current date.

Dependencies for table 'Person.ContactType', 4 items

 Object Name                                                       Type                                          Field Name
 dbo.ufnGetContactInformation                                      table function                                N/A
 Person.uContactType                                               trigger                                       N/A
 Purchasing.vVendor                                                view                                          N/A
 Sales.vStoreWithDemographics                                      view                                          N/A


Table: 'Person.CountryRegion'
3 fields. 122 bytes.

Lookup table containing the ISO standard codes for countries and regions.

 Field Name                Data Type          Size             Original             Default           Nullable        Description     Check
                                                               Type
 CountryRegionCode         nvarchar           3                                                       Not null        ISO
                                                                                                                      standard
                                                                                                                      code for
                                                                                                                      countries
                                                                                                                      and regions.
 Name                      Name                                nvarchar(50)                           Not null        Country or
                                                                                                                      region name.
 ModifiedDate              datetime                                                 getdate()         Not null        Date and
                                                                                                                      time the
                                                                                                                      record was
                                                                                                                      last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Person.CountryRegion'
 Primary Key Name                                                                             Field Name
 PK_CountryRegion_CountryRegionCode                                                           CountryRegionCode
There are no Foreign Keys for this table.

Indexes for table 'Person.CountryRegion', 2 items

 Index Name                             Description                   Clustered                   Unique                       Fields
 PK_CountryRegion_CountryRegion         Clustered index               Yes                         Yes                          CountryRegionCode
 Code                                   created by a primary
                                        key constraint.
 AK_CountryRegion_Name                  Unique nonclustered           No                          Yes                          Name
                                        index.

Triggers for table 'Person.CountryRegion', 1 item

 Name                                              Description                          Type                             Enabled
 uCountryRegion                                    AFTER UPDATE trigger                 after Update                     Yes
                                                   setting the ModifiedDate
                                                   column in the
                                                   CountryRegion table to the
                                                   current date.

Dependencies for table 'Person.CountryRegion', 7 items

 Object Name                                                       Type                                           Field Name
 HumanResources.vEmployee                                          view                                           N/A
 Person.uCountryRegion                                             trigger                                        N/A
 Person.vStateProvinceCountryRegion                                view                                           N/A
 Purchasing.vVendor                                                view                                           N/A
 Sales.vIndividualCustomer                                         view                                           N/A
 Sales.vSalesPerson                                                view                                           N/A
 Sales.vStoreWithDemographics                                      view                                           N/A


Table: 'Person.StateProvince'
8 fields. 153 bytes.

State and province lookup table.

 Field Name              Data Type          Size             Original             Default              Nullable        Description    Check
                                                             Type
 StateProvinceID         int identity                        int                                       Not null        Primary key
                                                                                                                       for
                                                                                                                       StateProvinc
                                                                                                                       e records.
 StateProvinceCode       nchar              3                                                          Not null        ISO
                                                                                                                       standard
                                                                                                                       state or
                                                                                                                       province
                                                                                                                       code.
 CountryRegionCode       nvarchar           3                                                          Not null        ISO
                                                                                                                       standard
                                                                                                                       country or
                                                                                                                       region code.
                                                                                                                       Foreign key
                                                                                                                       to
                                                                                                                       CountryRegi
                                                                                                                       on.CountryR
                                                                                                                       egionCode.
 IsOnlyStateProvinceF    Flag                                bit                  (1)                  Not null        0=
 lag                                                                                                                   StateProvinc
                                                                                                                  eCode
                                                                                                                  exists. 1 =
                                                                                                                  StateProvinc
                                                                                                                  eCode
                                                                                                                  unavailable,
                                                                                                                  using
                                                                                                                  CountryRegi
                                                                                                                  onCode.
 Name                     Name                              nvarchar(50)                         Not null         State or
                                                                                                                  province
                                                                                                                  description.
 TerritoryID              int                                                                    Not null         ID of the
                                                                                                                  territory in
                                                                                                                  which the
                                                                                                                  state or
                                                                                                                  province is
                                                                                                                  located.
                                                                                                                  Foreign key
                                                                                                                  to
                                                                                                                  SalesTerritor
                                                                                                                  y.SalesTerrit
                                                                                                                  oryID.
 rowguid                  uniqueidentif                                         newid()          Not null         ROWGUIDC
                          ier                                                                                     OL number
                                                                                                                  uniquely
                                                                                                                  identifying
                                                                                                                  the record.
                                                                                                                  Used to
                                                                                                                  support a
                                                                                                                  merge
                                                                                                                  replication
                                                                                                                  sample.
 ModifiedDate             datetime                                              getdate()        Not null         Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Person.StateProvince'

 Primary Key Name                                                                           Field Name
 PK_StateProvince_StateProvinceID                                                           StateProvinceID

Foreign keys for table 'Person.StateProvince', 2 items

 Foreign                                                         Primary                                    Key Name
 StateProvince.CountryRegionCode                                 CountryRegion.CountryRegionCode            FK_StateProvince_CountryRegion_
                                                                                                            CountryRegionCode
 StateProvince.TerritoryID                                       SalesTerritory.TerritoryID                 FK_StateProvince_SalesTerritory_T
                                                                                                            erritoryID

Indexes for table 'Person.StateProvince', 4 items

 Index Name                               Description               Clustered                   Unique                   Fields
 PK_StateProvince_StateProvinceI          Clustered index           Yes                         Yes                      StateProvinceID
 D                                        created by a primary
                                          key constraint.
 AK_StateProvince_Name                    Unique nonclustered       No                          Yes                      Name
                                          index.
 AK_StateProvince_rowguid                 Unique nonclustered       No                          Yes                      rowguid
                                          index. Used to
                                      support replication
                                      samples.
 AK_StateProvince_StateProvinceC      Unique nonclustered       No                       Yes                          StateProvinceCode,
 ode_CountryRegionCode                index.                                                                          CountryRegionCode

Triggers for table 'Person.StateProvince', 1 item

 Name                                          Description                     Type                             Enabled
 uStateProvince                                AFTER UPDATE trigger            after Update                     Yes
                                               setting the ModifiedDate
                                               column in the
                                               StateProvince table to the
                                               current date.

Dependencies for table 'Person.StateProvince', 7 items

 Object Name                                                Type                                         Field Name
 HumanResources.vEmployee                                   view                                         N/A
 Person.uStateProvince                                      trigger                                      N/A
 Person.vStateProvinceCountryRegion                         view                                         N/A
 Purchasing.vVendor                                         view                                         N/A
 Sales.vIndividualCustomer                                  view                                         N/A
 Sales.vSalesPerson                                         view                                         N/A
 Sales.vStoreWithDemographics                               view                                         N/A


Table: 'Production.BillOfMaterials'
9 fields. 78 bytes.

Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical
relationship between a parent product and its components.

 Field Name            Data Type        Size             Original           Default           Nullable        Description      Check
                                                         Type
 BillOfMaterialsID     int identity                      int                                  Not null        Primary key
                                                                                                              for
                                                                                                              BillOfMateria
                                                                                                              ls records.
 ProductAssemblyID     int                                                                    Null            Parent
                                                                                                              product
                                                                                                              identification
                                                                                                              number.
                                                                                                              Foreign key
                                                                                                              to
                                                                                                              Product.Prod
                                                                                                              uctID.
 ComponentID           int                                                                    Not null        Component
                                                                                                              identification
                                                                                                              number.
                                                                                                              Foreign key
                                                                                                              to
                                                                                                              Product.Prod
                                                                                                              uctID.
 StartDate             datetime                                             getdate()         Not null        Date the
                                                                                                              component
                                                                                                              started being
                                                                                                              used in the
                                                                                                              assembly
                                                                                                              item.
 EndDate               datetime                                                               Null            Date the
                                                                                                              component
                                                                                                              stopped
                                                                                                                  being used
                                                                                                                  in the
                                                                                                                  assembly
                                                                                                                  item.
 UnitMeasureCode          nchar            3                                                     Not null         Standard
                                                                                                                  code
                                                                                                                  identifying
                                                                                                                  the unit of
                                                                                                                  measure for
                                                                                                                  the quantity.
 BOMLevel                 smallint                                                               Not null         Indicates the
                                                                                                                  depth the
                                                                                                                  component
                                                                                                                  is from its
                                                                                                                  parent
                                                                                                                  (AssemblyID
                                                                                                                  ).
 PerAssemblyQty           decimal          8,2                                 (1.00)            Not null         Quantity of     ([PerAssemb
                                                                                                                  the             lyQty]>=(1.0
                                                                                                                  component       0))
                                                                                                                  needed to
                                                                                                                  create the
                                                                                                                  assembly.
 ModifiedDate             datetime                                             getdate()         Not null         Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.BillOfMaterials'

 Primary Key Name                                                                          Field Name
 PK_BillOfMaterials_BillOfMaterialsID                                                      BillOfMaterialsID

Foreign keys for table 'Production.BillOfMaterials', 3 items

 Foreign                                                        Primary                                     Key Name
 BillOfMaterials.ProductAssemblyID                              Product.ProductID                           FK_BillOfMaterials_Product_Product
                                                                                                            AssemblyID
 BillOfMaterials.ComponentID                                    Product.ProductID                           FK_BillOfMaterials_Product_Compo
                                                                                                            nentID
 BillOfMaterials.UnitMeasureCode                                UnitMeasure.UnitMeasureCode                 FK_BillOfMaterials_UnitMeasure_U
                                                                                                            nitMeasureCode

Indexes for table 'Production.BillOfMaterials', 3 items

 Index Name                              Description               Clustered                   Unique                    Fields
 AK_BillOfMaterials_ProductAssem         Clustered index.          Yes                         Yes                       ProductAssemblyID,
 blyID_ComponentID_StartDate                                                                                             ComponentID,
                                                                                                                         StartDate
 PK_BillOfMaterials_BillOfMaterialsI     Nonclustered index        No                          Yes                       BillOfMaterialsID
 D                                       created by a primary
                                         key constraint.
 IX_BillOfMaterials_UnitMeasureCo        Nonclustered index.       No                          No                        UnitMeasureCode
 de

Triggers for table 'Production.BillOfMaterials', 1 item

 Name                                            Description                      Type                              Enabled
 uBillOfMaterials                                AFTER UPDATE trigger             after Update                      Yes
                                                     setting the ModifiedDate
                                                     column in the
                                                     BillOfMaterials table to the
                                                     current date.

Dependencies for table 'Production.BillOfMaterials', 7 items

 Object Name                                                       Type                                          Field Name
 dbo.uspGetBillOfMaterials                                         stored procedure                              N/A
 dbo.uspGetWhereUsedProductID                                      stored procedure                              N/A
 Production.CK_BillOfMaterials_BOMLevel                            check cns                                     N/A
 Production.CK_BillOfMaterials_EndDate                             check cns                                     N/A
 Production.CK_BillOfMaterials_PerAssemblyQty                      check cns                                     N/A
 Production.CK_BillOfMaterials_ProductAssemblyID                   check cns                                     N/A
 Production.uBillOfMaterials                                       trigger                                       N/A


Table: 'Production.Culture'
3 fields. 128 bytes.

Lookup table containing the languages in which some AdventureWorks data is stored.

 Field Name                Data Type          Size              Original            Default           Nullable        Description     Check
                                                                Type
 CultureID                 nchar              6                                                       Not null        Primary key
                                                                                                                      for Culture
                                                                                                                      records.
 Name                      Name                                 nvarchar(50)                          Not null        Culture
                                                                                                                      description.
 ModifiedDate              datetime                                                 getdate()         Not null        Date and
                                                                                                                      time the
                                                                                                                      record was
                                                                                                                      last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.Culture'

 Primary Key Name                                                                               Field Name
 PK_Culture_CultureID                                                                           CultureID
There are no Foreign Keys for this table.

Indexes for table 'Production.Culture', 2 items

 Index Name                                 Description                Clustered                   Unique                     Fields
 PK_Culture_CultureID                       Clustered index            Yes                         Yes                        CultureID
                                            created by a primary
                                            key constraint.
 AK_Culture_Name                            Unique nonclustered        No                          Yes                        Name
                                            index.

Triggers for table 'Production.Culture', 1 item

 Name                                                Description                       Type                             Enabled
 uCulture                                            AFTER UPDATE trigger              after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Culture table
                                                     to the current date.
Dependencies for table 'Production.Culture', 1 item

 Object Name                                         Type                                 Field Name
 Production.uCulture                                 trigger                              N/A


Table: 'Production.Document'
10 fields. 951 bytes.

Product maintenance documents.

 Field Name                Data Type        Size   Original    Default         Nullable        Description     Check
                                                   Type
 DocumentID                int identity            int                         Not null        Primary key
                                                                                               for
                                                                                               Document
                                                                                               records.
 Title                     nvarchar         50                                 Not null        Title of the
                                                                                               document.
 FileName                  nvarchar         400                                Not null        Directory
                                                                                               path and file
                                                                                               name of the
                                                                                               document
 FileExtension             nvarchar         8                                  Not null        File
                                                                                               extension
                                                                                               indicating
                                                                                               the
                                                                                               document
                                                                                               type. For
                                                                                               example,
                                                                                               .doc or .txt.
 Revision                  nchar            5                                  Not null        Revision
                                                                                               number of
                                                                                               the
                                                                                               document.
 ChangeNumber              int                                 (0)             Not null        Engineering
                                                                                               change
                                                                                               approval
                                                                                               number.
 Status                    tinyint                                             Not null        1 = Pending     ([Status]>=(1
                                                                                               approval, 2 =   ) AND
                                                                                               Approved, 3     [Status]<=(3)
                                                                                               = Obsolete      )
 DocumentSummary           nvarchar         max                                Null            Document
                                                                                               abstract.
 Document                  varbinary                                           Null            Complete
                                                                                               document.
 ModifiedDate              datetime                            getdate()       Not null        Date and
                                                                                               time the
                                                                                               record was
                                                                                               last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.Document'

 Primary Key Name                                                          Field Name
 PK_Document_DocumentID                                                    DocumentID
There are no Foreign Keys for this table.

Indexes for table 'Production.Document', 2 items
 Index Name                                 Description                Clustered                    Unique                   Fields
 PK_Document_DocumentID                     Clustered index            Yes                          Yes                      DocumentID
                                            created by a primary
                                            key constraint.
 AK_Document_FileName_Revision              Unique nonclustered        No                           Yes                      FileName, Revision
                                            index.

Triggers for table 'Production.Document', 1 item

 Name                                                Description                      Type                             Enabled
 uDocument                                           AFTER UPDATE trigger             after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Document
                                                     table to the current date.

Dependencies for table 'Production.Document', 2 items

 Object Name                                                       Type                                         Field Name
 Production.CK_Document_Status                                     check cns                                    N/A
 Production.uDocument                                              trigger                                      N/A


Table: 'Production.Illustration'
3 fields. 20 bytes.

Bicycle assembly diagrams.

 Field Name                Data Type          Size              Original           Default           Nullable        Description       Check
                                                                Type
 IllustrationID            int identity                         int                                  Not null        Primary key
                                                                                                                     for
                                                                                                                     Illustration
                                                                                                                     records.
 Diagram                   xml                                                                       Null            Illustrations
                                                                                                                     used in
                                                                                                                     manufacturin
                                                                                                                     g
                                                                                                                     instructions.
                                                                                                                     Stored as
                                                                                                                     XML.
 ModifiedDate              datetime                                                getdate()         Not null        Date and
                                                                                                                     time the
                                                                                                                     record was
                                                                                                                     last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.Illustration'

 Primary Key Name                                                                              Field Name
 PK_Illustration_IllustrationID                                                                IllustrationID
There are no Foreign Keys for this table.

Indexes for table 'Production.Illustration', 1 item

 Index Name                                 Description                Clustered                    Unique                   Fields
 PK_Illustration_IllustrationID             Clustered index            Yes                          Yes                      IllustrationID
                                            created by a primary
                                            key constraint.

Triggers for table 'Production.Illustration', 1 item

 Name                                                Description                      Type                             Enabled
 uIllustration                                       AFTER UPDATE trigger             after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Illustration
                                                     table to the current date.

Dependencies for table 'Production.Illustration', 1 item

 Object Name                                                       Type                                         Field Name
 Production.uIllustration                                          trigger                                      N/A


Table: 'Production.Location'
5 fields. 140 bytes.

Product inventory and manufacturing locations.

 Field Name                 Data Type         Size              Original           Default           Nullable        Description     Check
                                                                Type
 LocationID                 smallint                            smallint                             Not null        Primary key
                            identity                                                                                 for Location
                                                                                                                     records.
 Name                       Name                                nvarchar(50)                         Not null        Location
                                                                                                                     description.
 CostRate                   smallmoney        10,4              decimal(10,4       (0.00)            Not null        Standard        ([CostRate]>
                                                                )                                                    hourly cost     =(0.00))
                                                                                                                     of the
                                                                                                                     manufacturin
                                                                                                                     g location.
 Availability               decimal           8,2                                  (0.00)            Not null        Work            ([Availability]
                                                                                                                     capacity (in    >=(0.00))
                                                                                                                     hours) of the
                                                                                                                     manufacturin
                                                                                                                     g location.
 ModifiedDate               datetime                                               getdate()         Not null        Date and
                                                                                                                     time the
                                                                                                                     record was
                                                                                                                     last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.Location'

 Primary Key Name                                                                              Field Name
 PK_Location_LocationID                                                                        LocationID
There are no Foreign Keys for this table.

Indexes for table 'Production.Location', 2 items

 Index Name                                 Description                Clustered                  Unique                     Fields
 PK_Location_LocationID                     Clustered index            Yes                        Yes                        LocationID
                                            created by a primary
                                            key constraint.
 AK_Location_Name                           Unique nonclustered        No                         Yes                        Name
                                            index.
Triggers for table 'Production.Location', 1 item

 Name                                          Description                        Type                             Enabled
 uLocation                                     AFTER UPDATE trigger               after Update                     Yes
                                               setting the ModifiedDate
                                               column in the Location
                                               table to the current date.

Dependencies for table 'Production.Location', 3 items

 Object Name                                                    Type                                        Field Name
 Production.CK_Location_Availability                            check cns                                   N/A
 Production.CK_Location_CostRate                                check cns                                   N/A
 Production.uLocation                                           trigger                                     N/A


Table: 'Production.Product'
25 fields. 368 bytes.

Products sold or used in the manfacturing of sold products.

 Field Name              Data Type      Size              Original          Default              Nullable        Description      Check
                                                          Type
 ProductID               int identity                     int                                    Not null        Primary key
                                                                                                                 for Product
                                                                                                                 records.
 Name                    Name                             nvarchar(50)                           Not null        Name of the
                                                                                                                 product.
 ProductNumber           nvarchar       25                                                       Not null        Unique
                                                                                                                 product
                                                                                                                 identification
                                                                                                                 number.
 MakeFlag                Flag                             bit               (1)                  Not null        0 = Product
                                                                                                                 is
                                                                                                                 purchased, 1
                                                                                                                 = Product is
                                                                                                                 manufacture
                                                                                                                 d in-house.
 FinishedGoodsFlag       Flag                             bit               (1)                  Not null        0 = Product
                                                                                                                 is not a
                                                                                                                 salable item.
                                                                                                                 1 = Product
                                                                                                                 is salable.
 Color                   nvarchar       15                                                       Null            Product
                                                                                                                 color.
 SafetyStockLevel        smallint                                                                Not null        Minimum          ([SafetyStoc
                                                                                                                 inventory        kLevel]>(0))
                                                                                                                 quantity.
 ReorderPoint            smallint                                                                Not null        Inventory        ([ReorderPoi
                                                                                                                 level that       nt]>(0))
                                                                                                                 triggers a
                                                                                                                 purchase
                                                                                                                 order or
                                                                                                                 work order.
 StandardCost            money          19,4              decimal(19,4                           Not null        Standard         ([StandardC
                                                          )                                                      cost of the      ost]>=(0.00))
                                                                                                                 product.
 ListPrice               money          19,4              decimal(19,4                           Not null        Selling price.   ([ListPrice]>
                                                          )                                                                       =(0.00))
 Size                    nvarchar       5                                                        Null            Product size.
 SizeUnitMeasureCod      nchar          3                                                        Null            Unit of
e                                                 measure for
                                                  Size column.
WeightUnitMeasureC    nchar      3     Null       Unit of
ode                                               measure for
                                                  Weight
                                                  column.
Weight                decimal    8,2   Null       Product         ([Weight]>(0.
                                                  weight.         00))
DaysToManufacture     int              Not null   Number of       ([DaysToMa
                                                  days            nufacture]>=
                                                  required to     (0))
                                                  manufacture
                                                  the product.
ProductLine           nchar      2     Null       R = Road, M     (upper([Prod
                                                  = Mountain,     uctLine])='R'
                                                  T = Touring,    OR
                                                  S = Standard    upper([Produ
                                                                  ctLine])='M'
                                                                  OR
                                                                  upper([Produ
                                                                  ctLine])='T'
                                                                  OR
                                                                  upper([Produ
                                                                  ctLine])='S'
                                                                  OR
                                                                  [ProductLine
                                                                  ] IS NULL)
Class                 nchar      2     Null       H = High, M     (upper([Clas
                                                  = Medium, L     s])='H' OR
                                                  = Low           upper([Class
                                                                  ])='M' OR
                                                                  upper([Class
                                                                  ])='L' OR
                                                                  [Class] IS
                                                                  NULL)
Style                 nchar      2     Null       W=              (upper([Style
                                                  Womens, M       ])='U' OR
                                                  = Mens, U =     upper([Style]
                                                  Universal       )='M' OR
                                                                  upper([Style]
                                                                  )='W' OR
                                                                  [Style] IS
                                                                  NULL)
ProductSubcategoryI   int              Null       Product is a
D                                                 member of
                                                  this product
                                                  subcategory.
                                                  Foreign key
                                                  to
                                                  ProductSub
                                                  Category.Pr
                                                  oductSubCat
                                                  egoryID.
ProductModelID        int              Null       Product is a
                                                  member of
                                                  this product
                                                  model.
                                                  Foreign key
                                                  to
                                                  ProductMod
                                                  el.ProductM
                                                  odelID.
SellStartDate         datetime         Not null   Date the
                                                  product was
                                                  available for
                                                  sale.
 SellEndDate              datetime                                                               Null            Date the
                                                                                                                 product was
                                                                                                                 no longer
                                                                                                                 available for
                                                                                                                 sale.
 DiscontinuedDate         datetime                                                               Null            Date the
                                                                                                                 product was
                                                                                                                 discontinued
                                                                                                                 .
 rowguid                  uniqueidentif                                         newid()          Not null        ROWGUIDC
                          ier                                                                                    OL number
                                                                                                                 uniquely
                                                                                                                 identifying
                                                                                                                 the record.
                                                                                                                 Used to
                                                                                                                 support a
                                                                                                                 merge
                                                                                                                 replication
                                                                                                                 sample.
 ModifiedDate             datetime                                              getdate()        Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.Product'

 Primary Key Name                                                                           Field Name
 PK_Product_ProductID                                                                       ProductID

Foreign keys for table 'Production.Product', 4 items

 Foreign                                                         Primary                                    Key Name
 Product.ProductModelID                                          ProductModel.ProductModelID                FK_Product_ProductModel_Product
                                                                                                            ModelID
 Product.ProductSubcategoryID                                    ProductSubcategory.ProductSubcat           FK_Product_ProductSubcategory_P
                                                                 egoryID                                    roductSubcategoryID
 Product.SizeUnitMeasureCode                                     UnitMeasure.UnitMeasureCode                FK_Product_UnitMeasure_SizeUnit
                                                                                                            MeasureCode
 Product.WeightUnitMeasureCode                                   UnitMeasure.UnitMeasureCode                FK_Product_UnitMeasure_WeightU
                                                                                                            nitMeasureCode

Indexes for table 'Production.Product', 4 items

 Index Name                               Description               Clustered                  Unique                   Fields
 PK_Product_ProductID                     Clustered index           Yes                        Yes                      ProductID
                                          created by a primary
                                          key constraint.
 AK_Product_Name                          Unique nonclustered       No                         Yes                      Name
                                          index.
 AK_Product_ProductNumber                 Unique nonclustered       No                         Yes                      ProductNumber
                                          index.
 AK_Product_rowguid                       Unique nonclustered       No                         Yes                      rowguid
                                          index. Used to
                                          support replication
                                          samples.

Triggers for table 'Production.Product', 1 item

 Name                                             Description                      Type                            Enabled
 uProduct                                        AFTER UPDATE trigger             after Update                     Yes
                                                 setting the ModifiedDate
                                                 column in the Product table
                                                 to the current date.

Dependencies for table 'Production.Product', 17 items

 Object Name                                                  Type                                          Field Name
 dbo.ufnGetProductDealerPrice                                 scalar function                               N/A
 dbo.ufnGetProductListPrice                                   scalar function                               N/A
 dbo.ufnGetProductStandardCost                                scalar function                               N/A
 dbo.uspGetBillOfMaterials                                    stored procedure                              N/A
 dbo.uspGetWhereUsedProductID                                 stored procedure                              N/A
 Production.CK_Product_Class                                  check cns                                     N/A
 Production.CK_Product_DaysToManufacture                      check cns                                     N/A
 Production.CK_Product_ListPrice                              check cns                                     N/A
 Production.CK_Product_ProductLine                            check cns                                     N/A
 Production.CK_Product_ReorderPoint                           check cns                                     N/A
 Production.CK_Product_SafetyStockLevel                       check cns                                     N/A
 Production.CK_Product_SellEndDate                            check cns                                     N/A
 Production.CK_Product_StandardCost                           check cns                                     N/A
 Production.CK_Product_Style                                  check cns                                     N/A
 Production.CK_Product_Weight                                 check cns                                     N/A
 Production.uProduct                                          trigger                                       N/A
 Production.vProductAndDescription                            view                                          N/A


Table: 'Production.ProductCategory'
4 fields. 136 bytes.

High-level product categorization.

 Field Name               Data Type       Size             Original            Default           Nullable        Description     Check
                                                           Type
 ProductCategoryID        int identity                     int                                   Not null        Primary key
                                                                                                                 for
                                                                                                                 ProductCate
                                                                                                                 gory records.
 Name                     Name                             nvarchar(50)                          Not null        Category
                                                                                                                 description.
 rowguid                  uniqueidentif                                        newid()           Not null        ROWGUIDC
                          ier                                                                                    OL number
                                                                                                                 uniquely
                                                                                                                 identifying
                                                                                                                 the record.
                                                                                                                 Used to
                                                                                                                 support a
                                                                                                                 merge
                                                                                                                 replication
                                                                                                                 sample.
 ModifiedDate             datetime                                             getdate()         Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductCategory'

 Primary Key Name                                                                          Field Name
 PK_ProductCategory_ProductCategoryID                                                      ProductCategoryID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductCategory', 3 items

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_ProductCategory_ProductCate          Clustered index           Yes                         Yes                       ProductCategoryID
 goryID                                  created by a primary
                                         key constraint.
 AK_ProductCategory_Name                 Unique nonclustered       No                          Yes                       Name
                                         index.
 AK_ProductCategory_rowguid              Unique nonclustered       No                          Yes                       rowguid
                                         index. Used to
                                         support replication
                                         samples.

Triggers for table 'Production.ProductCategory', 1 item

 Name                                              Description                    Type                             Enabled
 uProductCategory                                  AFTER UPDATE trigger           after Update                     Yes
                                                   setting the ModifiedDate
                                                   column in the
                                                   ProductCategory table to
                                                   the current date.

Dependencies for table 'Production.ProductCategory', 1 item

 Object Name                                                    Type                                        Field Name
 Production.uProductCategory                                    trigger                                     N/A


Table: 'Production.ProductCostHistory'
5 fields. 73 bytes.

Changes in the cost of a product over time.

 Field Name               Data Type         Size             Original          Default           Nullable        Description       Check
                                                             Type
 ProductID                int                                                                    Not null        Product
                                                                                                                 identification
                                                                                                                 number.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Product.Prod
                                                                                                                 uctID
 StartDate                datetime                                                               Not null        Product cost
                                                                                                                 start date.
 EndDate                  datetime                                                               Null            Product cost
                                                                                                                 end date.
 StandardCost             money             19,4             decimal(19,4                        Not null        Standard          ([StandardC
                                                             )                                                   cost of the       ost]>=(0.00))
                                                                                                                 product.
 ModifiedDate             datetime                                             getdate()         Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductCostHistory'
 Primary Key Name                                                                       Field Names
 PK_ProductCostHistory_ProductID_StartDate                                              ProductID, StartDate

Foreign keys for table 'Production.ProductCostHistory', 1 item

 Foreign                                                       Primary                                     Key Name
 ProductCostHistory.ProductID                                  Product.ProductID                           FK_ProductCostHistory_Product_Pr
                                                                                                           oductID

Indexes for table 'Production.ProductCostHistory', 1 item

 Index Name                             Description               Clustered                 Unique                      Fields
 PK_ProductCostHistory_ProductID        Clustered index           Yes                       Yes                         ProductID, StartDate
 _StartDate                             created by a primary
                                        key constraint.

Triggers for table 'Production.ProductCostHistory', 1 item

 Name                                            Description                     Type                             Enabled
 uProductCostHistory                             AFTER UPDATE trigger            after Update                     Yes
                                                 setting the ModifiedDate
                                                 column in the
                                                 ProductCostHistory table to
                                                 the current date.

Dependencies for table 'Production.ProductCostHistory', 4 items

 Object Name                                                   Type                                        Field Name
 dbo.ufnGetProductStandardCost                                 scalar function                             N/A
 Production.CK_ProductCostHistory_EndDate                      check cns                                   N/A
 Production.CK_ProductCostHistory_StandardCost                 check cns                                   N/A
 Production.uProductCostHistory                                trigger                                     N/A


Table: 'Production.ProductDescription'
4 fields. 836 bytes.

Product descriptions in several languages.

 Field Name             Data Type         Size             Original           Default           Nullable         Description    Check
                                                           Type
 ProductDescriptionID   int identity                       int                                  Not null         Primary key
                                                                                                                 for
                                                                                                                 ProductDesc
                                                                                                                 ription
                                                                                                                 records.
 Description            nvarchar          400                                                   Not null         Description
                                                                                                                 of the
                                                                                                                 product.
 rowguid                uniqueidentif                                         newid()           Not null         ROWGUIDC
                        ier                                                                                      OL number
                                                                                                                 uniquely
                                                                                                                 identifying
                                                                                                                 the record.
                                                                                                                 Used to
                                                                                                                 support a
                                                                                                                 merge
                                                                                                                 replication
                                                                                                                 sample.
 ModifiedDate             datetime                                              getdate()         Not null         Date and
                                                                                                                   time the
                                                                                                                   record was
                                                                                                                   last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductDescription'

 Primary Key Name                                                                           Field Name
 PK_ProductDescription_ProductDescriptionID                                                 ProductDescriptionID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductDescription', 2 items

 Index Name                              Description               Clustered                    Unique                     Fields
 PK_ProductDescription_ProductDe         Clustered index           Yes                          Yes                        ProductDescriptionID
 scriptionID                             created by a primary
                                         key constraint.
 AK_ProductDescription_rowguid           Unique nonclustered       No                           Yes                        rowguid
                                         index. Used to
                                         support replication
                                         samples.

Triggers for table 'Production.ProductDescription', 1 item

 Name                                             Description                      Type                              Enabled
 uProductDescription                              AFTER UPDATE trigger             after Update                      Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  ProductDescription table to
                                                  the current date.

Dependencies for table 'Production.ProductDescription', 2 items

 Object Name                                                    Type                                         Field Name
 Production.uProductDescription                                 trigger                                      N/A
 Production.vProductAndDescription                              view                                         N/A


Table: 'Production.ProductDocument'
3 fields. 24 bytes.

Cross-reference table mapping products to related product documents.

 Field Name               Data Type        Size             Original            Default           Nullable         Description       Check
                                                            Type
 ProductID                int                                                                     Not null         Product
                                                                                                                   identification
                                                                                                                   number.
                                                                                                                   Foreign key
                                                                                                                   to
                                                                                                                   Product.Prod
                                                                                                                   uctID.
 DocumentID               int                                                                     Not null         Document
                                                                                                                   identification
                                                                                                                   number.
                                                                                                                   Foreign key
                                                                                                                   to
                                                                                                                 Document.D
                                                                                                                 ocumentID.
 ModifiedDate             datetime                                             getdate()         Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductDocument'

 Primary Key Name                                                                          Field Names
 PK_ProductDocument_ProductID_DocumentID                                                   ProductID, DocumentID

Foreign keys for table 'Production.ProductDocument', 2 items

 Foreign                                                        Primary                                     Key Name
 ProductDocument.DocumentID                                     Document.DocumentID                         FK_ProductDocument_Document_D
                                                                                                            ocumentID
 ProductDocument.ProductID                                      Product.ProductID                           FK_ProductDocument_Product_Pro
                                                                                                            ductID

Indexes for table 'Production.ProductDocument', 1 item

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_ProductDocument_ProductID_           Clustered index           Yes                         Yes                       ProductID,
 DocumentID                              created by a primary                                                            DocumentID
                                         key constraint.

Triggers for table 'Production.ProductDocument', 1 item

 Name                                             Description                     Type                             Enabled
 uProductDocument                                 AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  ProductDocument table to
                                                  the current date.

Dependencies for table 'Production.ProductDocument', 1 item

 Object Name                                                    Type                                        Field Name
 Production.uProductDocument                                    trigger                                     N/A


Table: 'Production.ProductInventory'
7 fields. 61 bytes.

Product inventory information.

 Field Name               Data Type        Size            Original            Default           Nullable        Description      Check
                                                           Type
 ProductID                int                                                                    Not null        Product
                                                                                                                 identification
                                                                                                                 number.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Product.Prod
                                                                                                                 uctID.
 LocationID               smallint                                                               Not null           Inventory
                                                                                                                    location
                                                                                                                    identification
                                                                                                                    number.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Location.Loc
                                                                                                                    ationID.
 Shelf                    nvarchar          10                                                   Not null           Storage          ([Shelf] like
                                                                                                                    compartment      '[A-Za-z]' OR
                                                                                                                    within an        [Shelf]='N/A')
                                                                                                                    inventory
                                                                                                                    location.
 Bin                      tinyint                                                                Not null           Storage          ([Bin]>=(0)
                                                                                                                    container on     AND
                                                                                                                    a shelf in an    [Bin]<=(100))
                                                                                                                    inventory
                                                                                                                    location.
 Quantity                 smallint                                              (0)              Not null           Quantity of
                                                                                                                    products in
                                                                                                                    the inventory
                                                                                                                    location.
 rowguid                  uniqueidentif                                         newid()          Not null           ROWGUIDC
                          ier                                                                                       OL number
                                                                                                                    uniquely
                                                                                                                    identifying
                                                                                                                    the record.
                                                                                                                    Used to
                                                                                                                    support a
                                                                                                                    merge
                                                                                                                    replication
                                                                                                                    sample.
 ModifiedDate             datetime                                              getdate()        Not null           Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductInventory'

 Primary Key Name                                                                           Field Names
 PK_ProductInventory_ProductID_LocationID                                                   ProductID, LocationID

Foreign keys for table 'Production.ProductInventory', 2 items

 Foreign                                                         Primary                                    Key Name
 ProductInventory.LocationID                                     Location.LocationID                        FK_ProductInventory_Location_Loc
                                                                                                            ationID
 ProductInventory.ProductID                                      Product.ProductID                          FK_ProductInventory_Product_Prod
                                                                                                            uctID

Indexes for table 'Production.ProductInventory', 1 item

 Index Name                               Description               Clustered                   Unique                      Fields
 PK_ProductInventory_ProductID_L          Clustered index           Yes                         Yes                         ProductID, LocationID
 ocationID                                created by a primary
                                          key constraint.

Triggers for table 'Production.ProductInventory', 1 item
 Name                                             Description                     Type                              Enabled
 uProductInventory                                AFTER UPDATE trigger            after Update                      Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  ProductInventory table to
                                                  the current date.

Dependencies for table 'Production.ProductInventory', 4 items

 Object Name                                                    Type                                        Field Name
 dbo.ufnGetStock                                                scalar function                             N/A
 Production.CK_ProductInventory_Bin                             check cns                                   N/A
 Production.CK_ProductInventory_Shelf                           check cns                                   N/A
 Production.uProductInventory                                   trigger                                     N/A


Table: 'Production.ProductListPriceHistory'
5 fields. 73 bytes.

Changes in the list price of a product over time.

 Field Name               Data Type        Size             Original           Default           Nullable         Description      Check
                                                            Type
 ProductID                int                                                                    Not null         Product
                                                                                                                  identification
                                                                                                                  number.
                                                                                                                  Foreign key
                                                                                                                  to
                                                                                                                  Product.Prod
                                                                                                                  uctID
 StartDate                datetime                                                               Not null         List price
                                                                                                                  start date.
 EndDate                  datetime                                                               Null             List price
                                                                                                                  end date
 ListPrice                money            19,4             decimal(19,4                         Not null         Product list     ([ListPrice]>(
                                                            )                                                     price.           0.00))
 ModifiedDate             datetime                                             getdate()         Not null         Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductListPriceHistory'

 Primary Key Name                                                                          Field Names
 PK_ProductListPriceHistory_ProductID_StartDate                                            ProductID, StartDate

Foreign keys for table 'Production.ProductListPriceHistory', 1 item

 Foreign                                                        Primary                                     Key Name
 ProductListPriceHistory.ProductID                              Product.ProductID                           FK_ProductListPriceHistory_Product
                                                                                                            _ProductID

Indexes for table 'Production.ProductListPriceHistory', 1 item

 Index Name                              Description               Clustered                   Unique                     Fields
 PK_ProductListPriceHistory_Produ        Clustered index           Yes                         Yes                        ProductID, StartDate
 ctID_StartDate                          created by a primary
                                            key constraint.

Triggers for table 'Production.ProductListPriceHistory', 1 item

 Name                                                Description                     Type                             Enabled
 uProductListPriceHistory                            AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the
                                                     ProductListPriceHistory
                                                     table to the current date.

Dependencies for table 'Production.ProductListPriceHistory', 5 items

 Object Name                                                       Type                                        Field Name
 dbo.ufnGetProductDealerPrice                                      scalar function                             N/A
 dbo.ufnGetProductListPrice                                        scalar function                             N/A
 Production.CK_ProductListPriceHistory_EndDate                     check cns                                   N/A
 Production.CK_ProductListPriceHistory_ListPrice                   check cns                                   N/A
 Production.uProductListPriceHistory                               trigger                                     N/A


Table: 'Production.ProductModel'
6 fields. 136 bytes.

Product model classification.

 Field Name                 Data Type         Size              Original          Default           Nullable        Description     Check
                                                                Type
 ProductModelID             int identity                        int                                 Not null        Primary key
                                                                                                                    for
                                                                                                                    ProductMod
                                                                                                                    el records.
 Name                       Name                                nvarchar(50)                        Not null        Product
                                                                                                                    model
                                                                                                                    description.
 CatalogDescription         xml                                                                     Null            Detailed
                                                                                                                    product
                                                                                                                    catalog
                                                                                                                    information
                                                                                                                    in xml
                                                                                                                    format.
 Instructions               xml                                                                     Null            Manufacturin
                                                                                                                    g
                                                                                                                    instructions
                                                                                                                    in xml
                                                                                                                    format.
 rowguid                    uniqueidentif                                         newid()           Not null        ROWGUIDC
                            ier                                                                                     OL number
                                                                                                                    uniquely
                                                                                                                    identifying
                                                                                                                    the record.
                                                                                                                    Used to
                                                                                                                    support a
                                                                                                                    merge
                                                                                                                    replication
                                                                                                                    sample.
 ModifiedDate               datetime                                              getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductModel'

 Primary Key Name                                                                             Field Name
 PK_ProductModel_ProductModelID                                                               ProductModelID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductModel', 3 items

 Index Name                                 Description               Clustered                   Unique                     Fields
 PK_ProductModel_ProductModelID             Clustered index           Yes                         Yes                        ProductModelID
                                            created by a primary
                                            key constraint.
 AK_ProductModel_Name                       Unique nonclustered       No                          Yes                        Name
                                            index.
 AK_ProductModel_rowguid                    Unique nonclustered       No                          Yes                        rowguid
                                            index. Used to
                                            support replication
                                            samples.

Triggers for table 'Production.ProductModel', 1 item

 Name                                                Description                     Type                             Enabled
 uProductModel                                       AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the
                                                     ProductModel table to the
                                                     current date.

Dependencies for table 'Production.ProductModel', 4 items

 Object Name                                                       Type                                        Field Name
 Production.uProductModel                                          trigger                                     N/A
 Production.vProductAndDescription                                 view                                        N/A
 Production.vProductModelCatalogDescription                        view                                        N/A
 Production.vProductModelInstructions                              view                                        N/A


Table: 'Production.ProductModelIllustration'
3 fields. 24 bytes.

Cross-reference table mapping product models and illustrations.

 Field Name                Data Type          Size             Original           Default           Nullable        Description        Check
                                                               Type
 ProductModelID            int                                                                      Not null        Primary key.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    ProductMod
                                                                                                                    el.ProductM
                                                                                                                    odelID.
 IllustrationID            int                                                                      Not null        Primary key.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Illustration.Ill
                                                                                                                    ustrationID.
 ModifiedDate              datetime                                               getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                       last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductModelIllustration'

 Primary Key Name                                                                               Field Names
 PK_ProductModelIllustration_ProductModelID_IllustrationID                                      ProductModelID, IllustrationID

Foreign keys for table 'Production.ProductModelIllustration', 2 items

 Foreign                                                          Primary                                        Key Name
 ProductModelIllustration.IllustrationID                          Illustration.IllustrationID                    FK_ProductModelIllustration_Illustra
                                                                                                                 tion_IllustrationID
 ProductModelIllustration.ProductModelID                          ProductModel.ProductModelID                    FK_ProductModelIllustration_Produc
                                                                                                                 tModel_ProductModelID

Indexes for table 'Production.ProductModelIllustration', 1 item

 Index Name                                Description                Clustered                     Unique                       Fields
 PK_ProductModelIllustration_Prod          Clustered index            Yes                           Yes                          ProductModelID,
 uctModelID_IllustrationID                 created by a primary                                                                  IllustrationID
                                           key constraint.

Triggers for table 'Production.ProductModelIllustration', 1 item

 Name                                               Description                       Type                               Enabled
 uProductModelIllustration                          AFTER UPDATE trigger              after Update                       Yes
                                                    setting the ModifiedDate
                                                    column in the
                                                    ProductModelIllustration
                                                    table to the current date.

Dependencies for table 'Production.ProductModelIllustration', 1 item

 Object Name                                                      Type                                           Field Name
 Production.uProductModelIllustration                             trigger                                        N/A


Table: 'Production.ProductModelProductDescriptionCulture'
4 fields. 36 bytes.

Cross-reference table mapping product descriptions and the language the description is written
in.

 Field Name                Data Type         Size              Original           Default             Nullable         Description       Check
                                                               Type
 ProductModelID            int                                                                        Not null         Primary key.
                                                                                                                       Foreign key
                                                                                                                       to
                                                                                                                       ProductMod
                                                                                                                       el.ProductM
                                                                                                                       odelID.
 ProductDescriptionID      int                                                                        Not null         Primary key.
                                                                                                                       Foreign key
                                                                                                                       to
                                                                                                                       ProductDesc
                                                                                                                       ription.Produ
                                                                                                                    ctDescription
                                                                                                                    ID.
 CultureID                nchar            6                                                       Not null         Culture
                                                                                                                    identification
                                                                                                                    number.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Culture.Cultu
                                                                                                                    reID.
 ModifiedDate             datetime                                             getdate()           Not null         Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductModelProductDescriptionCulture'

 Primary Key Name                                                                          Field Names
 PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptio                 ProductModelID, ProductDescriptionID, CultureID
 nID_CultureID

Foreign keys for table 'Production.ProductModelProductDescriptionCulture', 3 items

 Foreign                                                        Primary                                       Key Name
 ProductModelProductDescriptionCulture.CultureID                Culture.CultureID                             FK_ProductModelProductDescriptio
                                                                                                              nCulture_Culture_CultureID
 ProductModelProductDescriptionCulture.ProductDescripti         ProductDescription.ProductDescripti           FK_ProductModelProductDescriptio
 onID                                                           onID                                          nCulture_ProductDescription_Produ
                                                                                                              ctDescriptionID
 ProductModelProductDescriptionCulture.ProductModelID           ProductModel.ProductModelID                   FK_ProductModelProductDescriptio
                                                                                                              nCulture_ProductModel_ProductMo
                                                                                                              delID

Indexes for table 'Production.ProductModelProductDescriptionCulture', 1 item

 Index Name                              Description               Clustered                   Unique                       Fields
 PK_ProductModelProductDescripti         Clustered index           Yes                         Yes                          ProductModelID,
 onCulture_ProductModelID_Produc         created by a primary                                                               ProductDescriptionID,
 tDescriptionID_CultureID                key constraint.                                                                    CultureID

Triggers for table 'Production.ProductModelProductDescriptionCulture', 1 item

 Name                                            Description                        Type                              Enabled
 uProductModelProductDescriptionCulture          AFTER UPDATE trigger               after Update                      Yes
                                                 setting the ModifiedDate
                                                 column in the
                                                 ProductModelProductDescr
                                                 iptionCulture table to the
                                                 current date.

Dependencies for table 'Production.ProductModelProductDescriptionCulture', 2 items

 Object Name                                                    Type                                          Field Name
 Production.uProductModelProductDescriptionCulture              trigger                                       N/A
 Production.vProductAndDescription                              view                                          N/A


Table: 'Production.ProductPhoto'
6 fields. 220 bytes.

Product images.

 Field Name                Data Type          Size             Original           Default           Nullable        Description     Check
                                                               Type
 ProductPhotoID            int identity                        int                                  Not null        Primary key
                                                                                                                    for
                                                                                                                    ProductPhot
                                                                                                                    o records.
 ThumbNailPhoto            varbinary                                                                Null            Small image
                                                                                                                    of the
                                                                                                                    product.
 ThumbnailPhotoFileN       nvarchar           50                                                    Null            Small image
 ame                                                                                                                file name.
 LargePhoto                varbinary                                                                Null            Large image
                                                                                                                    of the
                                                                                                                    product.
 LargePhotoFileName        nvarchar           50                                                    Null            Large image
                                                                                                                    file name.
 ModifiedDate              datetime                                               getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductPhoto'

 Primary Key Name                                                                             Field Name
 PK_ProductPhoto_ProductPhotoID                                                               ProductPhotoID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductPhoto', 1 item

 Index Name                                 Description               Clustered                   Unique                    Fields
 PK_ProductPhoto_ProductPhotoID             Clustered index           Yes                         Yes                       ProductPhotoID
                                            created by a primary
                                            key constraint.

Triggers for table 'Production.ProductPhoto', 1 item

 Name                                                Description                     Type                             Enabled
 uProductPhoto                                       AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the ProductPhoto
                                                     table to the current date.

Dependencies for table 'Production.ProductPhoto', 1 item

 Object Name                                                       Type                                        Field Name
 Production.uProductPhoto                                          trigger                                     N/A


Table: 'Production.ProductProductPhoto'
4 fields. 25 bytes.

Cross-reference table mapping products and product photos.
 Field Name               Data Type        Size             Original             Default              Nullable        Description      Check
                                                            Type
 ProductID                int                                                                         Not null        Product
                                                                                                                      identification
                                                                                                                      number.
                                                                                                                      Foreign key
                                                                                                                      to
                                                                                                                      Product.Prod
                                                                                                                      uctID.
 ProductPhotoID           int                                                                         Not null        Product
                                                                                                                      photo
                                                                                                                      identification
                                                                                                                      number.
                                                                                                                      Foreign key
                                                                                                                      to
                                                                                                                      ProductPhot
                                                                                                                      o.ProductPh
                                                                                                                      otoID.
 Primary                  Flag                              bit                  (0)                  Not null        0 = Photo is
                                                                                                                      not the
                                                                                                                      principal
                                                                                                                      image. 1 =
                                                                                                                      Photo is the
                                                                                                                      principal
                                                                                                                      image.
 ModifiedDate             datetime                                               getdate()            Not null        Date and
                                                                                                                      time the
                                                                                                                      record was
                                                                                                                      last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductProductPhoto'

 Primary Key Name                                                                            Field Names
 PK_ProductProductPhoto_ProductID_ProductPhotoID                                             ProductID, ProductPhotoID

Foreign keys for table 'Production.ProductProductPhoto', 2 items

 Foreign                                                          Primary                                        Key Name
 ProductProductPhoto.ProductID                                    Product.ProductID                              FK_ProductProductPhoto_Product_
                                                                                                                 ProductID
 ProductProductPhoto.ProductPhotoID                               ProductPhoto.ProductPhotoID                    FK_ProductProductPhoto_ProductP
                                                                                                                 hoto_ProductPhotoID

Indexes for table 'Production.ProductProductPhoto', 1 item

 Index Name                              Description                 Clustered                   Unique                       Fields
 PK_ProductProductPhoto_ProductI         Nonclustered index          No                          Yes                          ProductID,
 D_ProductPhotoID                        created by a primary                                                                 ProductPhotoID
                                         key constraint.

Triggers for table 'Production.ProductProductPhoto', 1 item

 Name                                             Description                          Type                             Enabled
 uProductProductPhoto                             AFTER UPDATE trigger                 after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  ProductProductPhoto table
                                                  to the current date.
Dependencies for table 'Production.ProductProductPhoto', 1 item

 Object Name                                      Type                                     Field Name
 Production.uProductProductPhoto                  trigger                                  N/A


Table: 'Production.ProductReview'
8 fields. 7944 bytes.

Customer reviews of products they have purchased.

 Field Name               Data Type      Size   Original       Default          Nullable        Description      Check
                                                Type
 ProductReviewID          int identity          int                             Not null        Primary key
                                                                                                for
                                                                                                ProductRevi
                                                                                                ew records.
 ProductID                int                                                   Not null        Product
                                                                                                identification
                                                                                                number.
                                                                                                Foreign key
                                                                                                to
                                                                                                Product.Prod
                                                                                                uctID.
 ReviewerName             Name                  nvarchar(50)                    Not null        Name of the
                                                                                                reviewer.
 ReviewDate               datetime                             getdate()        Not null        Date review
                                                                                                was
                                                                                                submitted.
 EmailAddress             nvarchar       50                                     Not null        Reviewer's
                                                                                                e-mail
                                                                                                address.
 Rating                   int                                                   Not null        Product          ([Rating]>=(1
                                                                                                rating given     ) AND
                                                                                                by the           [Rating]<=(5)
                                                                                                reviewer.        )
                                                                                                Scale is 1 to
                                                                                                5 with 5 as
                                                                                                the highest
                                                                                                rating.
 Comments                 nvarchar       3850                                   Null            Reviewer's
                                                                                                comments
 ModifiedDate             datetime                             getdate()        Not null        Date and
                                                                                                time the
                                                                                                record was
                                                                                                last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductReview'

 Primary Key Name                                                          Field Name
 PK_ProductReview_ProductReviewID                                          ProductReviewID

Foreign keys for table 'Production.ProductReview', 1 item

 Foreign                                          Primary                                  Key Name
 ProductReview.ProductID                          Product.ProductID                        FK_ProductReview_Product_Produc
                                                                                           tID
Indexes for table 'Production.ProductReview', 2 items

 Index Name                            Description               Clustered                Unique                       Fields
 PK_ProductReview_ProductRevie         Clustered index           Yes                      Yes                          ProductReviewID
 wID                                   created by a primary
                                       key constraint.
 IX_ProductReview_ProductID_Na         Nonclustered index.       No                       No                           ProductID,
 me                                                                                                                    ReviewerName

Triggers for table 'Production.ProductReview', 1 item

 Name                                           Description                     Type                             Enabled
 uProductReview                                 AFTER UPDATE trigger            after Update                     Yes
                                                setting the ModifiedDate
                                                column in the
                                                ProductReview table to the
                                                current date.

Dependencies for table 'Production.ProductReview', 2 items

 Object Name                                                  Type                                        Field Name
 Production.CK_ProductReview_Rating                           check cns                                   N/A
 Production.uProductReview                                    trigger                                     N/A


Table: 'Production.ProductSubcategory'
5 fields. 140 bytes.

Product subcategories. See ProductCategory table.

 Field Name            Data Type         Size             Original           Default           Nullable        Description      Check
                                                          Type
 ProductSubcategoryI   int identity                       int                                  Not null        Primary key
 D                                                                                                             for
                                                                                                               ProductSubc
                                                                                                               ategory
                                                                                                               records.
 ProductCategoryID     int                                                                     Not null        Product
                                                                                                               category
                                                                                                               identification
                                                                                                               number.
                                                                                                               Foreign key
                                                                                                               to
                                                                                                               ProductCate
                                                                                                               gory.Product
                                                                                                               CategoryID.
 Name                  Name                               nvarchar(50)                         Not null        Subcategory
                                                                                                               description.
 rowguid               uniqueidentif                                         newid()           Not null        ROWGUIDC
                       ier                                                                                     OL number
                                                                                                               uniquely
                                                                                                               identifying
                                                                                                               the record.
                                                                                                               Used to
                                                                                                               support a
                                                                                                               merge
                                                                                                               replication
                                                                                                               sample.
 ModifiedDate          datetime                                              getdate()         Not null        Date and
                                                                                                               time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ProductSubcategory'

 Primary Key Name                                                                          Field Name
 PK_ProductSubcategory_ProductSubcategoryID                                                ProductSubcategoryID

Foreign keys for table 'Production.ProductSubcategory', 1 item

 Foreign                                                        Primary                                     Key Name
 ProductSubcategory.ProductCategoryID                           ProductCategory.ProductCategoryID           FK_ProductSubcategory_ProductCa
                                                                                                            tegory_ProductCategoryID

Indexes for table 'Production.ProductSubcategory', 3 items

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_ProductSubcategory_ProductS          Clustered index           Yes                         Yes                       ProductSubcategoryI
 ubcategoryID                            created by a primary                                                            D
                                         key constraint.
 AK_ProductSubcategory_Name              Unique nonclustered       No                          Yes                       Name
                                         index.
 AK_ProductSubcategory_rowguid           Unique nonclustered       No                          Yes                       rowguid
                                         index. Used to
                                         support replication
                                         samples.

Triggers for table 'Production.ProductSubcategory', 1 item

 Name                                             Description                     Type                             Enabled
 uProductSubcategory                              AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  ProductSubcategory table
                                                  to the current date.

Dependencies for table 'Production.ProductSubcategory', 1 item

 Object Name                                                    Type                                        Field Name
 Production.uProductSubcategory                                 trigger                                     N/A


Table: 'Production.ScrapReason'
3 fields. 118 bytes.

Manufacturing failure reasons lookup table.

 Field Name               Data Type        Size             Original           Default           Nullable         Description      Check
                                                            Type
 ScrapReasonID            smallint                          smallint                             Not null         Primary key
                          identity                                                                                for
                                                                                                                  ScrapReaso
                                                                                                                  n records.
 Name                     Name                              nvarchar(50)                         Not null         Failure
                                                                                                                  description.
 ModifiedDate             datetime                                             getdate()         Not null         Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.ScrapReason'

 Primary Key Name                                                                           Field Name
 PK_ScrapReason_ScrapReasonID                                                               ScrapReasonID
There are no Foreign Keys for this table.

Indexes for table 'Production.ScrapReason', 2 items

 Index Name                                 Description               Clustered                Unique                       Fields
 PK_ScrapReason_ScrapReasonID               Clustered index           Yes                      Yes                          ScrapReasonID
                                            created by a primary
                                            key constraint.
 AK_ScrapReason_Name                        Unique nonclustered       No                       Yes                          Name
                                            index.

Triggers for table 'Production.ScrapReason', 1 item

 Name                                                Description                     Type                             Enabled
 uScrapReason                                        AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the ScrapReason
                                                     table to the current date.

Dependencies for table 'Production.ScrapReason', 1 item

 Object Name                                                       Type                                        Field Name
 Production.uScrapReason                                           trigger                                     N/A


Table: 'Production.TransactionHistory'
9 fields. 75 bytes.

Record of each purchase order, sales order, or work order transaction year to date.

 Field Name                Data Type          Size             Original           Default           Nullable        Description      Check
                                                               Type
 TransactionID             int identity                        int                                  Not null        Primary key
                                                                                                                    for
                                                                                                                    Transaction
                                                                                                                    History
                                                                                                                    records.
 ProductID                 int                                                                      Not null        Product
                                                                                                                    identification
                                                                                                                    number.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Product.Prod
                                                                                                                    uctID.
 ReferenceOrderID          int                                                                      Not null        Purchase
                                                                                                                    order, sales
                                                                                                                    order, or
                                                                                                                    work order
                                                                                                                    identification
                                                                                                                      number.
 ReferenceOrderLineI      int                                                   (0)                  Not null         Line number
 D                                                                                                                    associated
                                                                                                                      with the
                                                                                                                      purchase
                                                                                                                      order, sales
                                                                                                                      order, or
                                                                                                                      work order.
 TransactionDate          datetime                                              getdate()            Not null         Date and
                                                                                                                      time of the
                                                                                                                      transaction.
 TransactionType          nchar            1                                                         Not null         W=              (upper([Tran
                                                                                                                      WorkOrder,      sactionType]
                                                                                                                      S=              )='P' OR
                                                                                                                      SalesOrder,     upper([Trans
                                                                                                                      P=              actionType])
                                                                                                                      PurchaseOr      ='S' OR
                                                                                                                      der             upper([Trans
                                                                                                                                      actionType])
                                                                                                                                      ='W')
 Quantity                 int                                                                        Not null         Product
                                                                                                                      quantity.
 ActualCost               money            19,4             decimal(19,4                             Not null         Product cost.
                                                            )
 ModifiedDate             datetime                                              getdate()            Not null         Date and
                                                                                                                      time the
                                                                                                                      record was
                                                                                                                      last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.TransactionHistory'

 Primary Key Name                                                                           Field Name
 PK_TransactionHistory_TransactionID                                                        TransactionID

Foreign keys for table 'Production.TransactionHistory', 1 item

 Foreign                                                        Primary                                         Key Name
 TransactionHistory.ProductID                                   Product.ProductID                               FK_TransactionHistory_Product_Pro
                                                                                                                ductID

Indexes for table 'Production.TransactionHistory', 3 items

 Index Name                              Description               Clustered                    Unique                       Fields
 PK_TransactionHistory_Transactio        Clustered index           Yes                          Yes                          TransactionID
 nID                                     created by a primary
                                         key constraint.
 IX_TransactionHistory_ProductID         Nonclustered index.       No                           No                           ProductID
 IX_TransactionHistory_ReferenceO        Nonclustered index.       No                           No                           ReferenceOrderID,
 rderID_ReferenceOrderLineID                                                                                                 ReferenceOrderLineI
                                                                                                                             D

Triggers for table 'Production.TransactionHistory', 1 item

 Name                                             Description                         Type                             Enabled
 uTransactionHistory                              AFTER UPDATE trigger                after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  TransactionHistory table to
                                                  the current date.
Dependencies for table 'Production.TransactionHistory', 7 items

 Object Name                                          Type                                Field Name
 Production.CK_TransactionHistory_TransactionType     check cns                           N/A
 Production.iWorkOrder                                trigger                             N/A
 Production.uTransactionHistory                       trigger                             N/A
 Production.uWorkOrder                                trigger                             N/A
 Purchasing.iPurchaseOrderDetail                      trigger                             N/A
 Purchasing.uPurchaseOrderDetail                      trigger                             N/A
 Sales.iduSalesOrderDetail                            trigger                             N/A


Table: 'Production.TransactionHistoryArchive'
9 fields. 75 bytes.

Transactions for previous years.

 Field Name             Data Type      Size         Original       Default     Nullable        Description      Check
                                                    Type
 TransactionID          int                                                    Not null        Primary key
                                                                                               for
                                                                                               Transaction
                                                                                               HistoryArchi
                                                                                               ve records.
 ProductID              int                                                    Not null        Product
                                                                                               identification
                                                                                               number.
                                                                                               Foreign key
                                                                                               to
                                                                                               Product.Prod
                                                                                               uctID.
 ReferenceOrderID       int                                                    Not null        Purchase
                                                                                               order, sales
                                                                                               order, or
                                                                                               work order
                                                                                               identification
                                                                                               number.
 ReferenceOrderLineI    int                                        (0)         Not null        Line number
 D                                                                                             associated
                                                                                               with the
                                                                                               purchase
                                                                                               order, sales
                                                                                               order, or
                                                                                               work order.
 TransactionDate        datetime                                   getdate()   Not null        Date and
                                                                                               time of the
                                                                                               transaction.
 TransactionType        nchar          1                                       Not null        W = Work         (upper([Tran
                                                                                               Order, S =       sactionType]
                                                                                               Sales Order,     )='P' OR
                                                                                               P=               upper([Trans
                                                                                               Purchase         actionType])
                                                                                               Order            ='S' OR
                                                                                                                upper([Trans
                                                                                                                actionType])
                                                                                                                ='W')
 Quantity               int                                                    Not null        Product
                                                                                               quantity.
 ActualCost             money          19,4         decimal(19,4               Not null        Product cost.
                                                    )
 ModifiedDate           datetime                                   getdate()   Not null        Date and
                                                                                               time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.TransactionHistoryArchive'

 Primary Key Name                                                                          Field Name
 PK_TransactionHistoryArchive_TransactionID                                                TransactionID
There are no Foreign Keys for this table.

Indexes for table 'Production.TransactionHistoryArchive', 3 items

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_TransactionHistoryArchive_Tra        Clustered index           Yes                         Yes                       TransactionID
 nsactionID                              created by a primary
                                         key constraint.
 IX_TransactionHistoryArchive_Pro        Nonclustered index.       No                          No                        ProductID
 ductID
 IX_TransactionHistoryArchive_Ref        Nonclustered index.       No                          No                        ReferenceOrderID,
 erenceOrderID_ReferenceOrderLin                                                                                         ReferenceOrderLineI
 eID                                                                                                                     D

Triggers for table 'Production.TransactionHistoryArchive', 1 item

 Name                                             Description                     Type                             Enabled
 uTransactionHistoryArchive                       AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  TransactionHistoryArchive
                                                  table to the current date.

Dependencies for table 'Production.TransactionHistoryArchive', 2 items

 Object Name                                                    Type                                        Field Name
 Production.CK_TransactionHistoryArchive_TransactionTy          check cns                                   N/A
 pe
 Production.uTransactionHistoryArchive                          trigger                                     N/A


Table: 'Production.UnitMeasure'
3 fields. 122 bytes.

Unit of measure lookup table.

 Field Name               Data Type        Size             Original           Default           Nullable         Description     Check
                                                            Type
 UnitMeasureCode          nchar            3                                                     Not null         Primary key.
 Name                     Name                              nvarchar(50)                         Not null         Unit of
                                                                                                                  measure
                                                                                                                  description.
 ModifiedDate             datetime                                             getdate()         Not null         Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.
Primary key for table 'Production.UnitMeasure'

 Primary Key Name                                                                           Field Name
 PK_UnitMeasure_UnitMeasureCode                                                             UnitMeasureCode
There are no Foreign Keys for this table.

Indexes for table 'Production.UnitMeasure', 2 items

 Index Name                                 Description               Clustered                Unique                       Fields
 PK_UnitMeasure_UnitMeasureCod              Clustered index           Yes                      Yes                          UnitMeasureCode
 e                                          created by a primary
                                            key constraint.
 AK_UnitMeasure_Name                        Unique nonclustered       No                       Yes                          Name
                                            index.

Triggers for table 'Production.UnitMeasure', 1 item

 Name                                                Description                     Type                             Enabled
 uUnitMeasure                                        AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the UnitMeasure
                                                     table to the current date.

Dependencies for table 'Production.UnitMeasure', 1 item

 Object Name                                                       Type                                        Field Name
 Production.uUnitMeasure                                           trigger                                     N/A


Table: 'Production.WorkOrder'
10 fields. 84 bytes.

Manufacturing work orders.

 Field Name                Data Type          Size             Original           Default           Nullable        Description      Check
                                                               Type
 WorkOrderID               int identity                        int                                  Not null        Primary key
                                                                                                                    for
                                                                                                                    WorkOrder
                                                                                                                    records.
 ProductID                 int                                                                      Not null        Product
                                                                                                                    identification
                                                                                                                    number.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Product.Prod
                                                                                                                    uctID.
 OrderQty                  int                                                                      Not null        Product          ([OrderQty]>
                                                                                                                    quantity to      (0))
                                                                                                                    build.
 StockedQty                int                                                                      Not null        Quantity built
                                                                                                                    and put in
                                                                                                                    inventory.
 ScrappedQty               smallint                                                                 Not null        Quantity that    ([ScrappedQ
                                                                                                                    failed           ty]>=(0))
                                                                                                                    inspection.
 StartDate                 datetime                                                                 Not null        Work order
                                                                                                                    start date.
 EndDate                   datetime                                                                 Null            Work order
                                                                                                                    end date.
 DueDate                   datetime                                                                 Not null        Work order
                                                                                                                  due date.
 ScrapReasonID            smallint                                                                Null            Reason for
                                                                                                                  inspection
                                                                                                                  failure.
 ModifiedDate             datetime                                             getdate()          Not null        Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.WorkOrder'

 Primary Key Name                                                                          Field Name
 PK_WorkOrder_WorkOrderID                                                                  WorkOrderID

Foreign keys for table 'Production.WorkOrder', 2 items

 Foreign                                                        Primary                                      Key Name
 WorkOrder.ProductID                                            Product.ProductID                            FK_WorkOrder_Product_ProductID
 WorkOrder.ScrapReasonID                                        ScrapReason.ScrapReasonID                    FK_WorkOrder_ScrapReason_Scra
                                                                                                             pReasonID

Indexes for table 'Production.WorkOrder', 3 items

 Index Name                              Description               Clustered                     Unique                    Fields
 PK_WorkOrder_WorkOrderID                Clustered index           Yes                           Yes                       WorkOrderID
                                         created by a primary
                                         key constraint.
 IX_WorkOrder_ProductID                  Nonclustered index.       No                            No                        ProductID
 IX_WorkOrder_ScrapReasonID              Nonclustered index.       No                            No                        ScrapReasonID

Triggers for table 'Production.WorkOrder', 2 items

 Name                                             Description                     Type                              Enabled
 iWorkOrder                                       AFTER INSERT trigger that       after Insert                      Yes
                                                  inserts a row in the
                                                  TransactionHistory table.
 uWorkOrder                                       AFTER UPDATE trigger            after Update                      Yes
                                                  that inserts a row in the
                                                  TransactionHistory table,
                                                  updates ModifiedDate in
                                                  the WorkOrder table.

Dependencies for table 'Production.WorkOrder', 2 items

 Object Name                                                    Type                                         Field Name
 Production.WorkOrder                                           user table                                   OrderQty
 Production.WorkOrder                                           user table                                   ScrappedQty


Table: 'Production.WorkOrderRouting'
12 fields. 145 bytes.

Work order details.

 Field Name               Data Type        Size            Original            Default            Nullable        Description     Check
                                                           Type
 WorkOrderID              int                                                     Not null        Primary key.
                                                                                                  Foreign key
                                                                                                  to
                                                                                                  WorkOrder.
                                                                                                  WorkOrderI
                                                                                                  D.
 ProductID                int                                                     Not null        Primary key.
                                                                                                  Foreign key
                                                                                                  to
                                                                                                  Product.Prod
                                                                                                  uctID.
 OperationSequence        smallint                                                Not null        Primary key.
                                                                                                  Indicates the
                                                                                                  manufacturin
                                                                                                  g process
                                                                                                  sequence.
 LocationID               smallint                                                Not null        Manufacturin
                                                                                                  g location
                                                                                                  where the
                                                                                                  part is
                                                                                                  processed.
                                                                                                  Foreign key
                                                                                                  to
                                                                                                  Location.Loc
                                                                                                  ationID.
 ScheduledStartDate       datetime                                                Not null        Planned
                                                                                                  manufacturin
                                                                                                  g start date.
 ScheduledEndDate         datetime                                                Not null        Planned
                                                                                                  manufacturin
                                                                                                  g end date.
 ActualStartDate          datetime                                                Null            Actual start
                                                                                                  date.
 ActualEndDate            datetime                                                Null            Actual end
                                                                                                  date.
 ActualResourceHrs        decimal        9,4                                      Null            Number of       ([ActualReso
                                                                                                  manufacturin    urceHrs]>=(0
                                                                                                  g hours         .0000))
                                                                                                  used.
 PlannedCost              money          19,4     decimal(19,4                    Not null        Estimated       ([PlannedCo
                                                  )                                               manufacturin    st]>(0.00))
                                                                                                  g cost.
 ActualCost               money          19,4     decimal(19,4                    Null            Actual          ([ActualCost]
                                                  )                                               manufacturin    >(0.00))
                                                                                                  g cost.
 ModifiedDate             datetime                               getdate()        Not null        Date and
                                                                                                  time the
                                                                                                  record was
                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Production.WorkOrderRouting'

 Primary Key Name                                                            Field Names
 PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence                 WorkOrderID, ProductID, OperationSequence

Foreign keys for table 'Production.WorkOrderRouting', 2 items

 Foreign                                            Primary                                  Key Name
 WorkOrderRouting.LocationID                        Location.LocationID                      FK_WorkOrderRouting_Location_Lo
                                                                                             cationID
 WorkOrderRouting.WorkOrderID                       WorkOrder.WorkOrderID                    FK_WorkOrderRouting_WorkOrder_
                                                                                                     WorkOrderID

Indexes for table 'Production.WorkOrderRouting', 2 items

 Index Name                       Description               Clustered                Unique                        Fields
 PK_WorkOrderRouting_WorkOrder    Clustered index           Yes                      Yes                           WorkOrderID,
 ID_ProductID_OperationSequence   created by a primary                                                             ProductID,
                                  key constraint.                                                                  OperationSequence
 IX_WorkOrderRouting_ProductID    Nonclustered index.       No                       No                            ProductID

Triggers for table 'Production.WorkOrderRouting', 1 item

 Name                                       Description                    Type                             Enabled
 uWorkOrderRouting                          AFTER UPDATE trigger           after Update                     Yes
                                            setting the ModifiedDate
                                            column in the
                                            WorkOrderRouting table to
                                            the current date.

Dependencies for table 'Production.WorkOrderRouting', 6 items

 Object Name                                             Type                                        Field Name
 Production.CK_WorkOrderRouting_ActualCost               check cns                                   N/A
 Production.CK_WorkOrderRouting_ActualEndDate            check cns                                   N/A
 Production.CK_WorkOrderRouting_ActualResourceHrs        check cns                                   N/A
 Production.CK_WorkOrderRouting_PlannedCost              check cns                                   N/A
 Production.CK_WorkOrderRouting_ScheduledEndDate         check cns                                   N/A
 Production.uWorkOrderRouting                            trigger                                     N/A


Table: 'Purchasing.ProductVendor'
11 fields. 104 bytes.

Cross-reference table mapping vendors with the products they supply.

 Field Name           Data Type      Size             Original          Default           Nullable        Description     Check
                                                      Type
 ProductID            int                                                                 Not null        Primary key.
                                                                                                          Foreign key
                                                                                                          to
                                                                                                          Product.Prod
                                                                                                          uctID.
 VendorID             int                                                                 Not null        Primary key.
                                                                                                          Foreign key
                                                                                                          to
                                                                                                          Vendor.Vend
                                                                                                          orID.
 AverageLeadTime      int                                                                 Not null        The average     ([AverageLe
                                                                                                          span of time    adTime]>=(1
                                                                                                          (in days)       ))
                                                                                                          between
                                                                                                          placing an
                                                                                                          order with
                                                                                                          the vendor
                                                                                                          and
                                                                                                          receiving the
                                                                                                          purchased
                                                                                                          product.
 StandardPrice        money          19,4             decimal(19,4                        Not null        The vendor's    ([StandardPr
                                                      )                                                   usual selling   ice]>(0.00))
                                                                                                          price.
 LastReceiptCost          money            19,4            decimal(19,4                         Null             The selling     ([LastReceip
                                                           )                                                     price when      tCost]>(0.00)
                                                                                                                 last            )
                                                                                                                 purchased.
 LastReceiptDate          datetime                                                              Null             Date the
                                                                                                                 product was
                                                                                                                 last received
                                                                                                                 by the
                                                                                                                 vendor.
 MinOrderQty              int                                                                   Not null         The             ([MinOrderQt
                                                                                                                 maximum         y]>=(1))
                                                                                                                 quantity that
                                                                                                                 should be
                                                                                                                 ordered.
 MaxOrderQty              int                                                                   Not null         The             ([MaxOrderQ
                                                                                                                 minimum         ty]>=(1))
                                                                                                                 quantity that
                                                                                                                 should be
                                                                                                                 ordered.
 OnOrderQty               int                                                                   Null             The quantity    ([OnOrderQt
                                                                                                                 currently on    y]>=(0))
                                                                                                                 order.
 UnitMeasureCode          nchar            3                                                    Not null         The
                                                                                                                 product's
                                                                                                                 unit of
                                                                                                                 measure.
 ModifiedDate             datetime                                             getdate()        Not null         Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.ProductVendor'

 Primary Key Name                                                                          Field Names
 PK_ProductVendor_ProductID_VendorID                                                       ProductID, VendorID

Foreign keys for table 'Purchasing.ProductVendor', 3 items

 Foreign                                                        Primary                                    Key Name
 ProductVendor.ProductID                                        Product.ProductID                          FK_ProductVendor_Product_Produc
                                                                                                           tID
 ProductVendor.UnitMeasureCode                                  UnitMeasure.UnitMeasureCode                FK_ProductVendor_UnitMeasure_U
                                                                                                           nitMeasureCode
 ProductVendor.VendorID                                         Vendor.VendorID                            FK_ProductVendor_Vendor_Vendor
                                                                                                           ID

Indexes for table 'Purchasing.ProductVendor', 3 items

 Index Name                              Description               Clustered                   Unique                   Fields
 PK_ProductVendor_ProductID_Ve           Clustered index           Yes                         Yes                      ProductID, VendorID
 ndorID                                  created by a primary
                                         key constraint.
 IX_ProductVendor_UnitMeasureCo          Nonclustered index.       No                          No                       UnitMeasureCode
 de
 IX_ProductVendor_VendorID               Nonclustered index.       No                          No                       VendorID

Triggers for table 'Purchasing.ProductVendor', 1 item

 Name                                             Description                     Type                            Enabled
 uProductVendor                               AFTER UPDATE trigger            after Update                     Yes
                                              setting the ModifiedDate
                                              column in the
                                              ProductVendor table to the
                                              current date.

Dependencies for table 'Purchasing.ProductVendor', 7 items

 Object Name                                                  Type                                      Field Name
 Purchasing.CK_ProductVendor_AverageLeadTime                  check cns                                 N/A
 Purchasing.CK_ProductVendor_LastReceiptCost                  check cns                                 N/A
 Purchasing.CK_ProductVendor_MaxOrderQty                      check cns                                 N/A
 Purchasing.CK_ProductVendor_MinOrderQty                      check cns                                 N/A
 Purchasing.CK_ProductVendor_OnOrderQty                       check cns                                 N/A
 Purchasing.CK_ProductVendor_StandardPrice                    check cns                                 N/A
 Purchasing.uProductVendor                                    trigger                                   N/A


Table: 'Purchasing.PurchaseOrderDetail'
11 fields. 119 bytes.

Individual products associated with a specific purchase order. See PurchaseOrderHeader.

 Field Name             Data Type      Size             Original           Default           Nullable        Description      Check
                                                        Type
 PurchaseOrderID        int                                                                  Not null        Primary key.
                                                                                                             Foreign key
                                                                                                             to
                                                                                                             PurchaseOr
                                                                                                             derHeader.P
                                                                                                             urchaseOrde
                                                                                                             rID.
 PurchaseOrderDetailI   int identity                    int                                  Not null        Primary key.
 D                                                                                                           One line
                                                                                                             number per
                                                                                                             purchased
                                                                                                             product.
 DueDate                datetime                                                             Not null        Date the
                                                                                                             product is
                                                                                                             expected to
                                                                                                             be received.
 OrderQty               smallint                                                             Not null        Quantity         ([OrderQty]>
                                                                                                             ordered.         (0))
 ProductID              int                                                                  Not null        Product
                                                                                                             identification
                                                                                                             number.
                                                                                                             Foreign key
                                                                                                             to
                                                                                                             Product.Prod
                                                                                                             uctID.
 UnitPrice              money          19,4             decimal(19,4                         Not null        Vendor's         ([UnitPrice]>
                                                        )                                                    selling price    =(0.00))
                                                                                                             of a single
                                                                                                             product.
 LineTotal              money          19,4             decimal(19,4                         Not null        Per product
                                                        )                                                    subtotal.
                                                                                                             Computed
                                                                                                             as OrderQty
                                                                                                             * UnitPrice.
 ReceivedQty            decimal        8,2                                                   Not null        Quantity         ([ReceivedQt
                                                                                                             actually         y]>=(0.00))
                                                                                                             received
                                                                                                             from the
                                                                                                                  vendor.
 RejectedQty              decimal          8,2                                                    Not null        Quantity        ([RejectedQt
                                                                                                                  rejected        y]>=(0.00))
                                                                                                                  during
                                                                                                                  inspection.
 StockedQty               decimal          9,2                                                    Not null        Quantity
                                                                                                                  accepted
                                                                                                                  into
                                                                                                                  inventory.
                                                                                                                  Computed
                                                                                                                  as
                                                                                                                  ReceivedQty
                                                                                                                  -
                                                                                                                  RejectedQty.
 ModifiedDate             datetime                                             getdate()          Not null        Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.PurchaseOrderDetail'

 Primary Key Name                                                                          Field Names
 PK_PurchaseOrderDetail_PurchaseOrderID_PurchaseOrderDetailID                              PurchaseOrderID, PurchaseOrderDetailID

Foreign keys for table 'Purchasing.PurchaseOrderDetail', 2 items

 Foreign                                                        Primary                                      Key Name
 PurchaseOrderDetail.ProductID                                  Product.ProductID                            FK_PurchaseOrderDetail_Product_
                                                                                                             ProductID
 PurchaseOrderDetail.PurchaseOrderID                            PurchaseOrderHeader.PurchaseOrd              FK_PurchaseOrderDetail_Purchase
                                                                erID                                         OrderHeader_PurchaseOrderID

Indexes for table 'Purchasing.PurchaseOrderDetail', 2 items

 Index Name                              Description               Clustered                     Unique                   Fields
 PK_PurchaseOrderDetail_Purchas          Clustered index           Yes                           Yes                      PurchaseOrderID,
 eOrderID_PurchaseOrderDetailID          created by a primary                                                             PurchaseOrderDetailI
                                         key constraint.                                                                  D
 IX_PurchaseOrderDetail_ProductI         Nonclustered index.       No                            No                       ProductID
 D

Triggers for table 'Purchasing.PurchaseOrderDetail', 2 items

 Name                                            Description                      Type                              Enabled
 iPurchaseOrderDetail                            AFTER INSERT trigger that        after Insert                      Yes
                                                 inserts a row in the
                                                 TransactionHistory table
                                                 and updates the
                                                 PurchaseOrderHeader.Sub
                                                 Total column.
 uPurchaseOrderDetail                            AFTER UPDATE trigger             after Update                      Yes
                                                 that inserts a row in the
                                                 TransactionHistory table,
                                                 updates ModifiedDate in
                                                 PurchaseOrderDetail and
                                                 updates the
                                                 PurchaseOrderHeader.Sub
                                                 Total column.
Dependencies for table 'Purchasing.PurchaseOrderDetail', 4 items

 Object Name                                    Type                                Field Name
 Purchasing.PurchaseOrderDetail                 user table                          OrderQty
 Purchasing.PurchaseOrderDetail                 user table                          UnitPrice
 Purchasing.PurchaseOrderDetail                 user table                          ReceivedQty
 Purchasing.PurchaseOrderDetail                 user table                          RejectedQty


Table: 'Purchasing.PurchaseOrderHeader'
13 fields. 150 bytes.

General purchase order information. See PurchaseOrderDetail.

 Field Name             Data Type      Size   Original       Default     Nullable        Description    Check
                                              Type
 PurchaseOrderID        int identity          int                        Not null        Primary key.
 RevisionNumber         tinyint                              (0)         Not null        Incremental
                                                                                         number to
                                                                                         track
                                                                                         changes to
                                                                                         the purchase
                                                                                         order over
                                                                                         time.
 Status                 tinyint                              (1)         Not null        Order          ([Status]>=(1
                                                                                         current        ) AND
                                                                                         status. 1 =    [Status]<=(4)
                                                                                         Pending; 2 =   )
                                                                                         Approved; 3
                                                                                         = Rejected;
                                                                                         4=
                                                                                         Complete
 EmployeeID             int                                              Not null        Employee
                                                                                         who created
                                                                                         the purchase
                                                                                         order.
                                                                                         Foreign key
                                                                                         to
                                                                                         Employee.E
                                                                                         mployeeID.
 VendorID               int                                              Not null        Vendor with
                                                                                         whom the
                                                                                         purchase
                                                                                         order is
                                                                                         placed.
                                                                                         Foreign key
                                                                                         to
                                                                                         Vendor.Vend
                                                                                         orID.
 ShipMethodID           int                                              Not null        Shipping
                                                                                         method.
                                                                                         Foreign key
                                                                                         to
                                                                                         ShipMethod.
                                                                                         ShipMethodI
                                                                                         D.
 OrderDate              datetime                             getdate()   Not null        Purchase
                                                                                         order
                                                                                         creation
                                                                                         date.
 ShipDate               datetime                                         Null            Estimated
                                                                                         shipment
                                                                                         date from
                                                                                                                 the vendor.
 SubTotal                 money            19,4            decimal(19,4       (0.00)             Not null        Purchase         ([SubTotal]>
                                                           )                                                     order            =(0.00))
                                                                                                                 subtotal.
                                                                                                                 Computed
                                                                                                                 as
                                                                                                                 SUM(Purcha
                                                                                                                 seOrderDeta
                                                                                                                 il.LineTotal)f
                                                                                                                 or the
                                                                                                                 appropriate
                                                                                                                 PurchaseOr
                                                                                                                 derID.
 TaxAmt                   money            19,4            decimal(19,4       (0.00)             Not null        Tax amount.      ([TaxAmt]>=(
                                                           )                                                                      0.00))
 Freight                  money            19,4            decimal(19,4       (0.00)             Not null        Shipping         ([Freight]>=(
                                                           )                                                     cost.            0.00))
 TotalDue                 money            19,4            decimal(19,4                          Not null        Total due to
                                                           )                                                     vendor.
                                                                                                                 Computed
                                                                                                                 as Subtotal +
                                                                                                                 TaxAmt +
                                                                                                                 Freight.
 ModifiedDate             datetime                                            getdate()          Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.PurchaseOrderHeader'

 Primary Key Name                                                                         Field Name
 PK_PurchaseOrderHeader_PurchaseOrderID                                                   PurchaseOrderID

Foreign keys for table 'Purchasing.PurchaseOrderHeader', 3 items

 Foreign                                                        Primary                                     Key Name
 PurchaseOrderHeader.EmployeeID                                 Employee.EmployeeID                         FK_PurchaseOrderHeader_Employ
                                                                                                            ee_EmployeeID
 PurchaseOrderHeader.ShipMethodID                               ShipMethod.ShipMethodID                     FK_PurchaseOrderHeader_ShipMet
                                                                                                            hod_ShipMethodID
 PurchaseOrderHeader.VendorID                                   Vendor.VendorID                             FK_PurchaseOrderHeader_Vendor_
                                                                                                            VendorID

Indexes for table 'Purchasing.PurchaseOrderHeader', 3 items

 Index Name                              Description              Clustered                   Unique                     Fields
 PK_PurchaseOrderHeader_Purcha           Clustered index          Yes                         Yes                        PurchaseOrderID
 seOrderID                               created by a primary
                                         key constraint.
 IX_PurchaseOrderHeader_Employ           Nonclustered index.      No                          No                         EmployeeID
 eeID
 IX_PurchaseOrderHeader_VendorI          Nonclustered index.      No                          No                         VendorID
 D

Triggers for table 'Purchasing.PurchaseOrderHeader', 1 item

 Name                                             Description                     Type                             Enabled
 uPurchaseOrderHeader                             AFTER UPDATE trigger            after Update                     Yes
                                                  that updates the
                                                     RevisionNumber and
                                                     ModifiedDate columns in
                                                     the PurchaseOrderHeader
                                                     table.

Dependencies for table 'Purchasing.PurchaseOrderHeader', 3 items

 Object Name                                                    Type                                       Field Name
 Purchasing.PurchaseOrderHeader                                 user table                                 SubTotal
 Purchasing.PurchaseOrderHeader                                 user table                                 TaxAmt
 Purchasing.PurchaseOrderHeader                                 user table                                 Freight


Table: 'Purchasing.ShipMethod'
6 fields. 178 bytes.

Shipping company lookup table.

 Field Name                Data Type          Size            Original         Default          Nullable        Description     Check
                                                              Type
 ShipMethodID              int identity                       int                               Not null        Primary key
                                                                                                                for
                                                                                                                ShipMethod
                                                                                                                records.
 Name                      Name                               nvarchar(50)                      Not null        Shipping
                                                                                                                company
                                                                                                                name.
 ShipBase                  money              19,4            decimal(19,4     (0.00)           Not null        Minimum         ([ShipBase]>
                                                              )                                                 shipping        (0.00))
                                                                                                                charge.
 ShipRate                  money              19,4            decimal(19,4     (0.00)           Not null        Shipping        ([ShipRate]>
                                                              )                                                 charge per      (0.00))
                                                                                                                pound.
 rowguid                   uniqueidentif                                       newid()          Not null        ROWGUIDC
                           ier                                                                                  OL number
                                                                                                                uniquely
                                                                                                                identifying
                                                                                                                the record.
                                                                                                                Used to
                                                                                                                support a
                                                                                                                merge
                                                                                                                replication
                                                                                                                sample.
 ModifiedDate              datetime                                            getdate()        Not null        Date and
                                                                                                                time the
                                                                                                                record was
                                                                                                                last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.ShipMethod'

 Primary Key Name                                                                          Field Name
 PK_ShipMethod_ShipMethodID                                                                ShipMethodID
There are no Foreign Keys for this table.

Indexes for table 'Purchasing.ShipMethod', 3 items

 Index Name                                 Description            Clustered                   Unique                   Fields
 PK_ShipMethod_ShipMethodID                 Clustered index        Yes                         Yes                      ShipMethodID
                                       created by a primary
                                       key constraint.
 AK_ShipMethod_Name                    Unique nonclustered         No                        Yes                          Name
                                       index.
 AK_ShipMethod_rowguid                 Unique nonclustered         No                        Yes                          rowguid
                                       index. Used to
                                       support replication
                                       samples.

Triggers for table 'Purchasing.ShipMethod', 1 item

 Name                                           Description                        Type                             Enabled
 uShipMethod                                    AFTER UPDATE trigger               after Update                     Yes
                                                setting the ModifiedDate
                                                column in the ShipMethod
                                                table to the current date.

Dependencies for table 'Purchasing.ShipMethod', 3 items

 Object Name                                                    Type                                         Field Name
 Purchasing.CK_ShipMethod_ShipBase                              check cns                                    N/A
 Purchasing.CK_ShipMethod_ShipRate                              check cns                                    N/A
 Purchasing.uShipMethod                                         trigger                                      N/A


Table: 'Purchasing.Vendor'
8 fields. 2201 bytes.

Companies from whom Adventure Works Cycles purchases parts or other goods.

 Field Name             Data Type        Size             Original           Default              Nullable        Description       Check
                                                          Type
 VendorID               int identity                      int                                     Not null        Primary key
                                                                                                                  for Vendor
                                                                                                                  records.
 AccountNumber          AccountNum                        nvarchar(15)                            Not null        Vendor
                        ber                                                                                       account
                                                                                                                  (identificatio
                                                                                                                  n) number.
 Name                   Name                              nvarchar(50)                            Not null        Company
                                                                                                                  name.
 CreditRating           tinyint                                                                   Not null        1 = Superior,     ([CreditRatin
                                                                                                                  2=                g]>=(1) AND
                                                                                                                  Excellent, 3      [CreditRating
                                                                                                                  = Above           ]<=(5))
                                                                                                                  average, 4 =
                                                                                                                  Average, 5 =
                                                                                                                  Below
                                                                                                                  average
 PreferredVendorStatu   Flag                              bit                (1)                  Not null        0 = Do not
 s                                                                                                                use if
                                                                                                                  another
                                                                                                                  vendor is
                                                                                                                  available. 1
                                                                                                                  = Preferred
                                                                                                                  over other
                                                                                                                  vendors
                                                                                                                  supplying
                                                                                                                  the same
                                                                                                                  product.
 ActiveFlag             Flag                              bit                (1)                  Not null        0 = Vendor
                                                                                                                  no longer
                                                                                                                    used. 1 =
                                                                                                                    Vendor is
                                                                                                                    actively
                                                                                                                    used.
 PurchasingWebServi        nvarchar           1024                                                  Null            Vendor URL.
 ceURL
 ModifiedDate              datetime                                               getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.Vendor'

 Primary Key Name                                                                             Field Name
 PK_Vendor_VendorID                                                                           VendorID
There are no Foreign Keys for this table.

Indexes for table 'Purchasing.Vendor', 2 items

 Index Name                                 Description               Clustered                  Unique                     Fields
 PK_Vendor_VendorID                         Clustered index           Yes                        Yes                        VendorID
                                            created by a primary
                                            key constraint.
 AK_Vendor_AccountNumber                    Unique nonclustered       No                         Yes                        AccountNumber
                                            index.

Triggers for table 'Purchasing.Vendor', 2 items

 Name                                                Description                     Type                             Enabled
 dVendor                                             INSTEAD OF DELETE               instead of Delete                Yes
                                                     trigger which keeps
                                                     Vendors from being
                                                     deleted.
 uVendor                                             AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the Vendor table
                                                     to the current date.

Dependencies for table 'Purchasing.Vendor', 3 items

 Object Name                                                       Type                                        Field Name
 Purchasing.CK_Vendor_CreditRating                                 check cns                                   N/A
 Purchasing.uVendor                                                trigger                                     N/A
 Purchasing.vVendor                                                view                                        N/A


Table: 'Purchasing.VendorAddress'
4 fields. 28 bytes.

Cross-reference mapping vendors and addresses.

 Field Name                Data Type          Size             Original           Default           Nullable        Description     Check
                                                               Type
 VendorID                  int                                                                      Not null        Primary key.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Vendor.Vend
                                                                                                                 orID.
 AddressID                int                                                                    Not null        Primary key.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Address.Add
                                                                                                                 ressID.
 AddressTypeID            int                                                                    Not null        Address
                                                                                                                 type. Foreign
                                                                                                                 key to
                                                                                                                 AddressTyp
                                                                                                                 e.AddressTy
                                                                                                                 peID.
 ModifiedDate             datetime                                             getdate()         Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.VendorAddress'

 Primary Key Name                                                                          Field Names
 PK_VendorAddress_VendorID_AddressID                                                       VendorID, AddressID

Foreign keys for table 'Purchasing.VendorAddress', 3 items

 Foreign                                                        Primary                                     Key Name
 VendorAddress.AddressID                                        Address.AddressID                           FK_VendorAddress_Address_Addre
                                                                                                            ssID
 VendorAddress.AddressTypeID                                    AddressType.AddressTypeID                   FK_VendorAddress_AddressType_
                                                                                                            AddressTypeID
 VendorAddress.VendorID                                         Vendor.VendorID                             FK_VendorAddress_Vendor_Vendor
                                                                                                            ID

Indexes for table 'Purchasing.VendorAddress', 2 items

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_VendorAddress_VendorID_Ad            Clustered index           Yes                         Yes                       VendorID, AddressID
 dressID                                 created by a primary
                                         key constraint.
 IX_VendorAddress_AddressID              Nonclustered index.       No                          No                        AddressID

Triggers for table 'Purchasing.VendorAddress', 1 item

 Name                                            Description                      Type                             Enabled
 uVendorAddress                                  AFTER UPDATE trigger             after Update                     Yes
                                                 setting the ModifiedDate
                                                 column in the
                                                 VendorAddress table to the
                                                 current date.

Dependencies for table 'Purchasing.VendorAddress', 2 items

 Object Name                                                    Type                                        Field Name
 Purchasing.uVendorAddress                                      trigger                                     N/A
 Purchasing.vVendor                                             view                                        N/A


Table: 'Purchasing.VendorContact'
4 fields. 28 bytes.

Cross-reference table mapping vendors and their employees.

 Field Name               Data Type        Size             Original           Default           Nullable        Description      Check
                                                            Type
 VendorID                 int                                                                    Not null        Primary key.
 ContactID                int                                                                    Not null        Contact
                                                                                                                 (Vendor
                                                                                                                 employee)
                                                                                                                 identification
                                                                                                                 number.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 Contact.Cont
                                                                                                                 actID.
 ContactTypeID            int                                                                    Not null        Contact type
                                                                                                                 such as
                                                                                                                 sales
                                                                                                                 manager, or
                                                                                                                 sales agent.
 ModifiedDate             datetime                                             getdate()         Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Purchasing.VendorContact'

 Primary Key Name                                                                          Field Names
 PK_VendorContact_VendorID_ContactID                                                       VendorID, ContactID

Foreign keys for table 'Purchasing.VendorContact', 3 items

 Foreign                                                        Primary                                     Key Name
 VendorContact.ContactID                                        Contact.ContactID                           FK_VendorContact_Contact_Contac
                                                                                                            tID
 VendorContact.ContactTypeID                                    ContactType.ContactTypeID                   FK_VendorContact_ContactType_C
                                                                                                            ontactTypeID
 VendorContact.VendorID                                         Vendor.VendorID                             FK_VendorContact_Vendor_Vendor
                                                                                                            ID

Indexes for table 'Purchasing.VendorContact', 3 items

 Index Name                              Description               Clustered                   Unique                    Fields
 PK_VendorContact_VendorID_Con           Clustered index           Yes                         Yes                       VendorID, ContactID
 tactID                                  created by a primary
                                         key constraint.
 IX_VendorContact_ContactID              Nonclustered index.       No                          No                        ContactID
 IX_VendorContact_ContactTypeID          Nonclustered index.       No                          No                        ContactTypeID

Triggers for table 'Purchasing.VendorContact', 1 item

 Name                                             Description                     Type                             Enabled
 uVendorContact                                   AFTER UPDATE trigger            after Update                     Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  VendorContact table to the
                                                  current date.
Dependencies for table 'Purchasing.VendorContact', 3 items

 Object Name                                                    Type                                         Field Name
 dbo.ufnGetContactInformation                                   table function                               N/A
 Purchasing.uVendorContact                                      trigger                                      N/A
 Purchasing.vVendor                                             view                                         N/A


Table: 'Sales.ContactCreditCard'
3 fields. 24 bytes.

Cross-reference table mapping customers in the Contact table to their credit card information
in the CreditCard table.

 Field Name               Data Type        Size            Original              Default          Nullable         Description      Check
                                                           Type
 ContactID                int                                                                     Not null         Customer
                                                                                                                   identification
                                                                                                                   number.
                                                                                                                   Foreign key
                                                                                                                   to
                                                                                                                   Contact.Cont
                                                                                                                   actID.
 CreditCardID             int                                                                     Not null         Credit card
                                                                                                                   identification
                                                                                                                   number.
                                                                                                                   Foreign key
                                                                                                                   to
                                                                                                                   CreditCard.C
                                                                                                                   reditCardID.
 ModifiedDate             datetime                                               getdate()        Not null         Date and
                                                                                                                   time the
                                                                                                                   record was
                                                                                                                   last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.ContactCreditCard'

 Primary Key Name                                                                            Field Names
 PK_ContactCreditCard_ContactID_CreditCardID                                                 ContactID, CreditCardID

Foreign keys for table 'Sales.ContactCreditCard', 2 items

 Foreign                                                        Primary                                      Key Name
 ContactCreditCard.ContactID                                    Contact.ContactID                            FK_ContactCreditCard_Contact_Co
                                                                                                             ntactID
 ContactCreditCard.CreditCardID                                 CreditCard.CreditCardID                      FK_ContactCreditCard_CreditCard_
                                                                                                             CreditCardID

Indexes for table 'Sales.ContactCreditCard', 1 item

 Index Name                              Description               Clustered                     Unique                    Fields
 PK_ContactCreditCard_ContactID_         Clustered index           Yes                           Yes                       ContactID,
 CreditCardID                            created by a primary                                                              CreditCardID
                                         key constraint.
Triggers for table 'Sales.ContactCreditCard', 1 item

 Name                                           Description                     Type                             Enabled
 uContactCreditCard                             AFTER UPDATE trigger            after Update                     Yes
                                                setting the ModifiedDate
                                                column in the
                                                ContactCreditCard table to
                                                the current date.

Dependencies for table 'Sales.ContactCreditCard', 1 item

 Object Name                                                 Type                                         Field Name
 Sales.uContactCreditCard                                    trigger                                      N/A


Table: 'Sales.CountryRegionCurrency'
3 fields. 28 bytes.

Cross-reference table mapping ISO currency codes to a country or region.

 Field Name               Data Type      Size             Original           Default           Nullable        Description     Check
                                                          Type
 CountryRegionCode        nvarchar       3                                                     Not null        ISO code for
                                                                                                               countries
                                                                                                               and regions.
                                                                                                               Foreign key
                                                                                                               to
                                                                                                               CountryRegi
                                                                                                               on.CountryR
                                                                                                               egionCode.
 CurrencyCode             nchar          3                                                     Not null        ISO
                                                                                                               standard
                                                                                                               currency
                                                                                                               code.
                                                                                                               Foreign key
                                                                                                               to
                                                                                                               Currency.Cu
                                                                                                               rrencyCode.
 ModifiedDate             datetime                                           getdate()         Not null        Date and
                                                                                                               time the
                                                                                                               record was
                                                                                                               last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.CountryRegionCurrency'

 Primary Key Name                                                                        Field Names
 PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode                                 CountryRegionCode, CurrencyCode

Foreign keys for table 'Sales.CountryRegionCurrency', 2 items

 Foreign                                                     Primary                                      Key Name
 CountryRegionCurrency.CountryRegionCode                     CountryRegion.CountryRegionCode              FK_CountryRegionCurrency_Countr
                                                                                                          yRegion_CountryRegionCode
 CountryRegionCurrency.CurrencyCode                          Currency.CurrencyCode                        FK_CountryRegionCurrency_Curren
                                                                                                          cy_CurrencyCode

Indexes for table 'Sales.CountryRegionCurrency', 2 items
 Index Name                                 Description                Clustered                   Unique                    Fields
 PK_CountryRegionCurrency_Coun              Clustered index            Yes                         Yes                       CountryRegionCode,
 tryRegionCode_CurrencyCode                 created by a primary                                                             CurrencyCode
                                            key constraint.
 IX_CountryRegionCurrency_Curre             Nonclustered index.        No                          No                        CurrencyCode
 ncyCode

Triggers for table 'Sales.CountryRegionCurrency', 1 item

 Name                                                Description                      Type                             Enabled
 uCountryRegionCurrency                              AFTER UPDATE trigger             after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the
                                                     CountryRegionCurrency
                                                     table to the current date.

Dependencies for table 'Sales.CountryRegionCurrency', 1 item

 Object Name                                                       Type                                         Field Name
 Sales.uCountryRegionCurrency                                      trigger                                      N/A


Table: 'Sales.CreditCard'
6 fields. 173 bytes.

Customer credit card information.

 Field Name                Data Type          Size              Original           Default           Nullable        Description     Check
                                                                Type
 CreditCardID              int identity                         int                                  Not null        Primary key
                                                                                                                     for
                                                                                                                     CreditCard
                                                                                                                     records.
 CardType                  nvarchar           50                                                     Not null        Credit card
                                                                                                                     name.
 CardNumber                nvarchar           25                                                     Not null        Credit card
                                                                                                                     number.
 ExpMonth                  tinyint                                                                   Not null        Credit card
                                                                                                                     expiration
                                                                                                                     month.
 ExpYear                   smallint                                                                  Not null        Credit card
                                                                                                                     expiration
                                                                                                                     year.
 ModifiedDate              datetime                                                getdate()         Not null        Date and
                                                                                                                     time the
                                                                                                                     record was
                                                                                                                     last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.CreditCard'

 Primary Key Name                                                                              Field Name
 PK_CreditCard_CreditCardID                                                                    CreditCardID
There are no Foreign Keys for this table.

Indexes for table 'Sales.CreditCard', 2 items
 Index Name                                 Description               Clustered                  Unique                     Fields
 PK_CreditCard_CreditCardID                 Clustered index           Yes                        Yes                        CreditCardID
                                            created by a primary
                                            key constraint.
 AK_CreditCard_CardNumber                   Unique nonclustered       No                         Yes                        CardNumber
                                            index.

Triggers for table 'Sales.CreditCard', 1 item

 Name                                                Description                     Type                             Enabled
 uCreditCard                                         AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the CreditCard
                                                     table to the current date.

Dependencies for table 'Sales.CreditCard', 1 item

 Object Name                                                       Type                                        Field Name
 Sales.uCreditCard                                                 trigger                                     N/A


Table: 'Sales.Currency'
3 fields. 122 bytes.

Lookup table containing standard ISO currencies.

 Field Name                Data Type          Size              Original          Default           Nullable        Description     Check
                                                                Type
 CurrencyCode              nchar              3                                                     Not null        The ISO
                                                                                                                    code for the
                                                                                                                    Currency.
 Name                      Name                                 nvarchar(50)                        Not null        Currency
                                                                                                                    name.
 ModifiedDate              datetime                                               getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.Currency'

 Primary Key Name                                                                             Field Name
 PK_Currency_CurrencyCode                                                                     CurrencyCode
There are no Foreign Keys for this table.

Indexes for table 'Sales.Currency', 2 items

 Index Name                                 Description               Clustered                  Unique                     Fields
 PK_Currency_CurrencyCode                   Clustered index           Yes                        Yes                        CurrencyCode
                                            created by a primary
                                            key constraint.
 AK_Currency_Name                           Unique nonclustered       No                         Yes                        Name
                                            index.

Triggers for table 'Sales.Currency', 1 item

 Name                                                Description                     Type                             Enabled
 uCurrency                                      AFTER UPDATE trigger            after Update                     Yes
                                                setting the ModifiedDate
                                                column in the Currency
                                                table to the current date.

Dependencies for table 'Sales.Currency', 1 item

 Object Name                                                  Type                                        Field Name
 Sales.uCurrency                                              trigger                                     N/A


Table: 'Sales.CurrencyRate'
7 fields. 90 bytes.

Currency exchange rates.

 Field Name               Data Type      Size              Original          Default           Nullable        Description     Check
                                                           Type
 CurrencyRateID           int identity                     int                                 Not null        Primary key
                                                                                                               for
                                                                                                               CurrencyRat
                                                                                                               e records.
 CurrencyRateDate         datetime                                                             Not null        Date and
                                                                                                               time the
                                                                                                               exchange
                                                                                                               rate was
                                                                                                               obtained.
 FromCurrencyCode         nchar          3                                                     Not null        Exchange
                                                                                                               rate was
                                                                                                               converted
                                                                                                               from this
                                                                                                               currency
                                                                                                               code.
 ToCurrencyCode           nchar          3                                                     Not null        Exchange
                                                                                                               rate was
                                                                                                               converted to
                                                                                                               this currency
                                                                                                               code.
 AverageRate              money          19,4              decimal(19,4                        Not null        Average
                                                           )                                                   exchange
                                                                                                               rate for the
                                                                                                               day.
 EndOfDayRate             money          19,4              decimal(19,4                        Not null        Final
                                                           )                                                   exchange
                                                                                                               rate for the
                                                                                                               day.
 ModifiedDate             datetime                                           getdate()         Not null        Date and
                                                                                                               time the
                                                                                                               record was
                                                                                                               last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.CurrencyRate'

 Primary Key Name                                                                        Field Name
 PK_CurrencyRate_CurrencyRateID                                                          CurrencyRateID

Foreign keys for table 'Sales.CurrencyRate', 2 items
 Foreign                                                     Primary                                     Key Name
 CurrencyRate.FromCurrencyCode                               Currency.CurrencyCode                       FK_CurrencyRate_Currency_FromC
                                                                                                         urrencyCode
 CurrencyRate.ToCurrencyCode                                 Currency.CurrencyCode                       FK_CurrencyRate_Currency_ToCurr
                                                                                                         encyCode

Indexes for table 'Sales.CurrencyRate', 2 items

 Index Name                           Description               Clustered                Unique                       Fields
 PK_CurrencyRate_CurrencyRateID       Clustered index           Yes                      Yes                          CurrencyRateID
                                      created by a primary
                                      key constraint.
 AK_CurrencyRate_CurrencyRateD        Unique nonclustered       No                       Yes                          CurrencyRateDate,
 ate_FromCurrencyCode_ToCurren        index.                                                                          FromCurrencyCode,
 cyCode                                                                                                               ToCurrencyCode

Triggers for table 'Sales.CurrencyRate', 1 item

 Name                                          Description                     Type                             Enabled
 uCurrencyRate                                 AFTER UPDATE trigger            after Update                     Yes
                                               setting the ModifiedDate
                                               column in the
                                               CurrencyRate table to the
                                               current date.

Dependencies for table 'Sales.CurrencyRate', 1 item

 Object Name                                                 Type                                        Field Name
 Sales.uCurrencyRate                                         trigger                                     N/A


Table: 'Sales.Customer'
6 fields. 52 bytes.

Current customer information. Also see the Individual and Store tables.

 Field Name            Data Type        Size             Original           Default           Nullable        Description     Check
                                                         Type
 CustomerID            int identity                      int                                  Not null        Primary key
                                                                                                              for Customer
                                                                                                              records.
 TerritoryID           int                                                                    Null            ID of the
                                                                                                              territory in
                                                                                                              which the
                                                                                                              customer is
                                                                                                              located.
                                                                                                              Foreign key
                                                                                                              to
                                                                                                              SalesTerritor
                                                                                                              y.SalesTerrit
                                                                                                              oryID.
 AccountNumber         varchar          10                                                    Not null        Unique
                                                                                                              number
                                                                                                              identifying
                                                                                                              the customer
                                                                                                              assigned by
                                                                                                              the
                                                                                                              accounting
                                                                                                              system.
 CustomerType          nchar            1                                                     Not null        Customer        (upper([Cust
                                                                                                              type: I =       omerType])=
                                                                                                                    Individual, S     'I' OR
                                                                                                                    = Store           upper([Custo
                                                                                                                                      merType])='
                                                                                                                                      S')
 rowguid                   uniqueidentif                                         newid()           Not null         ROWGUIDC
                           ier                                                                                      OL number
                                                                                                                    uniquely
                                                                                                                    identifying
                                                                                                                    the record.
                                                                                                                    Used to
                                                                                                                    support a
                                                                                                                    merge
                                                                                                                    replication
                                                                                                                    sample.
 ModifiedDate              datetime                                              getdate()         Not null         Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.Customer'

 Primary Key Name                                                                            Field Name
 PK_Customer_CustomerID                                                                      CustomerID

Foreign keys for table 'Sales.Customer', 1 item

 Foreign                                                          Primary                                     Key Name
 Customer.TerritoryID                                             SalesTerritory.TerritoryID                  FK_Customer_SalesTerritory_Territ
                                                                                                              oryID

Indexes for table 'Sales.Customer', 4 items

 Index Name                                Description               Clustered                  Unique                      Fields
 PK_Customer_CustomerID                    Clustered index           Yes                        Yes                         CustomerID
                                           created by a primary
                                           key constraint.
 AK_Customer_AccountNumber                 Unique nonclustered       No                         Yes                         AccountNumber
                                           index.
 AK_Customer_rowguid                       Unique nonclustered       No                         Yes                         rowguid
                                           index. Used to
                                           support replication
                                           samples.
 IX_Customer_TerritoryID                   Nonclustered index.       No                         No                          TerritoryID

Triggers for table 'Sales.Customer', 1 item

 Name                                              Description                      Type                              Enabled
 uCustomer                                         AFTER UPDATE trigger             after Update                      Yes
                                                   setting the ModifiedDate
                                                   column in the Customer
                                                   table to the current date.

Dependencies for table 'Sales.Customer', 2 items

 Object Name                                                      Type                                        Field Name
 dbo.ufnLeadingZeros                                              scalar function                             N/A
 Sales.Customer                                                   user table                                  CustomerID
Table: 'Sales.CustomerAddress'
5 fields. 44 bytes.

Cross-reference table mapping customers to their address(es).

 Field Name               Data Type         Size            Original         Default          Nullable        Description     Check
                                                            Type
 CustomerID               int                                                                 Not null        Primary key.
                                                                                                              Foreign key
                                                                                                              to
                                                                                                              Customer.C
                                                                                                              ustomerID.
 AddressID                int                                                                 Not null        Primary key.
                                                                                                              Foreign key
                                                                                                              to
                                                                                                              Address.Add
                                                                                                              ressID.
 AddressTypeID            int                                                                 Not null        Address
                                                                                                              type. Foreign
                                                                                                              key to
                                                                                                              AddressTyp
                                                                                                              e.AddressTy
                                                                                                              peID.
 rowguid                  uniqueidentif                                      newid()          Not null        ROWGUIDC
                          ier                                                                                 OL number
                                                                                                              uniquely
                                                                                                              identifying
                                                                                                              the record.
                                                                                                              Used to
                                                                                                              support a
                                                                                                              merge
                                                                                                              replication
                                                                                                              sample.
 ModifiedDate             datetime                                           getdate()        Not null        Date and
                                                                                                              time the
                                                                                                              record was
                                                                                                              last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.CustomerAddress'

 Primary Key Name                                                                        Field Names
 PK_CustomerAddress_CustomerID_AddressID                                                 CustomerID, AddressID

Foreign keys for table 'Sales.CustomerAddress', 3 items

 Foreign                                                      Primary                                    Key Name
 CustomerAddress.AddressID                                    Address.AddressID                          FK_CustomerAddress_Address_Ad
                                                                                                         dressID
 CustomerAddress.AddressTypeID                                AddressType.AddressTypeID                  FK_CustomerAddress_AddressType
                                                                                                         _AddressTypeID
 CustomerAddress.CustomerID                                   Customer.CustomerID                        FK_CustomerAddress_Customer_C
                                                                                                         ustomerID

Indexes for table 'Sales.CustomerAddress', 2 items

 Index Name                               Description            Clustered                   Unique                  Fields
 PK_CustomerAddress_CustomerID            Clustered index        Yes                         Yes                     CustomerID,
 _AddressID                        created by a primary                                                          AddressID
                                   key constraint.
 AK_CustomerAddress_rowguid        Unique nonclustered       No                     Yes                          rowguid
                                   index. Used to
                                   support replication
                                   samples.

Triggers for table 'Sales.CustomerAddress', 1 item

 Name                                       Description                   Type                             Enabled
 uCustomerAddress                           AFTER UPDATE trigger          after Update                     Yes
                                            setting the ModifiedDate
                                            column in the
                                            CustomerAddress table to
                                            the current date.

Dependencies for table 'Sales.CustomerAddress', 3 items

 Object Name                                              Type                                      Field Name
 Sales.uCustomerAddress                                   trigger                                   N/A
 Sales.vIndividualCustomer                                view                                      N/A
 Sales.vStoreWithDemographics                             view                                      N/A


Table: 'Sales.Individual'
4 fields. 24 bytes.

Demographic data about customers that purchase Adventure Works products online.

 Field Name            Data Type     Size            Original          Default           Nullable        Description       Check
                                                     Type
 CustomerID            int                                                               Not null        Unique
                                                                                                         customer
                                                                                                         identification
                                                                                                         number.
                                                                                                         Foreign key
                                                                                                         to
                                                                                                         Customer.C
                                                                                                         ustomerID.
 ContactID             int                                                               Not null        Identifies the
                                                                                                         customer in
                                                                                                         the Contact
                                                                                                         table.
                                                                                                         Foreign key
                                                                                                         to
                                                                                                         Contact.Cont
                                                                                                         actID.
 Demographics          xml                                                               Null            Personal
                                                                                                         information
                                                                                                         such as
                                                                                                         hobbies, and
                                                                                                         income
                                                                                                         collected
                                                                                                         from online
                                                                                                         shoppers.
                                                                                                         Used for
                                                                                                         sales
                                                                                                         analysis.
 ModifiedDate          datetime                                        getdate()         Not null        Date and
                                                                                                         time the
                                                                                                         record was
                                                                                                         last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'Sales.Individual'

 Primary Key Name                                                                          Field Name
 PK_Individual_CustomerID                                                                  CustomerID

Foreign keys for table 'Sales.Individual', 2 items

 Foreign                                                        Primary                                    Key Name
 Individual.ContactID                                           Contact.ContactID                          FK_Individual_Contact_ContactID
 Individual.CustomerID                                          Customer.CustomerID                        FK_Individual_Customer_CustomerI
                                                                                                           D

Indexes for table 'Sales.Individual', 1 item

 Index Name                              Description               Clustered                   Unique                   Fields
 PK_Individual_CustomerID                Clustered index           Yes                         Yes                      CustomerID
                                         created by a primary
                                         key constraint.

Triggers for table 'Sales.Individual', 1 item

 Name                                             Description                       Type                          Enabled
 iuIndividual                                     AFTER INSERT, UPDATE              after Insert Update           Yes
                                                  trigger inserting Individual
                                                  only if the Customer does
                                                  not exist in the Store table
                                                  and setting the
                                                  ModifiedDate column in the
                                                  Individual table to the
                                                  current date.

Dependencies for table 'Sales.Individual', 6 items

 Object Name                                                    Type                                       Field Name
 dbo.ufnGetContactInformation                                   table function                             N/A
 Sales.iduSalesOrderDetail                                      trigger                                    N/A
 Sales.iStore                                                   trigger                                    N/A
 Sales.iuIndividual                                             trigger                                    N/A
 Sales.vIndividualCustomer                                      view                                       N/A
 Sales.vIndividualDemographics                                  view                                       N/A


Table: 'Sales.SalesOrderDetail'
11 fields. 182 bytes.

Individual products associated with a specific sales order. See SalesOrderHeader.

 Field Name               Data Type        Size              Original            Default        Nullable         Description    Check
                                                             Type
 SalesOrderID             int                                                                   Not null         Primary key.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 SalesOrderH
                                                                                                                 eader.Sales
                                                                                                                 OrderID.
 SalesOrderDetailID       int identity                 int                             Not null        Primary key.
                                                                                                       One
                                                                                                       incremental
                                                                                                       unique
                                                                                                       number per
                                                                                                       product sold.
 CarrierTrackingNumb      nvarchar        25                                           Null            Shipment
 er                                                                                                    tracking
                                                                                                       number
                                                                                                       supplied by
                                                                                                       the shipper.
 OrderQty                 smallint                                                     Not null        Quantity        ([OrderQty]>
                                                                                                       ordered per     (0))
                                                                                                       product.
 ProductID                int                                                          Not null        Product sold
                                                                                                       to customer.
                                                                                                       Foreign key
                                                                                                       to
                                                                                                       Product.Prod
                                                                                                       uctID.
 SpecialOfferID           int                                                          Not null        Promotional
                                                                                                       code.
                                                                                                       Foreign key
                                                                                                       to
                                                                                                       SpecialOffer.
                                                                                                       SpecialOfferI
                                                                                                       D.
 UnitPrice                money           19,4         decimal(19,4                    Not null        Selling price   ([UnitPrice]>
                                                       )                                               of a single     =(0.00))
                                                                                                       product.
 UnitPriceDiscount        money           19,4         decimal(19,4   (0.0)            Not null        Discount        ([UnitPriceDi
                                                       )                                               amount.         scount]>=(0.
                                                                                                                       00))
 LineTotal                numeric         38,6                                         Not null        Per product
                                                                                                       subtotal.
                                                                                                       Computed
                                                                                                       as UnitPrice
                                                                                                       * (1 -
                                                                                                       UnitPriceDis
                                                                                                       count) *
                                                                                                       OrderQty.
 rowguid                  uniqueidentif                               newid()          Not null        ROWGUIDC
                          ier                                                                          OL number
                                                                                                       uniquely
                                                                                                       identifying
                                                                                                       the record.
                                                                                                       Used to
                                                                                                       support a
                                                                                                       merge
                                                                                                       replication
                                                                                                       sample.
 ModifiedDate             datetime                                    getdate()        Not null        Date and
                                                                                                       time the
                                                                                                       record was
                                                                                                       last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesOrderDetail'

 Primary Key Name                                                                 Field Names
 PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID                              SalesOrderID, SalesOrderDetailID

Foreign keys for table 'Sales.SalesOrderDetail', 3 items
 Foreign                                                        Primary                                     Key Name
 SalesOrderDetail.SalesOrderID                                  SalesOrderHeader.SalesOrderID               FK_SalesOrderDetail_SalesOrderH
                                                                                                            eader_SalesOrderID
 SalesOrderDetail.SpecialOfferID                                SpecialOfferProduct.SpecialOfferID          FK_SalesOrderDetail_SpecialOfferP
                                                                                                            roduct_SpecialOfferIDProductID
 SalesOrderDetail.ProductID                                     SpecialOfferProduct.ProductID               FK_SalesOrderDetail_SpecialOfferP
                                                                                                            roduct_SpecialOfferIDProductID

Indexes for table 'Sales.SalesOrderDetail', 3 items

 Index Name                              Description               Clustered                    Unique                   Fields
 PK_SalesOrderDetail_SalesOrderI         Clustered index           Yes                          Yes                      SalesOrderID,
 D_SalesOrderDetailID                    created by a primary                                                            SalesOrderDetailID
                                         key constraint.
 AK_SalesOrderDetail_rowguid             Unique nonclustered       No                           Yes                      rowguid
                                         index. Used to
                                         support replication
                                         samples.
 IX_SalesOrderDetail_ProductID           Nonclustered index.       No                           No                       ProductID

Triggers for table 'Sales.SalesOrderDetail', 1 item

 Name                                             Description                        Type                           Enabled
 iduSalesOrderDetail                              AFTER INSERT, DELETE,              after Insert Update Delete     Yes
                                                  UPDATE trigger that inserts
                                                  a row in the
                                                  TransactionHistory table,
                                                  updates ModifiedDate in
                                                  SalesOrderDetail and
                                                  updates the
                                                  SalesOrderHeader.SubTot
                                                  al column.

Dependencies for table 'Sales.SalesOrderDetail', 3 items

 Object Name                                                    Type                                        Field Name
 Sales.SalesOrderDetail                                         user table                                  OrderQty
 Sales.SalesOrderDetail                                         user table                                  UnitPrice
 Sales.SalesOrderDetail                                         user table                                  UnitPriceDiscount


Table: 'Sales.SalesOrderHeader'
27 fields. 608 bytes.

General sales order information.

 Field Name               Data Type        Size             Original           Default           Nullable         Description      Check
                                                            Type
 SalesOrderID             int identity                      int                                  Not null         Primary key.
 RevisionNumber           tinyint                                              (0)               Not null         Incremental
                                                                                                                  number to
                                                                                                                  track
                                                                                                                  changes to
                                                                                                                  the sales
                                                                                                                  order over
                                                                                                                  time.
 OrderDate                datetime                                             getdate()         Not null         Dates the
                                                                                                                  sales order
                                                                                                                  was created.
 DueDate                  datetime                                                               Not null         Date the
                                                                      order is due
                                                                      to the
                                                                      customer.
ShipDate            datetime                               Null       Date the
                                                                      order was
                                                                      shipped to
                                                                      the
                                                                      customer.
Status              tinyint                          (1)   Not null   Order            ([Status]>=(0
                                                                      current          ) AND
                                                                      status. 1 = In   [Status]<=(8)
                                                                      process; 2 =     )
                                                                      Approved; 3
                                                                      =
                                                                      Backordered
                                                                      ;4=
                                                                      Rejected; 5
                                                                      = Shipped; 6
                                                                      = Cancelled
OnlineOrderFlag     Flag              bit            (1)   Not null   0 = Order
                                                                      placed by
                                                                      sales
                                                                      person. 1 =
                                                                      Order placed
                                                                      online by
                                                                      customer.
SalesOrderNumber    nvarchar     25                        Not null   Unique sales
                                                                      order
                                                                      identification
                                                                      number.
PurchaseOrderNumb   OrderNumbe        nvarchar(25)         Null       Customer
er                  r                                                 purchase
                                                                      order
                                                                      number
                                                                      reference.
AccountNumber       AccountNum        nvarchar(15)         Null       Financial
                    ber                                               accounting
                                                                      number
                                                                      reference.
CustomerID          int                                    Not null   Customer
                                                                      identification
                                                                      number.
                                                                      Foreign key
                                                                      to
                                                                      Customer.C
                                                                      ustomerID.
ContactID           int                                    Not null   Customer
                                                                      contact
                                                                      identification
                                                                      number.
                                                                      Foreign key
                                                                      to
                                                                      Contact.Cont
                                                                      actID.
SalesPersonID       int                                    Null       Sales person
                                                                      who created
                                                                      the sales
                                                                      order.
                                                                      Foreign key
                                                                      to
                                                                      SalesPerson
                                                                      .SalePersonI
                                                                      D.
TerritoryID         int                                    Null       Territory in
                                                                      which the
                                                                      sale was
                                                                          made.
                                                                          Foreign key
                                                                          to
                                                                          SalesTerritor
                                                                          y.SalesTerrit
                                                                          oryID.
BillToAddressID       int                                      Not null   Customer
                                                                          billing
                                                                          address.
                                                                          Foreign key
                                                                          to
                                                                          Address.Add
                                                                          ressID.
ShipToAddressID       int                                      Not null   Customer
                                                                          shipping
                                                                          address.
                                                                          Foreign key
                                                                          to
                                                                          Address.Add
                                                                          ressID.
ShipMethodID          int                                      Not null   Shipping
                                                                          method.
                                                                          Foreign key
                                                                          to
                                                                          ShipMethod.
                                                                          ShipMethodI
                                                                          D.
CreditCardID          int                                      Null       Credit card
                                                                          identification
                                                                          number.
                                                                          Foreign key
                                                                          to
                                                                          CreditCard.C
                                                                          reditCardID.
CreditCardApprovalC   varchar   15                             Null       Approval
ode                                                                       code
                                                                          provided by
                                                                          the credit
                                                                          card
                                                                          company.
CurrencyRateID        int                                      Null       Currency
                                                                          exchange
                                                                          rate used.
                                                                          Foreign key
                                                                          to
                                                                          CurrencyRat
                                                                          e.CurrencyR
                                                                          ateID.
SubTotal              money     19,4   decimal(19,4   (0.00)   Not null   Sales            ([SubTotal]>
                                       )                                  subtotal.        =(0.00))
                                                                          Computed
                                                                          as
                                                                          SUM(SalesO
                                                                          rderDetail.Li
                                                                          neTotal)for
                                                                          the
                                                                          appropriate
                                                                          SalesOrderI
                                                                          D.
TaxAmt                money     19,4   decimal(19,4   (0.00)   Not null   Tax amount.      ([TaxAmt]>=(
                                       )                                                   0.00))
Freight               money     19,4   decimal(19,4   (0.00)   Not null   Shipping         ([Freight]>=(
                                       )                                  cost.            0.00))
TotalDue              money     19,4   decimal(19,4            Not null   Total due
                                       )                                  from
                                                                          customer.
                                                                                                                  Computed
                                                                                                                  as Subtotal +
                                                                                                                  TaxAmt +
                                                                                                                  Freight.
 Comment                  nvarchar          128                                                  Null             Sales
                                                                                                                  representativ
                                                                                                                  e comments.
 rowguid                  uniqueidentif                                         newid()          Not null         ROWGUIDC
                          ier                                                                                     OL number
                                                                                                                  uniquely
                                                                                                                  identifying
                                                                                                                  the record.
                                                                                                                  Used to
                                                                                                                  support a
                                                                                                                  merge
                                                                                                                  replication
                                                                                                                  sample.
 ModifiedDate             datetime                                              getdate()        Not null         Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesOrderHeader'

 Primary Key Name                                                                           Field Name
 PK_SalesOrderHeader_SalesOrderID                                                           SalesOrderID

Foreign keys for table 'Sales.SalesOrderHeader', 9 items

 Foreign                                                         Primary                                    Key Name
 SalesOrderHeader.BillToAddressID                                Address.AddressID                          FK_SalesOrderHeader_Address_Bill
                                                                                                            ToAddressID
 SalesOrderHeader.ShipToAddressID                                Address.AddressID                          FK_SalesOrderHeader_Address_Sh
                                                                                                            ipToAddressID
 SalesOrderHeader.ContactID                                      Contact.ContactID                          FK_SalesOrderHeader_Contact_Co
                                                                                                            ntactID
 SalesOrderHeader.ShipMethodID                                   ShipMethod.ShipMethodID                    FK_SalesOrderHeader_ShipMethod
                                                                                                            _ShipMethodID
 SalesOrderHeader.CreditCardID                                   CreditCard.CreditCardID                    FK_SalesOrderHeader_CreditCard_
                                                                                                            CreditCardID
 SalesOrderHeader.CurrencyRateID                                 CurrencyRate.CurrencyRateID                FK_SalesOrderHeader_CurrencyRa
                                                                                                            te_CurrencyRateID
 SalesOrderHeader.CustomerID                                     Customer.CustomerID                        FK_SalesOrderHeader_Customer_
                                                                                                            CustomerID
 SalesOrderHeader.SalesPersonID                                  SalesPerson.SalesPersonID                  FK_SalesOrderHeader_SalesPerso
                                                                                                            n_SalesPersonID
 SalesOrderHeader.TerritoryID                                    SalesTerritory.TerritoryID                 FK_SalesOrderHeader_SalesTerrito
                                                                                                            ry_TerritoryID

Indexes for table 'Sales.SalesOrderHeader', 5 items

 Index Name                               Description               Clustered                   Unique                   Fields
 PK_SalesOrderHeader_SalesOrde            Clustered index           Yes                         Yes                      SalesOrderID
 rID                                      created by a primary
                                          key constraint.
 AK_SalesOrderHeader_rowguid              Unique nonclustered       No                          Yes                      rowguid
                                          index. Used to
                                          support replication
                                          samples.
 AK_SalesOrderHeader_SalesOrde            Unique nonclustered       No                          Yes                      SalesOrderNumber
 rNumber                                 index.
 IX_SalesOrderHeader_CustomerID          Nonclustered index.      No                        No                          CustomerID
 IX_SalesOrderHeader_SalesPerso          Nonclustered index.      No                        No                          SalesPersonID
 nID

Triggers for table 'Sales.SalesOrderHeader', 1 item

 Name                                             Description                  Type                             Enabled
 uSalesOrderHeader                                AFTER UPDATE trigger         after Update                     Yes
                                                  that updates the
                                                  RevisionNumber and
                                                  ModifiedDate columns in
                                                  the SalesOrderHeader
                                                  table.Updates the
                                                  SalesYTD column in the
                                                  SalesPerson and
                                                  SalesTerritory tables.

Dependencies for table 'Sales.SalesOrderHeader', 4 items

 Object Name                                                   Type                                      Field Name
 Sales.SalesOrderHeader                                        user table                                SalesOrderID
 Sales.SalesOrderHeader                                        user table                                SubTotal
 Sales.SalesOrderHeader                                        user table                                TaxAmt
 Sales.SalesOrderHeader                                        user table                                Freight


Table: 'Sales.SalesOrderHeaderSalesReason'
3 fields. 24 bytes.

Cross-reference table mapping sales orders to sales reason codes.

 Field Name               Data Type        Size             Original        Default           Nullable         Description     Check
                                                            Type
 SalesOrderID             int                                                                 Not null         Primary key.
                                                                                                               Foreign key
                                                                                                               to
                                                                                                               SalesOrderH
                                                                                                               eader.Sales
                                                                                                               OrderID.
 SalesReasonID            int                                                                 Not null         Primary key.
                                                                                                               Foreign key
                                                                                                               to
                                                                                                               SalesReaso
                                                                                                               n.SalesReas
                                                                                                               onID.
 ModifiedDate             datetime                                          getdate()         Not null         Date and
                                                                                                               time the
                                                                                                               record was
                                                                                                               last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesOrderHeaderSalesReason'

 Primary Key Name                                                                       Field Names
 PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID                              SalesOrderID, SalesReasonID

Foreign keys for table 'Sales.SalesOrderHeaderSalesReason', 2 items
 Foreign                                                   Primary                                     Key Name
 SalesOrderHeaderSalesReason.SalesOrderID                  SalesOrderHeader.SalesOrderID               FK_SalesOrderHeaderSalesReason
                                                                                                       _SalesOrderHeader_SalesOrderID
 SalesOrderHeaderSalesReason.SalesReasonID                 SalesReason.SalesReasonID                   FK_SalesOrderHeaderSalesReason
                                                                                                       _SalesReason_SalesReasonID

Indexes for table 'Sales.SalesOrderHeaderSalesReason', 1 item

 Index Name                         Description               Clustered                Unique                       Fields
 PK_SalesOrderHeaderSalesReaso      Clustered index           Yes                      Yes                          SalesOrderID,
 n_SalesOrderID_SalesReasonID       created by a primary                                                            SalesReasonID
                                    key constraint.

Triggers for table 'Sales.SalesOrderHeaderSalesReason', 1 item

 Name                                        Description                     Type                             Enabled
 uSalesOrderHeaderSalesReason                AFTER UPDATE trigger            after Update                     Yes
                                             setting the ModifiedDate
                                             column in the
                                             SalesOrderHeaderSalesRe
                                             ason table to the current
                                             date.

Dependencies for table 'Sales.SalesOrderHeaderSalesReason', 1 item

 Object Name                                               Type                                        Field Name
 Sales.uSalesOrderHeaderSalesReason                        trigger                                     N/A


Table: 'Sales.SalesPerson'
9 fields. 136 bytes.

Sales representative current information.

 Field Name            Data Type      Size            Original            Default           Nullable        Description      Check
                                                      Type
 SalesPersonID         int                                                                  Not null        Primary key
                                                                                                            for
                                                                                                            SalesPerson
                                                                                                            records.
 TerritoryID           int                                                                  Null            Territory
                                                                                                            currently
                                                                                                            assigned to.
                                                                                                            Foreign key
                                                                                                            to
                                                                                                            SalesTerritor
                                                                                                            y.SalesTerrit
                                                                                                            oryID.
 SalesQuota            money          19,4            decimal(19,4                          Null            Projected        ([SalesQuota
                                                      )                                                     yearly sales.    ]>(0.00))
 Bonus                 money          19,4            decimal(19,4        (0.00)            Not null        Bonus due if     ([Bonus]>=(0
                                                      )                                                     quota is met.    .00))
 CommissionPct         smallmoney     10,4            decimal(10,4        (0.00)            Not null        Commision        ([Commissio
                                                      )                                                     percent          nPct]>=(0.00
                                                                                                            received per     ))
                                                                                                            sale.
 SalesYTD              money          19,4            decimal(19,4        (0.00)            Not null        Sales total      ([SalesYTD]
                                                      )                                                     year to date.    >=(0.00))
 SalesLastYear         money          19,4            decimal(19,4        (0.00)            Not null        Sales total of   ([SalesLastY
                                                      )                                                     previous         ear]>=(0.00))
                                                                                                                    year.
 rowguid                   uniqueidentif                                         newid()           Not null         ROWGUIDC
                           ier                                                                                      OL number
                                                                                                                    uniquely
                                                                                                                    identifying
                                                                                                                    the record.
                                                                                                                    Used to
                                                                                                                    support a
                                                                                                                    merge
                                                                                                                    replication
                                                                                                                    sample.
 ModifiedDate              datetime                                              getdate()         Not null         Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesPerson'

 Primary Key Name                                                                            Field Name
 PK_SalesPerson_SalesPersonID                                                                SalesPersonID

Foreign keys for table 'Sales.SalesPerson', 2 items

 Foreign                                                          Primary                                     Key Name
 SalesPerson.SalesPersonID                                        Employee.EmployeeID                         FK_SalesPerson_Employee_SalesP
                                                                                                              ersonID
 SalesPerson.TerritoryID                                          SalesTerritory.TerritoryID                  FK_SalesPerson_SalesTerritory_Te
                                                                                                              rritoryID

Indexes for table 'Sales.SalesPerson', 2 items

 Index Name                                Description               Clustered                   Unique                    Fields
 PK_SalesPerson_SalesPersonID              Clustered index           Yes                         Yes                       SalesPersonID
                                           created by a primary
                                           key constraint.
 AK_SalesPerson_rowguid                    Unique nonclustered       No                          Yes                       rowguid
                                           index. Used to
                                           support replication
                                           samples.

Triggers for table 'Sales.SalesPerson', 1 item

 Name                                              Description                      Type                             Enabled
 uSalesPerson                                      AFTER UPDATE trigger             after Update                     Yes
                                                   setting the ModifiedDate
                                                   column in the SalesPerson
                                                   table to the current date.

Dependencies for table 'Sales.SalesPerson', 9 items

 Object Name                                                      Type                                        Field Name
 Sales.CK_SalesPerson_Bonus                                       check cns                                   N/A
 Sales.CK_SalesPerson_CommissionPct                               check cns                                   N/A
 Sales.CK_SalesPerson_SalesLastYear                               check cns                                   N/A
 Sales.CK_SalesPerson_SalesQuota                                  check cns                                   N/A
 Sales.CK_SalesPerson_SalesYTD                                    check cns                                   N/A
 Sales.uSalesOrderHeader                                          trigger                                     N/A
 Sales.uSalesPerson                                               trigger                                     N/A
 Sales.vSalesPerson                                              view                                       N/A
 Sales.vSalesPersonSalesByFiscalYears                            view                                       N/A


Table: 'Sales.SalesPersonQuotaHistory'
5 fields. 73 bytes.

Sales performance tracking.

 Field Name               Data Type         Size            Original            Default          Nullable         Description       Check
                                                            Type
 SalesPersonID            int                                                                    Not null         Sales person
                                                                                                                  identification
                                                                                                                  number.
                                                                                                                  Foreign key
                                                                                                                  to
                                                                                                                  SalesPerson
                                                                                                                  .SalesPerso
                                                                                                                  nID.
 QuotaDate                datetime                                                               Not null         Sales quota
                                                                                                                  date.
 SalesQuota               money             19,4            decimal(19,4                         Not null         Sales quota       ([SalesQuota
                                                            )                                                     amount.           ]>(0.00))
 rowguid                  uniqueidentif                                         newid()          Not null         ROWGUIDC
                          ier                                                                                     OL number
                                                                                                                  uniquely
                                                                                                                  identifying
                                                                                                                  the record.
                                                                                                                  Used to
                                                                                                                  support a
                                                                                                                  merge
                                                                                                                  replication
                                                                                                                  sample.
 ModifiedDate             datetime                                              getdate()        Not null         Date and
                                                                                                                  time the
                                                                                                                  record was
                                                                                                                  last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesPersonQuotaHistory'

 Primary Key Name                                                                           Field Names
 PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDate                                         SalesPersonID, QuotaDate

Foreign keys for table 'Sales.SalesPersonQuotaHistory', 1 item

 Foreign                                                         Primary                                    Key Name
 SalesPersonQuotaHistory.SalesPersonID                           SalesPerson.SalesPersonID                  FK_SalesPersonQuotaHistory_Sale
                                                                                                            sPerson_SalesPersonID

Indexes for table 'Sales.SalesPersonQuotaHistory', 2 items

 Index Name                               Description               Clustered                   Unique                    Fields
 PK_SalesPersonQuotaHistory_Sal           Clustered index           Yes                         Yes                       SalesPersonID,
 esPersonID_QuotaDate                     created by a primary                                                            QuotaDate
                                          key constraint.
 AK_SalesPersonQuotaHistory_row           Unique nonclustered       No                          Yes                       rowguid
 guid                                     index. Used to
                                          support replication
                                            samples.

Triggers for table 'Sales.SalesPersonQuotaHistory', 1 item

 Name                                                Description                     Type                             Enabled
 uSalesPersonQuotaHistory                            AFTER UPDATE trigger            after Update                     Yes
                                                     setting the ModifiedDate
                                                     column in the
                                                     SalesPersonQuotaHistory
                                                     table to the current date.

Dependencies for table 'Sales.SalesPersonQuotaHistory', 2 items

 Object Name                                                       Type                                        Field Name
 Sales.CK_SalesPersonQuotaHistory_SalesQuota                       check cns                                   N/A
 Sales.uSalesPersonQuotaHistory                                    trigger                                     N/A


Table: 'Sales.SalesReason'
4 fields. 220 bytes.

Lookup table of customer purchase reasons.

 Field Name                Data Type          Size             Original           Default           Nullable        Description     Check
                                                               Type
 SalesReasonID             int identity                        int                                  Not null        Primary key
                                                                                                                    for
                                                                                                                    SalesReaso
                                                                                                                    n records.
 Name                      Name                                nvarchar(50)                         Not null        Sales reason
                                                                                                                    description.
 ReasonType                Name                                nvarchar(50)                         Not null        Category the
                                                                                                                    sales reason
                                                                                                                    belongs to.
 ModifiedDate              datetime                                               getdate()         Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesReason'

 Primary Key Name                                                                             Field Name
 PK_SalesReason_SalesReasonID                                                                 SalesReasonID
There are no Foreign Keys for this table.

Indexes for table 'Sales.SalesReason', 1 item

 Index Name                                 Description               Clustered                  Unique                     Fields
 PK_SalesReason_SalesReasonID               Clustered index           Yes                        Yes                        SalesReasonID
                                            created by a primary
                                            key constraint.

Triggers for table 'Sales.SalesReason', 1 item

 Name                                                Description                     Type                             Enabled
 uSalesReason                                        AFTER UPDATE trigger            after Update                     Yes
                                                 setting the ModifiedDate
                                                 column in the SalesReason
                                                 table to the current date.

Dependencies for table 'Sales.SalesReason', 1 item

 Object Name                                                 Type                                Field Name
 Sales.uSalesReason                                          trigger                             N/A


Table: 'Sales.SalesTaxRate'
7 fields. 153 bytes.

Tax rate lookup table.

 Field Name               Data Type       Size             Original       Default     Nullable        Description      Check
                                                           Type
 SalesTaxRateID           int identity                     int                        Not null        Primary key
                                                                                                      for
                                                                                                      SalesTaxRat
                                                                                                      e records.
 StateProvinceID          int                                                         Not null        State,
                                                                                                      province, or
                                                                                                      country/regio
                                                                                                      n the sales
                                                                                                      tax applies
                                                                                                      to.
 TaxType                  tinyint                                                     Not null        1 = Tax          ([TaxType]>
                                                                                                      applied to       =(1) AND
                                                                                                      retail           [TaxType]<=
                                                                                                      transactions,    (3))
                                                                                                      2 = Tax
                                                                                                      applied to
                                                                                                      wholesale
                                                                                                      transactions,
                                                                                                      3 = Tax
                                                                                                      applied to all
                                                                                                      sales (retail
                                                                                                      and
                                                                                                      wholesale)
                                                                                                      transactions.
 TaxRate                  smallmoney      10,4             decimal(10,4   (0.00)      Not null        Tax rate
                                                           )                                          amount.
 Name                     Name                             nvarchar(50)               Not null        Tax rate
                                                                                                      description.
 rowguid                  uniqueidentif                                   newid()     Not null        ROWGUIDC
                          ier                                                                         OL number
                                                                                                      uniquely
                                                                                                      identifying
                                                                                                      the record.
                                                                                                      Used to
                                                                                                      support a
                                                                                                      merge
                                                                                                      replication
                                                                                                      sample.
 ModifiedDate             datetime                                        getdate()   Not null        Date and
                                                                                                      time the
                                                                                                      record was
                                                                                                      last updated.

Extended Properties
The object has no extended properties.
Primary key for table 'Sales.SalesTaxRate'

 Primary Key Name                                                                     Field Name
 PK_SalesTaxRate_SalesTaxRateID                                                       SalesTaxRateID

Foreign keys for table 'Sales.SalesTaxRate', 1 item

 Foreign                                                     Primary                                     Key Name
 SalesTaxRate.StateProvinceID                                StateProvince.StateProvinceID               FK_SalesTaxRate_StateProvince_S
                                                                                                         tateProvinceID

Indexes for table 'Sales.SalesTaxRate', 3 items

 Index Name                           Description               Clustered                 Unique                      Fields
 PK_SalesTaxRate_SalesTaxRateI        Clustered index           Yes                       Yes                         SalesTaxRateID
 D                                    created by a primary
                                      key constraint.
 AK_SalesTaxRate_rowguid              Unique nonclustered       No                        Yes                         rowguid
                                      index. Used to
                                      support replication
                                      samples.
 AK_SalesTaxRate_StateProvinceI       Unique nonclustered       No                        Yes                         StateProvinceID,
 D_TaxType                            index.                                                                          TaxType

Triggers for table 'Sales.SalesTaxRate', 1 item

 Name                                          Description                     Type                             Enabled
 uSalesTaxRate                                 AFTER UPDATE trigger            after Update                     Yes
                                               setting the ModifiedDate
                                               column in the
                                               SalesTaxRate table to the
                                               current date.

Dependencies for table 'Sales.SalesTaxRate', 2 items

 Object Name                                                 Type                                        Field Name
 Sales.CK_SalesTaxRate_TaxType                               check cns                                   N/A
 Sales.uSalesTaxRate                                         trigger                                     N/A


Table: 'Sales.SalesTerritory'
10 fields. 326 bytes.

Sales territory lookup table.

 Field Name            Data Type        Size             Original           Default           Nullable        Description       Check
                                                         Type
 TerritoryID           int identity                      int                                  Not null        Primary key
                                                                                                              for
                                                                                                              SalesTerritor
                                                                                                              y records.
 Name                  Name                              nvarchar(50)                         Not null        Sales
                                                                                                              territory
                                                                                                              description
 CountryRegionCode     nvarchar         3                                                     Not null        ISO
                                                                                                              standard
                                                                                                              country or
                                                                                                              region code.
                                                                                                              Foreign key
                                                                                                           to
                                                                                                           CountryRegi
                                                                                                           on.CountryR
                                                                                                           egionCode.
 Group                     nvarchar           50                                                Not null   Geographic
                                                                                                           area to
                                                                                                           which the
                                                                                                           sales
                                                                                                           territory
                                                                                                           belong.
 SalesYTD                  money              19,4            decimal(19,4     (0.00)           Not null   Sales in the      ([SalesYTD]
                                                              )                                            territory year    >=(0.00))
                                                                                                           to date.
 SalesLastYear             money              19,4            decimal(19,4     (0.00)           Not null   Sales in the      ([SalesLastY
                                                              )                                            territory the     ear]>=(0.00))
                                                                                                           previous
                                                                                                           year.
 CostYTD                   money              19,4            decimal(19,4     (0.00)           Not null   Business          ([CostYTD]>
                                                              )                                            costs in the      =(0.00))
                                                                                                           territory year
                                                                                                           to date.
 CostLastYear              money              19,4            decimal(19,4     (0.00)           Not null   Business          ([CostLastYe
                                                              )                                            costs in the      ar]>=(0.00))
                                                                                                           territory the
                                                                                                           previous
                                                                                                           year.
 rowguid                   uniqueidentif                                       newid()          Not null   ROWGUIDC
                           ier                                                                             OL number
                                                                                                           uniquely
                                                                                                           identifying
                                                                                                           the record.
                                                                                                           Used to
                                                                                                           support a
                                                                                                           merge
                                                                                                           replication
                                                                                                           sample.
 ModifiedDate              datetime                                            getdate()        Not null   Date and
                                                                                                           time the
                                                                                                           record was
                                                                                                           last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesTerritory'

 Primary Key Name                                                                          Field Name
 PK_SalesTerritory_TerritoryID                                                             TerritoryID
There are no Foreign Keys for this table.

Indexes for table 'Sales.SalesTerritory', 3 items

 Index Name                                 Description            Clustered                   Unique              Fields
 PK_SalesTerritory_TerritoryID              Clustered index        Yes                         Yes                 TerritoryID
                                            created by a primary
                                            key constraint.
 AK_SalesTerritory_Name                     Unique nonclustered    No                          Yes                 Name
                                            index.
 AK_SalesTerritory_rowguid                  Unique nonclustered    No                          Yes                 rowguid
                                            index. Used to
                                            support replication
                                            samples.

Triggers for table 'Sales.SalesTerritory', 1 item
 Name                                           Description                      Type                             Enabled
 uSalesTerritory                                AFTER UPDATE trigger             after Update                     Yes
                                                setting the ModifiedDate
                                                column in the
                                                SalesTerritory table to the
                                                current date.

Dependencies for table 'Sales.SalesTerritory', 8 items

 Object Name                                                  Type                                         Field Name
 Sales.CK_SalesTerritory_CostLastYear                         check cns                                    N/A
 Sales.CK_SalesTerritory_CostYTD                              check cns                                    N/A
 Sales.CK_SalesTerritory_SalesLastYear                        check cns                                    N/A
 Sales.CK_SalesTerritory_SalesYTD                             check cns                                    N/A
 Sales.uSalesOrderHeader                                      trigger                                      N/A
 Sales.uSalesTerritory                                        trigger                                      N/A
 Sales.vSalesPerson                                           view                                         N/A
 Sales.vSalesPersonSalesByFiscalYears                         view                                         N/A


Table: 'Sales.SalesTerritoryHistory'
6 fields. 72 bytes.

Sales representative transfers to other sales territories.

 Field Name             Data Type        Size              Original           Default           Nullable        Description      Check
                                                           Type
 SalesPersonID          int                                                                     Not null        Primary key
                                                                                                                for
                                                                                                                SalesTerritor
                                                                                                                yHistory
                                                                                                                records.
 TerritoryID            int                                                                     Not null        Territory
                                                                                                                identification
                                                                                                                number.
                                                                                                                Foreign key
                                                                                                                to
                                                                                                                SalesTerritor
                                                                                                                y.SalesTerrit
                                                                                                                oryID.
 StartDate              datetime                                                                Not null        Date the
                                                                                                                sales
                                                                                                                representive
                                                                                                                started work
                                                                                                                in the
                                                                                                                territory.
 EndDate                datetime                                                                Null            Date the
                                                                                                                sales
                                                                                                                representativ
                                                                                                                e left work in
                                                                                                                the territory.
 rowguid                uniqueidentif                                         newid()           Not null        ROWGUIDC
                        ier                                                                                     OL number
                                                                                                                uniquely
                                                                                                                identifying
                                                                                                                the record.
                                                                                                                Used to
                                                                                                                support a
                                                                                                                merge
                                                                                                                replication
                                                                                                                sample.
 ModifiedDate             datetime                                              getdate()         Not null         Date and
                                                                                                                   time the
                                                                                                                   record was
                                                                                                                   last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SalesTerritoryHistory'

 Primary Key Name                                                                           Field Names
 PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID                               SalesPersonID, StartDate, TerritoryID

Foreign keys for table 'Sales.SalesTerritoryHistory', 2 items

 Foreign                                                        Primary                                      Key Name
 SalesTerritoryHistory.SalesPersonID                            SalesPerson.SalesPersonID                    FK_SalesTerritoryHistory_SalesPers
                                                                                                             on_SalesPersonID
 SalesTerritoryHistory.TerritoryID                              SalesTerritory.TerritoryID                   FK_SalesTerritoryHistory_SalesTerri
                                                                                                             tory_TerritoryID

Indexes for table 'Sales.SalesTerritoryHistory', 2 items

 Index Name                              Description               Clustered                    Unique                    Fields
 PK_SalesTerritoryHistory_SalesPe        Clustered index           Yes                          Yes                       SalesPersonID,
 rsonID_StartDate_TerritoryID            created by a primary                                                             StartDate, TerritoryID
                                         key constraint.
 AK_SalesTerritoryHistory_rowguid        Unique nonclustered       No                           Yes                       rowguid
                                         index. Used to
                                         support replication
                                         samples.

Triggers for table 'Sales.SalesTerritoryHistory', 1 item

 Name                                             Description                      Type                              Enabled
 uSalesTerritoryHistory                           AFTER UPDATE trigger             after Update                      Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  SalesTerritoryHistory table
                                                  to the current date.

Dependencies for table 'Sales.SalesTerritoryHistory', 2 items

 Object Name                                                    Type                                         Field Name
 Sales.CK_SalesTerritoryHistory_EndDate                         check cns                                    N/A
 Sales.uSalesTerritoryHistory                                   trigger                                      N/A


Table: 'Sales.ShoppingCartItem'
6 fields. 144 bytes.

Contains online customer orders until the order is submitted or cancelled.

 Field Name               Data Type        Size              Original           Default           Nullable         Description      Check
                                                             Type
 ShoppingCartItemID       int identity                       int                                  Not null         Primary key
                                                                                                                   for
                                                                                                                   ShoppingCar
                                                                                                                   tItem
                                                                                                                    records.
 ShoppingCartID           nvarchar         50                                                       Not null        Shopping
                                                                                                                    cart
                                                                                                                    identification
                                                                                                                    number.
 Quantity                 int                                                  (1)                  Not null        Product          ([Quantity]>=
                                                                                                                    quantity         (1))
                                                                                                                    ordered.
 ProductID                int                                                                       Not null        Product
                                                                                                                    ordered.
                                                                                                                    Foreign key
                                                                                                                    to
                                                                                                                    Product.Prod
                                                                                                                    uctID.
 DateCreated              datetime                                             getdate()            Not null        Date the
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    created.
 ModifiedDate             datetime                                             getdate()            Not null        Date and
                                                                                                                    time the
                                                                                                                    record was
                                                                                                                    last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.ShoppingCartItem'

 Primary Key Name                                                                          Field Name
 PK_ShoppingCartItem_ShoppingCartItemID                                                    ShoppingCartItemID

Foreign keys for table 'Sales.ShoppingCartItem', 1 item

 Foreign                                                        Primary                                        Key Name
 ShoppingCartItem.ProductID                                     Product.ProductID                              FK_ShoppingCartItem_Product_Pro
                                                                                                               ductID

Indexes for table 'Sales.ShoppingCartItem', 2 items

 Index Name                              Description               Clustered                   Unique                       Fields
 PK_ShoppingCartItem_ShoppingC           Clustered index           Yes                         Yes                          ShoppingCartItemID
 artItemID                               created by a primary
                                         key constraint.
 IX_ShoppingCartItem_ShoppingCa          Nonclustered index.       No                          No                           ShoppingCartID,
 rtID_ProductID                                                                                                             ProductID

Triggers for table 'Sales.ShoppingCartItem', 1 item

 Name                                            Description                         Type                             Enabled
 uShoppingCartItem                               AFTER UPDATE trigger                after Update                     Yes
                                                 setting the ModifiedDate
                                                 column in the
                                                 ShoppingCartItem table to
                                                 the current date.

Dependencies for table 'Sales.ShoppingCartItem', 2 items

 Object Name                                                    Type                                           Field Name
 Sales.CK_ShoppingCartItem_Quantity                             check cns                                      N/A
 Sales.uShoppingCartItem                                        trigger                                        N/A
Table: 'Sales.SpecialOffer'
11 fields. 798 bytes.

Sale discounts lookup table.

 Field Name                Data Type        Size   Original       Default          Nullable    Description     Check
                                                   Type
 SpecialOfferID            int identity            int                             Not null    Primary key
                                                                                               for
                                                                                               SpecialOffer
                                                                                               records.
 Description               nvarchar         255                                    Not null    Discount
                                                                                               description.
 DiscountPct               smallmoney       10,4   decimal(10,4   (0.00)           Not null    Discount        ([DiscountPc
                                                   )                                           precentage.     t]>=(0.00))
 Type                      nvarchar         50                                     Not null    Discount
                                                                                               type
                                                                                               category.
 Category                  nvarchar         50                                     Not null    Group the
                                                                                               discount
                                                                                               applies to
                                                                                               such as
                                                                                               Reseller or
                                                                                               Customer.
 StartDate                 datetime                                                Not null    Discount
                                                                                               start date.
 EndDate                   datetime                                                Not null    Discount end
                                                                                               date.
 MinQty                    int                                    (0)              Not null    Minimum         ([MinQty]>=(
                                                                                               discount        0))
                                                                                               percent
                                                                                               allowed.
 MaxQty                    int                                                     Null        Maximum         ([MaxQty]>=(
                                                                                               discount        0))
                                                                                               percent
                                                                                               allowed.
 rowguid                   uniqueidentif                          newid()          Not null    ROWGUIDC
                           ier                                                                 OL number
                                                                                               uniquely
                                                                                               identifying
                                                                                               the record.
                                                                                               Used to
                                                                                               support a
                                                                                               merge
                                                                                               replication
                                                                                               sample.
 ModifiedDate              datetime                               getdate()        Not null    Date and
                                                                                               time the
                                                                                               record was
                                                                                               last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SpecialOffer'

 Primary Key Name                                                             Field Name
 PK_SpecialOffer_SpecialOfferID                                               SpecialOfferID
There are no Foreign Keys for this table.

Indexes for table 'Sales.SpecialOffer', 2 items
 Index Name                             Description               Clustered                Unique                       Fields
 PK_SpecialOffer_SpecialOfferID         Clustered index           Yes                      Yes                          SpecialOfferID
                                        created by a primary
                                        key constraint.
 AK_SpecialOffer_rowguid                Unique nonclustered       No                       Yes                          rowguid
                                        index. Used to
                                        support replication
                                        samples.

Triggers for table 'Sales.SpecialOffer', 1 item

 Name                                            Description                     Type                             Enabled
 uSpecialOffer                                   AFTER UPDATE trigger            after Update                     Yes
                                                 setting the ModifiedDate
                                                 column in the SpecialOffer
                                                 table to the current date.

Dependencies for table 'Sales.SpecialOffer', 5 items

 Object Name                                                   Type                                        Field Name
 Sales.CK_SpecialOffer_DiscountPct                             check cns                                   N/A
 Sales.CK_SpecialOffer_EndDate                                 check cns                                   N/A
 Sales.CK_SpecialOffer_MaxQty                                  check cns                                   N/A
 Sales.CK_SpecialOffer_MinQty                                  check cns                                   N/A
 Sales.uSpecialOffer                                           trigger                                     N/A


Table: 'Sales.SpecialOfferProduct'
4 fields. 40 bytes.

Cross-reference table mapping products to special offer discounts.

 Field Name             Data Type         Size             Original           Default           Nullable        Description       Check
                                                           Type
 SpecialOfferID         int                                                                     Not null        Primary key
                                                                                                                for
                                                                                                                SpecialOffer
                                                                                                                Product
                                                                                                                records.
 ProductID              int                                                                     Not null        Product
                                                                                                                identification
                                                                                                                number.
                                                                                                                Foreign key
                                                                                                                to
                                                                                                                Product.Prod
                                                                                                                uctID.
 rowguid                uniqueidentif                                         newid()           Not null        ROWGUIDC
                        ier                                                                                     OL number
                                                                                                                uniquely
                                                                                                                identifying
                                                                                                                the record.
                                                                                                                Used to
                                                                                                                support a
                                                                                                                merge
                                                                                                                replication
                                                                                                                sample.
 ModifiedDate           datetime                                              getdate()         Not null        Date and
                                                                                                                time the
                                                                                                                record was
                                                                                                                last updated.
Extended Properties
The object has no extended properties.

Primary key for table 'Sales.SpecialOfferProduct'

 Primary Key Name                                                                        Field Names
 PK_SpecialOfferProduct_SpecialOfferID_ProductID                                         SpecialOfferID, ProductID

Foreign keys for table 'Sales.SpecialOfferProduct', 2 items

 Foreign                                                        Primary                                     Key Name
 SpecialOfferProduct.ProductID                                  Product.ProductID                           FK_SpecialOfferProduct_Product_P
                                                                                                            roductID
 SpecialOfferProduct.SpecialOfferID                             SpecialOffer.SpecialOfferID                 FK_SpecialOfferProduct_SpecialOff
                                                                                                            er_SpecialOfferID

Indexes for table 'Sales.SpecialOfferProduct', 3 items

 Index Name                              Description               Clustered                  Unique                     Fields
 PK_SpecialOfferProduct_SpecialOf        Clustered index           Yes                        Yes                        SpecialOfferID,
 ferID_ProductID                         created by a primary                                                            ProductID
                                         key constraint.
 AK_SpecialOfferProduct_rowguid          Unique nonclustered       No                         Yes                        rowguid
                                         index. Used to
                                         support replication
                                         samples.
 IX_SpecialOfferProduct_ProductID        Nonclustered index.       No                         No                         ProductID

Triggers for table 'Sales.SpecialOfferProduct', 1 item

 Name                                             Description                     Type                              Enabled
 uSpecialOfferProduct                             AFTER UPDATE trigger            after Update                      Yes
                                                  setting the ModifiedDate
                                                  column in the
                                                  SpecialOfferProduct table
                                                  to the current date.

Dependencies for table 'Sales.SpecialOfferProduct', 1 item

 Object Name                                                    Type                                        Field Name
 Sales.uSpecialOfferProduct                                     trigger                                     N/A


Table: 'Sales.Store'
6 fields. 140 bytes.

Customers (resellers) of Adventure Works products.

 Field Name               Data Type        Size             Original           Default           Nullable         Description      Check
                                                            Type
 CustomerID               int                                                                    Not null         Primary key.
                                                                                                                  Foreign key
                                                                                                                  to
                                                                                                                  Customer.C
                                                                                                                  ustomerID.
 Name                     Name                              nvarchar(50)                         Not null         Name of the
                                                                                                                  store.
 SalesPersonID            int                                                                    Null             ID of the
                                                                                                                  sales person
                                                                                                                 assigned to
                                                                                                                 the
                                                                                                                 customer.
                                                                                                                 Foreign key
                                                                                                                 to
                                                                                                                 SalesPerson
                                                                                                                 .SalesPerso
                                                                                                                 nID.
 Demographics             xml                                                                    Null            Demographi
                                                                                                                 c
                                                                                                                 informationg
                                                                                                                 about the
                                                                                                                 store such
                                                                                                                 as the
                                                                                                                 number of
                                                                                                                 employees,
                                                                                                                 annual sales
                                                                                                                 and store
                                                                                                                 type.
 rowguid                  uniqueidentif                                         newid()          Not null        ROWGUIDC
                          ier                                                                                    OL number
                                                                                                                 uniquely
                                                                                                                 identifying
                                                                                                                 the record.
                                                                                                                 Used to
                                                                                                                 support a
                                                                                                                 merge
                                                                                                                 replication
                                                                                                                 sample.
 ModifiedDate             datetime                                              getdate()        Not null        Date and
                                                                                                                 time the
                                                                                                                 record was
                                                                                                                 last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.Store'

 Primary Key Name                                                                           Field Name
 PK_Store_CustomerID                                                                        CustomerID

Foreign keys for table 'Sales.Store', 2 items

 Foreign                                                         Primary                                    Key Name
 Store.CustomerID                                                Customer.CustomerID                        FK_Store_Customer_CustomerID
 Store.SalesPersonID                                             SalesPerson.SalesPersonID                  FK_Store_SalesPerson_SalesPerso
                                                                                                            nID

Indexes for table 'Sales.Store', 3 items

 Index Name                               Description               Clustered                  Unique                   Fields
 PK_Store_CustomerID                      Clustered index           Yes                        Yes                      CustomerID
                                          created by a primary
                                          key constraint.
 AK_Store_rowguid                         Unique nonclustered       No                         Yes                      rowguid
                                          index. Used to
                                          support replication
                                          samples.
 IX_Store_SalesPersonID                   Nonclustered index.       No                         No                       SalesPersonID

Triggers for table 'Sales.Store', 2 items
 Name                                         Description                    Type                             Enabled
 iStore                                       AFTER INSERT trigger           after Insert                     Yes
                                              inserting Store only if the
                                              Customer does not exist in
                                              the Individual table.
 uStore                                       AFTER UPDATE trigger           after Update                     Yes
                                              setting the ModifiedDate
                                              column in the Store table to
                                              the current date.

Dependencies for table 'Sales.Store', 3 items

 Object Name                                               Type                                        Field Name
 Sales.iuIndividual                                        trigger                                     N/A
 Sales.uStore                                              trigger                                     N/A
 Sales.vStoreWithDemographics                              view                                        N/A


Table: 'Sales.StoreContact'
5 fields. 44 bytes.

Cross-reference table mapping stores and their employees.

 Field Name            Data Type       Size              Original        Default            Nullable        Description      Check
                                                         Type
 CustomerID            int                                                                  Not null        Store
                                                                                                            identification
                                                                                                            number.
                                                                                                            Foreign key
                                                                                                            to
                                                                                                            Customer.C
                                                                                                            ustomerID.
 ContactID             int                                                                  Not null        Contact
                                                                                                            (store
                                                                                                            employee)
                                                                                                            identification
                                                                                                            number.
                                                                                                            Foreign key
                                                                                                            to
                                                                                                            Contact.Cont
                                                                                                            actID.
 ContactTypeID         int                                                                  Not null        Contact type
                                                                                                            such as
                                                                                                            owner or
                                                                                                            purchasing
                                                                                                            agent.
                                                                                                            Foreign key
                                                                                                            to
                                                                                                            ContactType
                                                                                                            .ContactTyp
                                                                                                            eID.
 rowguid               uniqueidentif                                     newid()            Not null        ROWGUIDC
                       ier                                                                                  OL number
                                                                                                            uniquely
                                                                                                            identifying
                                                                                                            the record.
                                                                                                            Used to
                                                                                                            support a
                                                                                                            merge
                                                                                                            replication
                                                                                                            sample.
 ModifiedDate          datetime                                          getdate()          Not null        Date and
                                                                                                           time the
                                                                                                           record was
                                                                                                           last updated.

Extended Properties
The object has no extended properties.

Primary key for table 'Sales.StoreContact'

 Primary Key Name                                                                      Field Names
 PK_StoreContact_CustomerID_ContactID                                                  CustomerID, ContactID

Foreign keys for table 'Sales.StoreContact', 3 items

 Foreign                                                        Primary                              Key Name
 StoreContact.ContactID                                         Contact.ContactID                    FK_StoreContact_Contact_ContactI
                                                                                                     D
 StoreContact.ContactTypeID                                     ContactType.ContactTypeID            FK_StoreContact_ContactType_Con
                                                                                                     tactTypeID
 StoreContact.CustomerID                                        Store.CustomerID                     FK_StoreContact_Store_CustomerI
                                                                                                     D

Indexes for table 'Sales.StoreContact', 4 items

 Index Name                              Description               Clustered                Unique                 Fields
 PK_StoreContact_CustomerID_Co           Clustered index           Yes                      Yes                    CustomerID,
 ntactID                                 created by a primary                                                      ContactID
                                         key constraint.
 AK_StoreContact_rowguid                 Unique nonclustered       No                       Yes                    rowguid
                                         index. Used to
                                         support replication
                                         samples.
 IX_StoreContact_ContactID               Nonclustered index.       No                       No                     ContactID
 IX_StoreContact_ContactTypeID           Nonclustered index.       No                       No                     ContactTypeID

Triggers for table 'Sales.StoreContact', 1 item

 Name                                            Description                     Type                          Enabled
 uStoreContact                                   AFTER UPDATE trigger            after Update                  Yes
                                                 setting the ModifiedDate
                                                 column in the StoreContact
                                                 table to the current date.

Dependencies for table 'Sales.StoreContact', 3 items

 Object Name                                                    Type                                 Field Name
 dbo.ufnGetContactInformation                                   table function                       N/A
 Sales.uStoreContact                                            trigger                              N/A
 Sales.vStoreWithDemographics                                   view                                 N/A


Views, 17 items
View: 'HumanResources.vEmployee', Employee names and addresses.
 Field Name                                                                            Type and Size
 EmployeeID                                                                            int NOT NULL
 Title                                                                                 nvarchar(8) NULL
 FirstName                                                                             Name NOT NULL
 MiddleName                                                                            Name NULL
LastName                                  Name NOT NULL
Suffix                                    nvarchar(10) NULL
JobTitle                                  nvarchar(50) NOT NULL
Phone                                     Phone NULL
EmailAddress                              nvarchar(50) NULL
EmailPromotion                            int NOT NULL
AddressLine1                              nvarchar(60) NOT NULL
AddressLine2                              nvarchar(60) NULL
City                                      nvarchar(30) NOT NULL
StateProvinceName                         Name NOT NULL
PostalCode                                nvarchar(15) NOT NULL
CountryRegionName                         Name NOT NULL
AdditionalContactInfo                     xml NULL


View: 'HumanResources.vEmployeeDepartment', Returns employee name,
title, and current department.
Field Name                                Type and Size
EmployeeID                                int NOT NULL
Title                                     nvarchar(8) NULL
FirstName                                 Name NOT NULL
MiddleName                                Name NULL
LastName                                  Name NOT NULL
Suffix                                    nvarchar(10) NULL
JobTitle                                  nvarchar(50) NOT NULL
Department                                Name NOT NULL
GroupName                                 Name NOT NULL
StartDate                                 datetime NOT NULL


View: 'HumanResources.vEmployeeDepartmentHistory', Returns
employee name and current and previous departments.
Field Name                                Type and Size
EmployeeID                                int NOT NULL
Title                                     nvarchar(8) NULL
FirstName                                 Name NOT NULL
MiddleName                                Name NULL
LastName                                  Name NOT NULL
Suffix                                    nvarchar(10) NULL
Shift                                     Name NOT NULL
Department                                Name NOT NULL
GroupName                                 Name NOT NULL
StartDate                                 datetime NOT NULL
EndDate                                   datetime NULL


View: 'HumanResources.vJobCandidate', Job candidate names and
resumes.
Field Name                                Type and Size
JobCandidateID                            int identity NOT NULL
EmployeeID                                int NULL
Name.Prefix                               nvarchar(30) NULL
Name.First                                nvarchar(30) NULL
Name.Middle                               nvarchar(30) NULL
Name.Last                                 nvarchar(30) NULL
Name.Suffix                               nvarchar(30) NULL
Skills                                    nvarchar(max) NULL
Addr.Type                                 nvarchar(30) NULL
Addr.Loc.CountryRegion                    nvarchar(100) NULL
Addr.Loc.State                                nvarchar(100) NULL
Addr.Loc.City                                 nvarchar(100) NULL
Addr.PostalCode                               nvarchar(20) NULL
EMail                                         nvarchar(max) NULL
WebSite                                       nvarchar(max) NULL
ModifiedDate                                  datetime NOT NULL


View: 'HumanResources.vJobCandidateEducation', Displays the content
from each education related element in the xml column Resume in the
HumanResources.JobCandidate table. The content has been localized into
French, Simplified Chinese and Thai. Some data may not display correctly
unless supplemental language support is installed.
Field Name                                    Type and Size
JobCandidateID                                int identity NOT NULL
Edu.Level                                     nvarchar(max) NULL
Edu.StartDate                                 datetime NULL
Edu.EndDate                                   datetime NULL
Edu.Degree                                    nvarchar(50) NULL
Edu.Major                                     nvarchar(50) NULL
Edu.Minor                                     nvarchar(50) NULL
Edu.GPA                                       nvarchar(5) NULL
Edu.GPAScale                                  nvarchar(5) NULL
Edu.School                                    nvarchar(100) NULL
Edu.Loc.CountryRegion                         nvarchar(100) NULL
Edu.Loc.State                                 nvarchar(100) NULL
Edu.Loc.City                                  nvarchar(100) NULL


View: 'HumanResources.vJobCandidateEmployment', Displays the content
from each employement history related element in the xml column Resume
in the HumanResources.JobCandidate table. The content has been
localized into French, Simplified Chinese and Thai. Some data may not
display correctly unless supplemental language support is installed.
Field Name                                    Type and Size
JobCandidateID                                int identity NOT NULL
Emp.StartDate                                 datetime NULL
Emp.EndDate                                   datetime NULL
Emp.OrgName                                   nvarchar(100) NULL
Emp.JobTitle                                  nvarchar(100) NULL
Emp.Responsibility                            nvarchar(max) NULL
Emp.FunctionCategory                          nvarchar(max) NULL
Emp.IndustryCategory                          nvarchar(max) NULL
Emp.Loc.CountryRegion                         nvarchar(max) NULL
Emp.Loc.State                                 nvarchar(max) NULL
Emp.Loc.City                                  nvarchar(max) NULL


View: 'Person.vAdditionalContactInfo', Displays the contact name and
content from each element in the xml column AdditionalContactInfo for
that person.
Field Name                                    Type and Size
ContactID                                     int identity NOT NULL
FirstName                                     Name NOT NULL
MiddleName                                    Name NULL
LastName                                      Name NOT NULL
TelephoneNumber                                nvarchar(50) NULL
TelephoneSpecialInstructions                   nvarchar(max) NULL
Street                                         nvarchar(50) NULL
City                                           nvarchar(50) NULL
StateProvince                                  nvarchar(50) NULL
PostalCode                                     nvarchar(50) NULL
CountryRegion                                  nvarchar(50) NULL
HomeAddressSpecialInstructions                 nvarchar(max) NULL
EMailAddress                                   nvarchar(128) NULL
EMailSpecialInstructions                       nvarchar(max) NULL
EMailTelephoneNumber                           nvarchar(50) NULL
rowguid                                        uniqueidentifier NOT NULL
ModifiedDate                                   datetime NOT NULL


View: 'Person.vStateProvinceCountryRegion', Joins StateProvince table
with CountryRegion table.
Field Name                                     Type and Size
StateProvinceID                                int NOT NULL
StateProvinceCode                              nchar(3) NOT NULL
IsOnlyStateProvinceFlag                        Flag NOT NULL
StateProvinceName                              Name NOT NULL
TerritoryID                                    int NOT NULL
CountryRegionCode                              nvarchar(3) NOT NULL
CountryRegionName                              Name NOT NULL


View: 'Production.vProductAndDescription', Product names and
descriptions. Product descriptions are provided in multiple languages.
Field Name                                     Type and Size
ProductID                                      int NOT NULL
Name                                           Name NOT NULL
ProductModel                                   Name NOT NULL
CultureID                                      nchar(6) NOT NULL
Description                                    nvarchar(400) NOT NULL


View: 'Production.vProductModelCatalogDescription', Displays the
content from each element in the xml column CatalogDescription for each
product in the Production.ProductModel table that has catalog data.
Field Name                                     Type and Size
ProductModelID                                 int identity NOT NULL
Name                                           Name NOT NULL
Summary                                        nvarchar(max) NULL
Manufacturer                                   nvarchar(max) NULL
Copyright                                      nvarchar(30) NULL
ProductURL                                     nvarchar(256) NULL
WarrantyPeriod                                 nvarchar(256) NULL
WarrantyDescription                            nvarchar(256) NULL
NoOfYears                                      nvarchar(256) NULL
MaintenanceDescription                         nvarchar(256) NULL
Wheel                                          nvarchar(256) NULL
Saddle                                         nvarchar(256) NULL
Pedal                                          nvarchar(256) NULL
BikeFrame                                      nvarchar(max) NULL
Crankset                                       nvarchar(256) NULL
PictureAngle                                   nvarchar(256) NULL
PictureSize                                    nvarchar(256) NULL
ProductPhotoID                                 nvarchar(256) NULL
Material                                     nvarchar(256) NULL
Color                                        nvarchar(256) NULL
ProductLine                                  nvarchar(256) NULL
Style                                        nvarchar(256) NULL
RiderExperience                              nvarchar(1024) NULL
rowguid                                      uniqueidentifier NOT NULL
ModifiedDate                                 datetime NOT NULL


View: 'Production.vProductModelInstructions', Displays the content from
each element in the xml column Instructions for each product in the
Production.ProductModel table that has manufacturing instructions.
Field Name                                   Type and Size
ProductModelID                               int identity NOT NULL
Name                                         Name NOT NULL
Instructions                                 nvarchar(max) NULL
LocationID                                   int NULL
SetupHours                                   decimal(9,4) NULL
MachineHours                                 decimal(9,4) NULL
LaborHours                                   decimal(9,4) NULL
LotSize                                      int NULL
Step                                         nvarchar(1024) NULL
rowguid                                      uniqueidentifier NOT NULL
ModifiedDate                                 datetime NOT NULL


View: 'Purchasing.vVendor', Vendor (company) names and addresses and
the names of vendor employees to contact.
Field Name                                   Type and Size
VendorID                                     int NOT NULL
Name                                         Name NOT NULL
ContactType                                  Name NOT NULL
Title                                        nvarchar(8) NULL
FirstName                                    Name NOT NULL
MiddleName                                   Name NULL
LastName                                     Name NOT NULL
Suffix                                       nvarchar(10) NULL
Phone                                        Phone NULL
EmailAddress                                 nvarchar(50) NULL
EmailPromotion                               int NOT NULL
AddressLine1                                 nvarchar(60) NOT NULL
AddressLine2                                 nvarchar(60) NULL
City                                         nvarchar(30) NOT NULL
StateProvinceName                            Name NOT NULL
PostalCode                                   nvarchar(15) NOT NULL
CountryRegionName                            Name NOT NULL


View: 'Sales.vIndividualCustomer', Individual customers (names and
addresses) that purchase Adventure Works Cycles products online.
Field Name                                   Type and Size
CustomerID                                   int NOT NULL
Title                                        nvarchar(8) NULL
FirstName                                    Name NOT NULL
MiddleName                                   Name NULL
LastName                                     Name NOT NULL
Suffix                                       nvarchar(10) NULL
Phone                                        Phone NULL
EmailAddress                                 nvarchar(50) NULL
EmailPromotion                                 int NOT NULL
AddressType                                    Name NOT NULL
AddressLine1                                   nvarchar(60) NOT NULL
AddressLine2                                   nvarchar(60) NULL
City                                           nvarchar(30) NOT NULL
StateProvinceName                              Name NOT NULL
PostalCode                                     nvarchar(15) NOT NULL
CountryRegionName                              Name NOT NULL
Demographics                                   xml NULL


View: 'Sales.vIndividualDemographics', Displays the content from each
element in the xml column Demographics for each customer in the
Sales.Individual table.
Field Name                                     Type and Size
CustomerID                                     int NOT NULL
TotalPurchaseYTD                               money(19,4) NULL
DateFirstPurchase                              datetime NULL
BirthDate                                      datetime NULL
MaritalStatus                                  nvarchar(1) NULL
YearlyIncome                                   nvarchar(30) NULL
Gender                                         nvarchar(1) NULL
TotalChildren                                  int NULL
NumberChildrenAtHome                           int NULL
Education                                      nvarchar(30) NULL
Occupation                                     nvarchar(30) NULL
HomeOwnerFlag                                  bit NULL
NumberCarsOwned                                int NULL


View: 'Sales.vSalesPerson', Sales representiatives (names and addresses)
and their sales-related information.
Field Name                                     Type and Size
SalesPersonID                                  int NOT NULL
Title                                          nvarchar(8) NULL
FirstName                                      Name NOT NULL
MiddleName                                     Name NULL
LastName                                       Name NOT NULL
Suffix                                         nvarchar(10) NULL
JobTitle                                       nvarchar(50) NOT NULL
Phone                                          Phone NULL
EmailAddress                                   nvarchar(50) NULL
EmailPromotion                                 int NOT NULL
AddressLine1                                   nvarchar(60) NOT NULL
AddressLine2                                   nvarchar(60) NULL
City                                           nvarchar(30) NOT NULL
StateProvinceName                              Name NOT NULL
PostalCode                                     nvarchar(15) NOT NULL
CountryRegionName                              Name NOT NULL
TerritoryName                                  Name NULL
TerritoryGroup                                 nvarchar(50) NULL
SalesQuota                                     money(19,4) NULL
SalesYTD                                       money(19,4) NOT NULL
SalesLastYear                                  money(19,4) NOT NULL


View: 'Sales.vSalesPersonSalesByFiscalYears', Uses PIVOT to return
aggregated sales information for each sales representative.
Field Name                                     Type and Size
 SalesPersonID                                                      int NULL
 FullName                                                           nvarchar(152) NULL
 Title                                                              nvarchar(50) NOT NULL
 SalesTerritory                                                     Name NOT NULL
 2002                                                               money(19,4) NULL
 2003                                                               money(19,4) NULL
 2004                                                               money(19,4) NULL


View: 'Sales.vStoreWithDemographics', Stores (names and addresses) that
sell Adventure Works Cycles products to consumers.
 Field Name                                                         Type and Size
 CustomerID                                                         int NOT NULL
 Name                                                               Name NOT NULL
 ContactType                                                        Name NOT NULL
 Title                                                              nvarchar(8) NULL
 FirstName                                                          Name NOT NULL
 MiddleName                                                         Name NULL
 LastName                                                           Name NOT NULL
 Suffix                                                             nvarchar(10) NULL
 Phone                                                              Phone NULL
 EmailAddress                                                       nvarchar(50) NULL
 EmailPromotion                                                     int NOT NULL
 AddressType                                                        Name NOT NULL
 AddressLine1                                                       nvarchar(60) NOT NULL
 AddressLine2                                                       nvarchar(60) NULL
 City                                                               nvarchar(30) NOT NULL
 StateProvinceName                                                  Name NOT NULL
 PostalCode                                                         nvarchar(15) NOT NULL
 CountryRegionName                                                  Name NOT NULL
 AnnualSales                                                        money(19,4) NULL
 AnnualRevenue                                                      money(19,4) NULL
 BankName                                                           nvarchar(50) NULL
 BusinessType                                                       nvarchar(5) NULL
 YearOpened                                                         int NULL
 Specialty                                                          nvarchar(50) NULL
 SquareFeet                                                         int NULL
 Brands                                                             nvarchar(30) NULL
 Internet                                                           nvarchar(30) NULL
 NumberEmployees                                                    int NULL


Procedures and Functions, 20 items
Procedure/Function: 'dbo.ufnGetAccountingEndDate', Scalar function
used in the uSalesOrderHeader trigger to set the starting account date.
 Procedure Name                              Description                         Parameters
 dbo.ufnGetAccountingEndDate                 Scalar function used in the         @RETURN_VALUE datetime(23)
                                             uSalesOrderHeader trigger to set    [RETURN VALUE]
                                             the starting account date.
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetAccountingStartDate', Scalar function
used in the uSalesOrderHeader trigger to set the ending account date.
 Procedure Name                              Description                         Parameters
 dbo.ufnGetAccountingStartDate               Scalar function used in the         @RETURN_VALUE datetime(23)
                                             uSalesOrderHeader trigger to set    [RETURN VALUE]
                                             the ending account date.
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetContactInformation', Table value
function returning the first name, last name, job title and contact type for a
given contact.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetContactInformation                Table value function returning the     @TABLE_RETURN_VALUE table
                                             first name, last name, job title and   [RESULT SET COLUMN],
                                             contact type for a given contact.      @ContactID int(10) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetContactInformation', 12 items

 Object Name                                 Type                                   Field Name
 Sales.StoreContact                          user table                             ContactID
 Sales.StoreContact                          user table                             ContactTypeID
 Person.Contact                              user table                             ContactID
 Person.Contact                              user table                             FirstName
 Person.Contact                              user table                             LastName
 Purchasing.VendorContact                    user table                             ContactID
 Purchasing.VendorContact                    user table                             ContactTypeID
 Person.ContactType                          user table                             ContactTypeID
 Person.ContactType                          user table                             Name
 HumanResources.Employee                     user table                             ContactID
 HumanResources.Employee                     user table                             Title
 Sales.Individual                            user table                             ContactID


Procedure/Function: 'dbo.ufnGetDocumentStatusText', Scalar function
returning the text representation of the Status column in the Document
table.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetDocumentStatusText                Scalar function returning the text     @RETURN_VALUE nvarchar(15)
                                             representation of the Status column    [RETURN VALUE], @Status
                                             in the Document table.                 tinyint(3) [INPUT]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetProductDealerPrice', Scalar function
returning the dealer price for a given product on a particular order date.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetProductDealerPrice                Scalar function returning the dealer   @RETURN_VALUE money(19)
                                             price for a given product on a         [RETURN VALUE], @ProductID
                                             particular order date.                 int(10) [INPUT], @OrderDate
                                                                                    datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetProductDealerPrice', 5 items

 Object Name                                 Type                                   Field Name
 Production.Product                          user table                             ProductID
 Production.ProductListPriceHistory          user table                             ProductID
 Production.ProductListPriceHistory          user table                             StartDate
 Production.ProductListPriceHistory          user table                             EndDate
 Production.ProductListPriceHistory          user table                             ListPrice


Procedure/Function: 'dbo.ufnGetProductListPrice', Scalar function
returning the list price for a given product on a particular order date.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetProductListPrice                  Scalar function returning the list     @RETURN_VALUE money(19)
                                             price for a given product on a         [RETURN VALUE], @ProductID
                                             particular order date.                 int(10) [INPUT], @OrderDate
                                                                                    datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetProductListPrice', 5 items

 Object Name                                 Type                                   Field Name
 Production.Product                          user table                             ProductID
 Production.ProductListPriceHistory          user table                             ProductID
 Production.ProductListPriceHistory          user table                             StartDate
 Production.ProductListPriceHistory          user table                             EndDate
 Production.ProductListPriceHistory          user table                             ListPrice


Procedure/Function: 'dbo.ufnGetProductStandardCost', Scalar function
returning the standard cost for a given product on a particular order date.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetProductStandardCost               Scalar function returning the          @RETURN_VALUE money(19)
                                             standard cost for a given product on   [RETURN VALUE], @ProductID
                                             a particular order date.               int(10) [INPUT], @OrderDate
                                                                                    datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetProductStandardCost', 5 items

 Object Name                                 Type                                   Field Name
 Production.Product                          user table                             ProductID
 Production.ProductCostHistory               user table                             ProductID
 Production.ProductCostHistory               user table                             StartDate
 Production.ProductCostHistory               user table                             EndDate
 Production.ProductCostHistory               user table                             StandardCost


Procedure/Function: 'dbo.ufnGetPurchaseOrderStatusText', Scalar
function returning the text representation of the Status column in the
PurchaseOrderHeader table.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetPurchaseOrderStatusText           Scalar function returning the text     @RETURN_VALUE nvarchar(15)
                                             representation of the Status column    [RETURN VALUE], @Status
                                             in the PurchaseOrderHeader table.      tinyint(3) [INPUT]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetSalesOrderStatusText', Scalar function
returning the text representation of the Status column in the
SalesOrderHeader table.
 Procedure Name                              Description                            Parameters
 dbo.ufnGetSalesOrderStatusText              Scalar function returning the text     @RETURN_VALUE nvarchar(15)
                                             representation of the Status column    [RETURN VALUE], @Status
                                             in the SalesOrderHeader table.         tinyint(3) [INPUT]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetStock', Scalar function returning the
quantity of inventory in LocationID 6 (Miscellaneous Storage)for a
specified ProductID.
 Procedure Name                          Description                              Parameters
 dbo.ufnGetStock                         Scalar function returning the quantity   @RETURN_VALUE int(10)
                                         of inventory in LocationID 6             [RETURN VALUE], @ProductID
                                         (Miscellaneous Storage)for a             int(10) [INPUT]
                                         specified ProductID.

Dependencies for Procedure/Function 'dbo.ufnGetStock', 3 items

 Object Name                             Type                                     Field Name
 Production.ProductInventory             user table                               ProductID
 Production.ProductInventory             user table                               LocationID
 Production.ProductInventory             user table                               Quantity


Procedure/Function: 'dbo.ufnLeadingZeros', Scalar function used by the
Sales.Customer table to help set the account number.
 Procedure Name                          Description                              Parameters
 dbo.ufnLeadingZeros                     Scalar function used by the              @RETURN_VALUE varchar(8)
                                         Sales.Customer table to help set the     [RETURN VALUE], @Value int(10)
                                         account number.                          [INPUT]

Dependencies for Procedure/Function 'dbo.ufnLeadingZeros', 1 item

 Object Name                             Type                                     Field Name
 Sales.Customer                          user table                               N/A


Procedure/Function: 'dbo.uspGetBillOfMaterials', Stored procedure using
a recursive query to return a multi-level bill of material for the specified
ProductID.
 Procedure Name                          Description                              Parameters
 dbo.uspGetBillOfMaterials               Stored procedure using a recursive       @RETURN_VALUE int(10)
                                         query to return a multi-level bill of    [RETURN VALUE],
                                         material for the specified ProductID.    @StartProductID int(10) [INPUT],
                                                                                  @CheckDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.uspGetBillOfMaterials', 10 items

 Object Name                             Type                                     Field Name
 Production.BillOfMaterials              user table                               ProductAssemblyID
 Production.BillOfMaterials              user table                               ComponentID
 Production.BillOfMaterials              user table                               StartDate
 Production.BillOfMaterials              user table                               EndDate
 Production.BillOfMaterials              user table                               BOMLevel
 Production.BillOfMaterials              user table                               PerAssemblyQty
 Production.Product                      user table                               ProductID
 Production.Product                      user table                               Name
 Production.Product                      user table                               StandardCost
 Production.Product                      user table                               ListPrice


Procedure/Function: 'dbo.uspGetEmployeeManagers', Stored procedure
using a recursive query to return the direct and indirect managers of the
specified employee.
 Procedure Name                         Description                              Parameters
 dbo.uspGetEmployeeManagers             Stored procedure using a recursive       @RETURN_VALUE int(10)
                                        query to return the direct and           [RETURN VALUE], @EmployeeID
                                        indirect managers of the specified       int(10) [INPUT]
                                        employee.

Dependencies for Procedure/Function 'dbo.uspGetEmployeeManagers', 7 items

 Object Name                            Type                                     Field Name
 Person.Contact                         user table                               ContactID
 Person.Contact                         user table                               FirstName
 Person.Contact                         user table                               LastName
 HumanResources.Employee                user table                               EmployeeID
 HumanResources.Employee                user table                               ContactID
 HumanResources.Employee                user table                               ManagerID
 HumanResources.Employee                user table                               Title


Procedure/Function: 'dbo.uspGetManagerEmployees', Stored procedure
using a recursive query to return the direct and indirect employees of the
specified manager.
 Procedure Name                         Description                              Parameters
 dbo.uspGetManagerEmployees             Stored procedure using a recursive       @RETURN_VALUE int(10)
                                        query to return the direct and           [RETURN VALUE], @ManagerID
                                        indirect employees of the specified      int(10) [INPUT]
                                        manager.

Dependencies for Procedure/Function 'dbo.uspGetManagerEmployees', 6 items

 Object Name                            Type                                     Field Name
 Person.Contact                         user table                               ContactID
 Person.Contact                         user table                               FirstName
 Person.Contact                         user table                               LastName
 HumanResources.Employee                user table                               EmployeeID
 HumanResources.Employee                user table                               ContactID
 HumanResources.Employee                user table                               ManagerID


Procedure/Function: 'dbo.uspGetWhereUsedProductID', Stored procedure
using a recursive query to return all components or assemblies that directly
or indirectly use the specified ProductID.
 Procedure Name                         Description                              Parameters
 dbo.uspGetWhereUsedProductID           Stored procedure using a recursive       @RETURN_VALUE int(10)
                                        query to return all components or        [RETURN VALUE],
                                        assemblies that directly or indirectly   @StartProductID int(10) [INPUT],
                                        use the specified ProductID.             @CheckDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.uspGetWhereUsedProductID', 10 items

 Object Name                            Type                                     Field Name
 Production.BillOfMaterials             user table                               ProductAssemblyID
 Production.BillOfMaterials             user table                               ComponentID
 Production.BillOfMaterials             user table                               StartDate
 Production.BillOfMaterials             user table                               EndDate
 Production.BillOfMaterials             user table                               BOMLevel
 Production.BillOfMaterials             user table                               PerAssemblyQty
 Production.Product                     user table                               ProductID
 Production.Product                     user table                               Name
 Production.Product                      user table                             StandardCost
 Production.Product                      user table                             ListPrice


Procedure/Function: 'dbo.uspLogError', Logs error information in the
ErrorLog table about the error that caused execution to jump to the
CATCH block of a TRY...CATCH construct. Should be executed from
within the scope of a CATCH block otherwise it will return without
inserting error information.
 Procedure Name                          Description                            Parameters
 dbo.uspLogError                         Logs error information in the          @RETURN_VALUE int(10)
                                         ErrorLog table about the error that    [RETURN VALUE], @ErrorLogID
                                         caused execution to jump to the        int(10) [INPUT and OUTPUT]
                                         CATCH block of a TRY...CATCH
                                         construct. Should be executed from
                                         within the scope of a CATCH block
                                         otherwise it will return without
                                         inserting error information.

Dependencies for Procedure/Function 'dbo.uspLogError', 8 items

 Object Name                             Type                                   Field Name
 dbo.uspPrintError                       stored procedure                       N/A
 dbo.ErrorLog                            user table                             UserName
 dbo.ErrorLog                            user table                             ErrorNumber
 dbo.ErrorLog                            user table                             ErrorSeverity
 dbo.ErrorLog                            user table                             ErrorState
 dbo.ErrorLog                            user table                             ErrorProcedure
 dbo.ErrorLog                            user table                             ErrorLine
 dbo.ErrorLog                            user table                             ErrorMessage


Procedure/Function: 'dbo.uspPrintError', Prints error information about
the error that caused execution to jump to the CATCH block of a
TRY...CATCH construct. Should be executed from within the scope of a
CATCH block otherwise it will return without printing any error
information.
 Procedure Name                          Description                            Parameters
 dbo.uspPrintError                       Prints error information about the     @RETURN_VALUE int(10)
                                         error that caused execution to jump    [RETURN VALUE]
                                         to the CATCH block of a
                                         TRY...CATCH construct. Should be
                                         executed from within the scope of a
                                         CATCH block otherwise it will return
                                         without printing any error
                                         information.

Dependencies for Procedure/Function 'dbo.uspPrintError', 32 items

 Object Name                             Type                                   Field Name
 dbo.uspLogError                         stored procedure                       N/A
 HumanResources.uShift                   trigger                                N/A
 Person.uStateProvince                   trigger                                N/A
 Production.iWorkOrder                   trigger                                N/A
 Production.uScrapReason                 trigger                                N/A
 Production.uTransactionHistory          trigger                                N/A
 Production.uTransactionHistoryArchive   trigger                                N/A
 Production.uUnitMeasure                    trigger                             N/A
 Production.uWorkOrder                      trigger                             N/A
 Production.uWorkOrderRouting               trigger                             N/A
 Purchasing.dVendor                         trigger                             N/A
 Purchasing.iPurchaseOrderDetail            trigger                             N/A
 Purchasing.uPurchaseOrderDetail            trigger                             N/A
 Purchasing.uPurchaseOrderHeader            trigger                             N/A
 Purchasing.uShipMethod                     trigger                             N/A
 Purchasing.uVendor                         trigger                             N/A
 Purchasing.uVendorAddress                  trigger                             N/A
 Purchasing.uVendorContact                  trigger                             N/A
 Sales.iduSalesOrderDetail                  trigger                             N/A
 Sales.iStore                               trigger                             N/A
 Sales.uSalesOrderHeader                    trigger                             N/A
 Sales.uSalesOrderHeaderSalesReason         trigger                             N/A
 Sales.uSalesPerson                         trigger                             N/A
 Sales.uSalesPersonQuotaHistory             trigger                             N/A
 Sales.uSalesReason                         trigger                             N/A
 Sales.uSalesTaxRate                        trigger                             N/A
 Sales.uSalesTerritory                      trigger                             N/A
 Sales.uSalesTerritoryHistory               trigger                             N/A
 Sales.uShoppingCartItem                    trigger                             N/A
 Sales.uSpecialOffer                        trigger                             N/A
 Sales.uSpecialOfferProduct                 trigger                             N/A
 Sales.uStore                               trigger                             N/A


Procedure/Function: 'HumanResources.uspUpdateEmployeeHireInfo',
Updates the Employee table and inserts a new row in the
EmployeePayHistory table with the values specified in the input
parameters.
 Procedure Name                             Description                         Parameters
 HumanResources.uspUpdateEmployeeHireInfo   Updates the Employee table and      @RETURN_VALUE int(10)
                                            inserts a new row in the            [RETURN VALUE], @EmployeeID
                                            EmployeePayHistory table with the   int(10) [INPUT], @Title
                                            values specified in the input       nvarchar(50) [INPUT], @HireDate
                                            parameters.                         datetime(23) [INPUT],
                                                                                @RateChangeDate datetime(23)
                                                                                [INPUT], @Rate money(19)
                                                                                [INPUT], @PayFrequency tinyint(3)
                                                                                [INPUT], @CurrentFlag Flag(1)
                                                                                [INPUT]

Dependencies for Procedure/Function 'HumanResources.uspUpdateEmployeeHireInfo', 8 items

 Object Name                                Type                                Field Name
 dbo.uspLogError                            stored procedure                    N/A
 HumanResources.Employee                    user table                          Title
 HumanResources.Employee                    user table                          HireDate
 HumanResources.Employee                    user table                          CurrentFlag
 HumanResources.EmployeePayHistory          user table                          EmployeeID
 HumanResources.EmployeePayHistory          user table                          RateChangeDate
 HumanResources.EmployeePayHistory          user table                          Rate
 HumanResources.EmployeePayHistory          user table                          PayFrequency


Procedure/Function: 'HumanResources.uspUpdateEmployeeLogin',
Updates the Employee table with the values specified in the input
parameters for the given EmployeeID.
 Procedure Name                                           Description                           Parameters
 HumanResources.uspUpdateEmployeeLogin                    Updates the Employee table with the   @RETURN_VALUE int(10)
                                                          values specified in the input         [RETURN VALUE], @EmployeeID
                                                          parameters for the given              int(10) [INPUT], @ManagerID
                                                          EmployeeID.                           int(10) [INPUT], @LoginID
                                                                                                nvarchar(256) [INPUT], @Title
                                                                                                nvarchar(50) [INPUT], @HireDate
                                                                                                datetime(23) [INPUT],
                                                                                                @CurrentFlag Flag(1) [INPUT]

Dependencies for Procedure/Function 'HumanResources.uspUpdateEmployeeLogin', 6 items

 Object Name                                              Type                                  Field Name
 dbo.uspLogError                                          stored procedure                      N/A
 HumanResources.Employee                                  user table                            LoginID
 HumanResources.Employee                                  user table                            ManagerID
 HumanResources.Employee                                  user table                            Title
 HumanResources.Employee                                  user table                            HireDate
 HumanResources.Employee                                  user table                            CurrentFlag


Procedure/Function: 'HumanResources.uspUpdateEmployeePersonalInfo',
Updates the Employee table with the values specified in the input
parameters for the given EmployeeID.
 Procedure Name                                           Description                           Parameters
 HumanResources.uspUpdateEmployeePersonalInfo             Updates the Employee table with the   @RETURN_VALUE int(10)
                                                          values specified in the input         [RETURN VALUE], @EmployeeID
                                                          parameters for the given              int(10) [INPUT],
                                                          EmployeeID.                           @NationalIDNumber nvarchar(15)
                                                                                                [INPUT], @BirthDate datetime(23)
                                                                                                [INPUT], @MaritalStatus nchar(1)
                                                                                                [INPUT], @Gender nchar(1)
                                                                                                [INPUT]

Dependencies for Procedure/Function 'HumanResources.uspUpdateEmployeePersonalInfo', 5
items

 Object Name                                              Type                                  Field Name
 dbo.uspLogError                                          stored procedure                      N/A
 HumanResources.Employee                                  user table                            NationalIDNumber
 HumanResources.Employee                                  user table                            BirthDate
 HumanResources.Employee                                  user table                            MaritalStatus
 HumanResources.Employee                                  user table                            Gender


Rules
There are no rules in this database.


Database Level Triggers, 1 item
 Name
 ddlDatabaseTriggerLog


Data Types, 39 items
 Type name              Code           Size     Sizable        Nullable      Searchabl     Autoincre     Scale         User Type
                                                                             e             menal
 xml                    -152           0        Yes            Yes           No            No                          No
 sql_variant            -150           8000     No             Yes           Except like   No                          No
uniqueidentifier     -11   36          Yes   Yes   Except like   No            No
ntext                -10   107374182   Yes   Yes   Like only     No            No
                           3
nvarchar             -9    4000        Yes   Yes   Yes           No            No
sysname              -9    128         Yes   No    Yes           No            No
AccountNumber        -9    15          Yes   Yes   Yes           No            Yes
Name                 -9    50          Yes   Yes   Yes           No            Yes
OrderNumber          -9    25          Yes   Yes   Yes           No            Yes
Phone                -9    25          Yes   Yes   Yes           No            Yes
nchar                -8    4000        Yes   Yes   Yes           No            No
bit                  -7    1           No    Yes   Except like   No            No
Flag                 -7    1           No    No    Except like   No            No
NameStyle            -7    1           No    No    Except like   No            No
tinyint              -6    3           No    Yes   Except like   No            No
tinyint identity     -6    3           No    No    Except like   Yes           No
bigint               -5    19          No    Yes   Except like   No            No
bigint identity      -5    19          No    No    Except like   Yes           No
image                -4    214748364   Yes   Yes   No            No            No
                           7
varbinary            -3    8000        Yes   Yes   Except like   No            No
binary               -2    8000        Yes   Yes   Except like   No            No
timestamp            -2    8           Yes   No    Except like   No            No
text                 -1    214748364   Yes   Yes   Like only     No            No
                           7
char                 1     8000        Yes   Yes   Yes           No            No
numeric              2     38          Yes   Yes   Except like   No    0..38   No
numeric() identity   2     38          No    No    Except like   Yes           No
decimal              3     38          Yes   Yes   Except like   No    0..38   No
money                3     19          No    Yes   Except like   No            No
smallmoney           3     10          No    Yes   Except like   No            No
decimal() identity   3     38          No    No    Except like   Yes           No
int                  4     10          No    Yes   Except like   No            No
int identity         4     10          No    No    Except like   Yes           No
smallint             5     5           No    Yes   Except like   No            No
smallint identity    5     5           No    No    Except like   Yes           No
float                6     15          Yes   Yes   Except like   No            No
real                 7     7           Yes   Yes   Except like   No            No
datetime             11    23          No    Yes   Yes           No            No
smalldatetime        11    16          No    Yes   Yes           No            No
varchar              12    8000        Yes   Yes   Yes           No            No

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:30
posted:12/10/2011
language:English
pages:113