Summary

Summary

Property | Value
Report created | 20-May-2011 15:52
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.


dbo.AWBuildVersion

Table: 'dbo.AWBuildVersion'

4 fields. 83 bytes.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SystemInformationID | tinyint identity |  | tinyint |  | Not null | Primary key for AWBuildVersion 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_SystemInformationID | Clustered index created by a primary key constraint. | Yes | Yes | SystemInformationID

Triggers for table 'dbo.AWBuildVersion', 1 item

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

Dependencies for table 'dbo.AWBuildVersion', 1 item

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


dbo.DatabaseLog

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 Type | Default | Nullable | Description | Check
DatabaseLogID | int identity |  | int |  | Not null | Primary key for DatabaseLog records. |
PostTime | datetime |  |  |  | Not null | The date and time the DDL change occurred. |
DatabaseUser | sysname | 128 | nvarchar(128) |  | Not null | The user who implemented the DDL change. |
Event | sysname | 128 | nvarchar(128) |  | Not null | The type of DDL statement that was executed. |
Schema | sysname | 128 | nvarchar(128) |  | Null | The schema to which the changed object belongs. |
Object | sysname | 128 | nvarchar(128) |  | Null | The object that was changed by the DDL statment. |
TSQL | nvarchar | max |  |  | Not null | The exact Transact-SQL 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 created by a primary key constraint. | No | Yes | DatabaseLogID
There are no Triggers for this table.
There are no Dependencies for this object.


dbo.ErrorLog

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 Type | Default | Nullable | Description | Check
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(128) |  | Not null | The user 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 created by a primary key constraint. | Yes | Yes | ErrorLogID
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


HumanResources.Department

Table: 'HumanResources.Department'

4 fields. 218 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
DepartmentID | smallint identity |  | smallint |  | Not null | Primary key 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 created by a primary key constraint. | Yes | Yes | DepartmentID
AK_Department_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'HumanResources.Department', 1 item

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

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


HumanResources.Employee

Table: 'HumanResources.Employee'

16 fields. 728 bytes.

Employee information such as salary, department, and title.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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.ContactID. |
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 Representative. |
BirthDate | datetime |  |  |  | Not null | Date of birth. | ([BirthDate]>='1930-01-01' AND [BirthDate]<=dateadd(year,(-18),getdate()))
MaritalStatus | nchar | 1 |  |  | Not null | M = Married, S = Single | (upper([MaritalStatus])='S' OR upper([MaritalStatus])='M')
Gender | nchar | 1 |  |  | Not null | M = Male, F = Female | (upper([Gender])='F' OR upper([Gender])='M')
HireDate | datetime |  |  |  | Not null | Employee hired on this date. | ([HireDate]>='1996-07-01' 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 available vacation hours. | ([VacationHours]>=(-40) AND [VacationHours]<=(240))
SickLeaveHours | smallint |  |  | (0) | Not null | Number of available sick leave hours. | ([SickLeaveHours]>=(0) AND [SickLeaveHours]<=(120))
CurrentFlag | Flag |  | bit | (1) | Not null | 0 = Inactive, 1 = Active |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ManagerID
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 created by a primary key constraint. | Yes | Yes | EmployeeID
AK_Employee_LoginID | Unique nonclustered index. | No | Yes | LoginID
AK_Employee_NationalIDNumber | Unique nonclustered index. | No | Yes | NationalIDNumber
AK_Employee_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid
IX_Employee_ManagerID | Nonclustered index. | No | No | ManagerID

Triggers for table 'HumanResources.Employee', 2 items

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

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


HumanResources.EmployeeAddress

Table: 'HumanResources.EmployeeAddress'

4 fields. 40 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
EmployeeID | int |  |  |  | Not null | Primary key. Foreign key to Employee.EmployeeID. |
AddressID | int |  |  |  | Not null | Primary key. Foreign key to Address.AddressID. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_EmployeeID
EmployeeAddress.AddressID | Address.AddressID | FK_EmployeeAddress_Address_AddressID

Indexes for table 'HumanResources.EmployeeAddress', 2 items

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

Triggers for table 'HumanResources.EmployeeAddress', 1 item

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

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


HumanResources.EmployeeDepartmentHistory

Table: 'HumanResources.EmployeeDepartmentHistory'

6 fields. 55 bytes.

Employee department transfers.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
EmployeeID | int |  |  |  | Not null | Employee identification number. Foreign key to Employee.EmployeeID. |
DepartmentID | smallint |  |  |  | Not null | Department in which the employee worked including currently. Foreign key to Department.DepartmentID. |
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_Department_DepartmentID
EmployeeDepartmentHistory.EmployeeID | Employee.EmployeeID | FK_EmployeeDepartmentHistory_Employee_EmployeeID
EmployeeDepartmentHistory.ShiftID | Shift.ShiftID | FK_EmployeeDepartmentHistory_Shift_ShiftID

Indexes for table 'HumanResources.EmployeeDepartmentHistory', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID | Clustered index created by a primary key constraint. | Yes | Yes | EmployeeID, StartDate, DepartmentID, ShiftID
IX_EmployeeDepartmentHistory_DepartmentID | Nonclustered index. | No | No | DepartmentID
IX_EmployeeDepartmentHistory_ShiftID | Nonclustered index. | No | No | ShiftID

Triggers for table 'HumanResources.EmployeeDepartmentHistory', 1 item

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

Dependencies for table 'HumanResources.EmployeeDepartmentHistory', 4 items

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


HumanResources.EmployeePayHistory

Table: 'HumanResources.EmployeePayHistory'

5 fields. 58 bytes.

Employee pay history.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
EmployeeID | int |  |  |  | Not null | Employee identification number. Foreign key to Employee.EmployeeID. |
RateChangeDate | datetime |  |  |  | Not null | Date the change in pay is effective |
Rate | money | 19,4 | decimal(19,4) |  | Not null | Salary hourly rate. | ([Rate]>=(6.50) AND [Rate]<=(200.00))
PayFrequency | tinyint |  |  |  | Not null | 1 = Salary received monthly, 2 = Salary received biweekly | ([PayFrequency]=(2) OR [PayFrequency]=(1))
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_EmployeeID_RateChangeDate | Clustered index created by a primary key constraint. | Yes | Yes | EmployeeID, RateChangeDate

Triggers for table 'HumanResources.EmployeePayHistory', 1 item

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

Dependencies for table 'HumanResources.EmployeePayHistory', 4 items

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


HumanResources.JobCandidate

Table: 'HumanResources.JobCandidate'

4 fields. 24 bytes.

Resumes submitted to Human Resources by job applicants.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
JobCandidateID | int identity |  | int |  | Not null | Primary key for JobCandidate records. |
EmployeeID | int |  |  |  | Null | Employee identification number if applicant was hired. Foreign key to Employee.EmployeeID. |
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_EmployeeID

Indexes for table 'HumanResources.JobCandidate', 2 items

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

Triggers for table 'HumanResources.JobCandidate', 1 item

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

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


HumanResources.Shift

Table: 'HumanResources.Shift'

5 fields. 149 bytes.

Work shift lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ShiftID | tinyint identity |  | tinyint |  | Not null | Primary key 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 created by a primary key constraint. | Yes | Yes | ShiftID
AK_Shift_Name | Unique nonclustered index. | No | Yes | Name
AK_Shift_StartTime_EndTime | Unique nonclustered index. | No | Yes | StartTime, EndTime

Triggers for table 'HumanResources.Shift', 1 item

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

Dependencies for table 'HumanResources.Shift', 2 items

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


Person.Address

Table: 'Person.Address'

8 fields. 370 bytes.

Street address information for customers, employees, and vendors.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 StateProvince table. |
PostalCode | nvarchar | 15 |  |  | Not null | Postal code for the street address. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_StateProvinceID

Indexes for table 'Person.Address', 4 items

Index Name | Description | Clustered | Unique | Fields
PK_Address_AddressID | Clustered index created by a primary key constraint. | Yes | Yes | AddressID
AK_Address_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode | Nonclustered index. | No | Yes | AddressLine1, AddressLine2, City, 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 setting the ModifiedDate column in the Address table to the current date. | after Update | Yes

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


Person.AddressType

Table: 'Person.AddressType'

4 fields. 136 bytes.

Types of addresses stored in the Address table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
AddressTypeID | int identity |  | int |  | Not null | Primary key for AddressType records. |
Name | Name |  | nvarchar(50) |  | Not null | Address type description. For example, Billing, Home, or Shipping. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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 created by a primary key constraint. | Yes | Yes | AddressTypeID
AK_AddressType_Name | Unique nonclustered index. | No | Yes | Name
AK_AddressType_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Person.AddressType', 1 item

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

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


Person.Contact

Table: 'Person.Contact'

15 fields. 577 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact does wish to receive e-mail promotions from AdventureWorks and selected partners. | ([EmailPromotion]>=(0) AND [EmailPromotion]<=(2))
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 concatenated with the password string before the password is hashed. |
AdditionalContactInfo | xml |  |  |  | Null | Additional contact information about the person stored in xml format. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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 created by a primary key constraint. | Yes | Yes | ContactID
AK_Contact_rowguid | nonclustered, unique located on PRIMARY | No | Yes | rowguid
IX_Contact_EmailAddress | Nonclustered index. | No | No | EmailAddress

Triggers for table 'Person.Contact', 1 item

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

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


Person.ContactType

Table: 'Person.ContactType'

3 fields. 120 bytes.

Lookup table containing the types of contacts stored in Contact.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 created by a primary key constraint. | Yes | Yes | ContactTypeID
AK_ContactType_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Person.ContactType', 1 item

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

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


Person.CountryRegion

Table: 'Person.CountryRegion'

3 fields. 122 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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_CountryRegionCode | Clustered index created by a primary key constraint. | Yes | Yes | CountryRegionCode
AK_CountryRegion_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Person.CountryRegion', 1 item

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

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


Person.StateProvince

Table: 'Person.StateProvince'

8 fields. 153 bytes.

State and province lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
StateProvinceID | int identity |  | int |  | Not null | Primary key for StateProvince 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 CountryRegion.CountryRegionCode. |
IsOnlyStateProvinceFlag | Flag |  | bit | (1) | Not null | 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. |
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 SalesTerritory.SalesTerritoryID. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_TerritoryID

Indexes for table 'Person.StateProvince', 4 items

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

Triggers for table 'Person.StateProvince', 1 item

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

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


Production.BillOfMaterials

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 Type | Default | Nullable | Description | Check
BillOfMaterialsID | int identity |  | int |  | Not null | Primary key for BillOfMaterials records. |
ProductAssemblyID | int |  |  |  | Null | Parent product identification number. Foreign key to Product.ProductID. |
ComponentID | int |  |  |  | Not null | Component identification number. Foreign key to Product.ProductID. |
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 the component needed to create the assembly. | ([PerAssemblyQty]>=(1.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.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_ProductAssemblyID
BillOfMaterials.ComponentID | Product.ProductID | FK_BillOfMaterials_Product_ComponentID
BillOfMaterials.UnitMeasureCode | UnitMeasure.UnitMeasureCode | FK_BillOfMaterials_UnitMeasure_UnitMeasureCode

Indexes for table 'Production.BillOfMaterials', 3 items

Index Name | Description | Clustered | Unique | Fields
AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate | Clustered index. | Yes | Yes | ProductAssemblyID, ComponentID, StartDate
PK_BillOfMaterials_BillOfMaterialsID | Nonclustered index created by a primary key constraint. | No | Yes | BillOfMaterialsID
IX_BillOfMaterials_UnitMeasureCode | Nonclustered index. | No | No | UnitMeasureCode

Triggers for table 'Production.BillOfMaterials', 1 item

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

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


Production.Culture

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 Type | Default | Nullable | Description | Check
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 created by a primary key constraint. | Yes | Yes | CultureID
AK_Culture_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Production.Culture', 1 item

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

Dependencies for table 'Production.Culture', 1 item

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


Production.Document

Table: 'Production.Document'

10 fields. 951 bytes.

Product maintenance documents.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 approval, 2 = Approved, 3 = Obsolete | ([Status]>=(1) AND [Status]<=(3))
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 created by a primary key constraint. | Yes | Yes | DocumentID
AK_Document_FileName_Revision | Unique nonclustered index. | No | Yes | FileName, Revision

Triggers for table 'Production.Document', 1 item

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

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


Production.Illustration

Table: 'Production.Illustration'

3 fields. 20 bytes.

Bicycle assembly diagrams.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
IllustrationID | int identity |  | int |  | Not null | Primary key for Illustration records. |
Diagram | xml |  |  |  | Null | Illustrations used in manufacturing 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 created by a primary key constraint. | Yes | Yes | IllustrationID

Triggers for table 'Production.Illustration', 1 item

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

Dependencies for table 'Production.Illustration', 1 item

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


Production.Location

Table: 'Production.Location'

5 fields. 140 bytes.

Product inventory and manufacturing locations.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
LocationID | smallint identity |  | smallint |  | Not null | Primary key for Location records. |
Name | Name |  | nvarchar(50) |  | Not null | Location description. |
CostRate | smallmoney | 10,4 | decimal(10,4) | (0.00) | Not null | Standard hourly cost of the manufacturing location. | ([CostRate]>=(0.00))
Availability | decimal | 8,2 |  | (0.00) | Not null | Work capacity (in hours) of the manufacturing location. | ([Availability]>=(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.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 created by a primary key constraint. | Yes | Yes | LocationID
AK_Location_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Production.Location', 1 item

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

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


Production.Product

Table: 'Production.Product'

25 fields. 368 bytes.

Products sold or used in the manfacturing of sold products.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 manufactured 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 inventory quantity. | ([SafetyStockLevel]>(0))
ReorderPoint | smallint |  |  |  | Not null | Inventory level that triggers a purchase order or work order. | ([ReorderPoint]>(0))
StandardCost | money | 19,4 | decimal(19,4) |  | Not null | Standard cost of the product. | ([StandardCost]>=(0.00))
ListPrice | money | 19,4 | decimal(19,4) |  | Not null | Selling price. | ([ListPrice]>=(0.00))
Size | nvarchar | 5 |  |  | Null | Product size. |
SizeUnitMeasureCode | nchar | 3 |  |  | Null | Unit of measure for Size column. |
WeightUnitMeasureCode | nchar | 3 |  |  | Null | Unit of measure for Weight column. |
Weight | decimal | 8,2 |  |  | Null | Product weight. | ([Weight]>(0.00))
DaysToManufacture | int |  |  |  | Not null | Number of days required to manufacture the product. | ([DaysToManufacture]>=(0))
ProductLine | nchar | 2 |  |  | Null | R = Road, M = Mountain, T = Touring, S = Standard | (upper([ProductLine])='R' OR upper([ProductLine])='M' OR upper([ProductLine])='T' OR upper([ProductLine])='S' OR [ProductLine] IS NULL)
Class | nchar | 2 |  |  | Null | H = High, M = Medium, L = Low | (upper([Class])='H' OR upper([Class])='M' OR upper([Class])='L' OR [Class] IS NULL)
Style | nchar | 2 |  |  | Null | W = Womens, M = Mens, U = Universal | (upper([Style])='U' OR upper([Style])='M' OR upper([Style])='W' OR [Style] IS NULL)
ProductSubcategoryID | int |  |  |  | Null | Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. |
ProductModelID | int |  |  |  | Null | Product is a member of this product model. Foreign key to ProductModel.ProductModelID. |
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 | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ProductModelID
Product.ProductSubcategoryID | ProductSubcategory.ProductSubcategoryID | FK_Product_ProductSubcategory_ProductSubcategoryID
Product.SizeUnitMeasureCode | UnitMeasure.UnitMeasureCode | FK_Product_UnitMeasure_SizeUnitMeasureCode
Product.WeightUnitMeasureCode | UnitMeasure.UnitMeasureCode | FK_Product_UnitMeasure_WeightUnitMeasureCode

Indexes for table 'Production.Product', 4 items

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

Triggers for table 'Production.Product', 1 item

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

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


Production.ProductCategory

Table: 'Production.ProductCategory'

4 fields. 136 bytes.

High-level product categorization.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductCategoryID | int identity |  | int |  | Not null | Primary key for ProductCategory records. |
Name | Name |  | nvarchar(50) |  | Not null | Category description. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ProductCategoryID | Clustered index created by a primary key constraint. | Yes | Yes | ProductCategoryID
AK_ProductCategory_Name | Unique nonclustered index. | No | Yes | Name
AK_ProductCategory_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Production.ProductCategory', 1 item

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

Dependencies for table 'Production.ProductCategory', 1 item

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


Production.ProductCostHistory

Table: 'Production.ProductCostHistory'

5 fields. 73 bytes.

Changes in the cost of a product over time.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID |
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 cost of the product. | ([StandardCost]>=(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.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_ProductID

Indexes for table 'Production.ProductCostHistory', 1 item

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

Triggers for table 'Production.ProductCostHistory', 1 item

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

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


Production.ProductDescription

Table: 'Production.ProductDescription'

4 fields. 836 bytes.

Product descriptions in several languages.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductDescriptionID | int identity |  | int |  | Not null | Primary key for ProductDescription records. |
Description | nvarchar | 400 |  |  | Not null | Description of the product. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ProductDescriptionID | Clustered index created by a primary key constraint. | Yes | Yes | ProductDescriptionID
AK_ProductDescription_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Production.ProductDescription', 1 item

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

Dependencies for table 'Production.ProductDescription', 2 items

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


Production.ProductDocument

Table: 'Production.ProductDocument'

3 fields. 24 bytes.

Cross-reference table mapping products to related product documents.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
DocumentID | int |  |  |  | Not null | Document identification number. Foreign key to Document.DocumentID. |
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_DocumentID
ProductDocument.ProductID | Product.ProductID | FK_ProductDocument_Product_ProductID

Indexes for table 'Production.ProductDocument', 1 item

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

Triggers for table 'Production.ProductDocument', 1 item

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

Dependencies for table 'Production.ProductDocument', 1 item

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


Production.ProductInventory

Table: 'Production.ProductInventory'

7 fields. 61 bytes.

Product inventory information.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
LocationID | smallint |  |  |  | Not null | Inventory location identification number. Foreign key to Location.LocationID. |
Shelf | nvarchar | 10 |  |  | Not null | Storage compartment within an inventory location. | ([Shelf] like '[A-Za-z]' OR [Shelf]='N/A')
Bin | tinyint |  |  |  | Not null | Storage container on a shelf in an inventory location. | ([Bin]>=(0) AND [Bin]<=(100))
Quantity | smallint |  |  | (0) | Not null | Quantity of products in the inventory location. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_LocationID
ProductInventory.ProductID | Product.ProductID | FK_ProductInventory_Product_ProductID

Indexes for table 'Production.ProductInventory', 1 item

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

Triggers for table 'Production.ProductInventory', 1 item

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

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


Production.ProductListPriceHistory

Table: 'Production.ProductListPriceHistory'

5 fields. 73 bytes.

Changes in the list price of a product over time.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID |
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 price. | ([ListPrice]>(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_ProductID_StartDate | Clustered index created by a primary key constraint. | Yes | Yes | ProductID, StartDate

Triggers for table 'Production.ProductListPriceHistory', 1 item

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

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


Production.ProductModel

Table: 'Production.ProductModel'

6 fields. 136 bytes.

Product model classification.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductModelID | int identity |  | int |  | Not null | Primary key for ProductModel records. |
Name | Name |  | nvarchar(50) |  | Not null | Product model description. |
CatalogDescription | xml |  |  |  | Null | Detailed product catalog information in xml format. |
Instructions | xml |  |  |  | Null | Manufacturing instructions in xml format. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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 created by a primary key constraint. | Yes | Yes | ProductModelID
AK_ProductModel_Name | Unique nonclustered index. | No | Yes | Name
AK_ProductModel_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Production.ProductModel', 1 item

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

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


Production.ProductModelIllustration

Table: 'Production.ProductModelIllustration'

3 fields. 24 bytes.

Cross-reference table mapping product models and illustrations.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductModelID | int |  |  |  | Not null | Primary key. Foreign key to ProductModel.ProductModelID. |
IllustrationID | int |  |  |  | Not null | Primary key. Foreign key to Illustration.IllustrationID. |
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_Illustration_IllustrationID
ProductModelIllustration.ProductModelID | ProductModel.ProductModelID | FK_ProductModelIllustration_ProductModel_ProductModelID

Indexes for table 'Production.ProductModelIllustration', 1 item

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

Triggers for table 'Production.ProductModelIllustration', 1 item

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

Dependencies for table 'Production.ProductModelIllustration', 1 item

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


Production.ProductModelProductDescriptionCulture

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 Type | Default | Nullable | Description | Check
ProductModelID | int |  |  |  | Not null | Primary key. Foreign key to ProductModel.ProductModelID. |
ProductDescriptionID | int |  |  |  | Not null | Primary key. Foreign key to ProductDescription.ProductDescriptionID. |
CultureID | nchar | 6 |  |  | Not null | Culture identification number. Foreign key to Culture.CultureID. |
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_ProductDescriptionID_CultureID | ProductModelID, ProductDescriptionID, CultureID

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

Foreign | Primary | Key Name
ProductModelProductDescriptionCulture.CultureID | Culture.CultureID | FK_ProductModelProductDescriptionCulture_Culture_CultureID
ProductModelProductDescriptionCulture.ProductDescriptionID | ProductDescription.ProductDescriptionID | FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID
ProductModelProductDescriptionCulture.ProductModelID | ProductModel.ProductModelID | FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID

Indexes for table 'Production.ProductModelProductDescriptionCulture', 1 item

Index Name | Description | Clustered | Unique | Fields
PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureID | Clustered index created by a primary key constraint. | Yes | Yes | ProductModelID, ProductDescriptionID, CultureID

Triggers for table 'Production.ProductModelProductDescriptionCulture', 1 item

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

Dependencies for table 'Production.ProductModelProductDescriptionCulture', 2 items

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


Production.ProductPhoto

Table: 'Production.ProductPhoto'

6 fields. 220 bytes.

Product images.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductPhotoID | int identity |  | int |  | Not null | Primary key for ProductPhoto records. |
ThumbNailPhoto | varbinary |  |  |  | Null | Small image of the product. |
ThumbnailPhotoFileName | nvarchar | 50 |  |  | Null | Small image 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 created by a primary key constraint. | Yes | Yes | ProductPhotoID

Triggers for table 'Production.ProductPhoto', 1 item

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

Dependencies for table 'Production.ProductPhoto', 1 item

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


Production.ProductProductPhoto

Table: 'Production.ProductProductPhoto'

4 fields. 25 bytes.

Cross-reference table mapping products and product photos.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
ProductPhotoID | int |  |  |  | Not null | Product photo identification number. Foreign key to ProductPhoto.ProductPhotoID. |
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_ProductPhoto_ProductPhotoID

Indexes for table 'Production.ProductProductPhoto', 1 item

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

Triggers for table 'Production.ProductProductPhoto', 1 item

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

Dependencies for table 'Production.ProductProductPhoto', 1 item

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


Production.ProductReview

Table: 'Production.ProductReview'

8 fields. 7944 bytes.

Customer reviews of products they have purchased.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductReviewID | int identity |  | int |  | Not null | Primary key for ProductReview records. |
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
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 given by the reviewer. Scale is 1 to 5 with 5 as the highest rating. | ([Rating]>=(1) AND [Rating]<=(5))
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_ProductID

Indexes for table 'Production.ProductReview', 2 items

Index Name | Description | Clustered | Unique | Fields
PK_ProductReview_ProductReviewID | Clustered index created by a primary key constraint. | Yes | Yes | ProductReviewID
IX_ProductReview_ProductID_Name | Nonclustered index. | No | No | ProductID, ReviewerName

Triggers for table 'Production.ProductReview', 1 item

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

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


Production.ProductSubcategory

Table: 'Production.ProductSubcategory'

5 fields. 140 bytes.

Product subcategories. See ProductCategory table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductSubcategoryID | int identity |  | int |  | Not null | Primary key for ProductSubcategory records. |
ProductCategoryID | int |  |  |  | Not null | Product category identification number. Foreign key to ProductCategory.ProductCategoryID. |
Name | Name |  | nvarchar(50) |  | Not null | Subcategory description. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ProductCategory_ProductCategoryID

Indexes for table 'Production.ProductSubcategory', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_ProductSubcategory_ProductSubcategoryID | Clustered index created by a primary key constraint. | Yes | Yes | ProductSubcategoryID
AK_ProductSubcategory_Name | Unique nonclustered index. | No | Yes | Name
AK_ProductSubcategory_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Production.ProductSubcategory', 1 item

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

Dependencies for table 'Production.ProductSubcategory', 1 item

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


Production.ScrapReason

Table: 'Production.ScrapReason'

3 fields. 118 bytes.

Manufacturing failure reasons lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ScrapReasonID | smallint identity |  | smallint |  | Not null | Primary key for ScrapReason 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 created by a primary key constraint. | Yes | Yes | ScrapReasonID
AK_ScrapReason_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Production.ScrapReason', 1 item

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

Dependencies for table 'Production.ScrapReason', 1 item

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


Production.TransactionHistory

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 Type | Default | Nullable | Description | Check
TransactionID | int identity |  | int |  | Not null | Primary key for TransactionHistory records. |
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
ReferenceOrderID | int |  |  |  | Not null | Purchase order, sales order, or work order identification number. |
ReferenceOrderLineID | int |  |  | (0) | Not null | Line number 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 = WorkOrder, S = SalesOrder, P = PurchaseOrder | (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='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_ProductID

Indexes for table 'Production.TransactionHistory', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_TransactionHistory_TransactionID | Clustered index created by a primary key constraint. | Yes | Yes | TransactionID
IX_TransactionHistory_ProductID | Nonclustered index. | No | No | ProductID
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID | Nonclustered index. | No | No | ReferenceOrderID, ReferenceOrderLineID

Triggers for table 'Production.TransactionHistory', 1 item

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

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


Production.TransactionHistoryArchive

Table: 'Production.TransactionHistoryArchive'

9 fields. 75 bytes.

Transactions for previous years.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
TransactionID | int |  |  |  | Not null | Primary key for TransactionHistoryArchive records. |
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
ReferenceOrderID | int |  |  |  | Not null | Purchase order, sales order, or work order identification number. |
ReferenceOrderLineID | int |  |  | (0) | Not null | Line number 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 Order, S = Sales Order, P = Purchase Order | (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='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_TransactionID | Clustered index created by a primary key constraint. | Yes | Yes | TransactionID
IX_TransactionHistoryArchive_ProductID | Nonclustered index. | No | No | ProductID
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID | Nonclustered index. | No | No | ReferenceOrderID, ReferenceOrderLineID

Triggers for table 'Production.TransactionHistoryArchive', 1 item

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

Dependencies for table 'Production.TransactionHistoryArchive', 2 items

Object Name | Type | Field Name
Production.CK_TransactionHistoryArchive_TransactionType | check cns | N/A
Production.uTransactionHistoryArchive | trigger | N/A


Production.UnitMeasure

Table: 'Production.UnitMeasure'

3 fields. 122 bytes.

Unit of measure lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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_UnitMeasureCode | Clustered index created by a primary key constraint. | Yes | Yes | UnitMeasureCode
AK_UnitMeasure_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Production.UnitMeasure', 1 item

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

Dependencies for table 'Production.UnitMeasure', 1 item

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


Production.WorkOrder

Table: 'Production.WorkOrder'

10 fields. 84 bytes.

Manufacturing work orders.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
WorkOrderID | int identity |  | int |  | Not null | Primary key for WorkOrder records. |
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
OrderQty | int |  |  |  | Not null | Product quantity to build. | ([OrderQty]>(0))
StockedQty | int |  |  |  | Not null | Quantity built and put in inventory. |
ScrappedQty | smallint |  |  |  | Not null | Quantity that failed inspection. | ([ScrappedQty]>=(0))
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_ScrapReasonID

Indexes for table 'Production.WorkOrder', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_WorkOrder_WorkOrderID | Clustered index created by a primary key constraint. | Yes | Yes | WorkOrderID
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 inserts a row in the TransactionHistory table. | after Insert | Yes
uWorkOrder | AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table. | after Update | Yes

Dependencies for table 'Production.WorkOrder', 2 items

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


Production.WorkOrderRouting

Table: 'Production.WorkOrderRouting'

12 fields. 145 bytes.

Work order details.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
WorkOrderID | int |  |  |  | Not null | Primary key. Foreign key to WorkOrder.WorkOrderID. |
ProductID | int |  |  |  | Not null | Primary key. Foreign key to Product.ProductID. |
OperationSequence | smallint |  |  |  | Not null | Primary key. Indicates the manufacturing process sequence. |
LocationID | smallint |  |  |  | Not null | Manufacturing location where the part is processed. Foreign key to Location.LocationID. |
ScheduledStartDate | datetime |  |  |  | Not null | Planned manufacturing start date. |
ScheduledEndDate | datetime |  |  |  | Not null | Planned manufacturing end date. |
ActualStartDate | datetime |  |  |  | Null | Actual start date. |
ActualEndDate | datetime |  |  |  | Null | Actual end date. |
ActualResourceHrs | decimal | 9,4 |  |  | Null | Number of manufacturing hours used. | ([ActualResourceHrs]>=(0.0000))
PlannedCost | money | 19,4 | decimal(19,4) |  | Not null | Estimated manufacturing cost. | ([PlannedCost]>(0.00))
ActualCost | money | 19,4 | decimal(19,4) |  | Null | Actual manufacturing cost. | ([ActualCost]>(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.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_LocationID
WorkOrderRouting.WorkOrderID | WorkOrder.WorkOrderID | FK_WorkOrderRouting_WorkOrder_WorkOrderID

Indexes for table 'Production.WorkOrderRouting', 2 items

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

Triggers for table 'Production.WorkOrderRouting', 1 item

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

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


Purchasing.ProductVendor

Table: 'Purchasing.ProductVendor'

11 fields. 104 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ProductID | int |  |  |  | Not null | Primary key. Foreign key to Product.ProductID. |
VendorID | int |  |  |  | Not null | Primary key. Foreign key to Vendor.VendorID. |
AverageLeadTime | int |  |  |  | Not null | The average span of time (in days) between placing an order with the vendor and receiving the purchased product. | ([AverageLeadTime]>=(1))
StandardPrice | money | 19,4 | decimal(19,4) |  | Not null | The vendor's usual selling price. | ([StandardPrice]>(0.00))
LastReceiptCost | money | 19,4 | decimal(19,4) |  | Null | The selling price when last purchased. | ([LastReceiptCost]>(0.00))
LastReceiptDate | datetime |  |  |  | Null | Date the product was last received by the vendor. |
MinOrderQty | int |  |  |  | Not null | The maximum quantity that should be ordered. | ([MinOrderQty]>=(1))
MaxOrderQty | int |  |  |  | Not null | The minimum quantity that should be ordered. | ([MaxOrderQty]>=(1))
OnOrderQty | int |  |  |  | Null | The quantity currently on order. | ([OnOrderQty]>=(0))
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_ProductID
ProductVendor.UnitMeasureCode | UnitMeasure.UnitMeasureCode | FK_ProductVendor_UnitMeasure_UnitMeasureCode
ProductVendor.VendorID | Vendor.VendorID | FK_ProductVendor_Vendor_VendorID

Indexes for table 'Purchasing.ProductVendor', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_ProductVendor_ProductID_VendorID | Clustered index created by a primary key constraint. | Yes | Yes | ProductID, VendorID
IX_ProductVendor_UnitMeasureCode | Nonclustered index. | No | No | UnitMeasureCode
IX_ProductVendor_VendorID | Nonclustered index. | No | No | VendorID

Triggers for table 'Purchasing.ProductVendor', 1 item

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

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


Purchasing.PurchaseOrderDetail

Table: 'Purchasing.PurchaseOrderDetail'

11 fields. 119 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
PurchaseOrderID | int |  |  |  | Not null | Primary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID. |
PurchaseOrderDetailID | int identity |  | int |  | Not null | Primary key. One line number per purchased product. |
DueDate | datetime |  |  |  | Not null | Date the product is expected to be received. |
OrderQty | smallint |  |  |  | Not null | Quantity ordered. | ([OrderQty]>(0))
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
UnitPrice | money | 19,4 | decimal(19,4) |  | Not null | Vendor's selling price of a single product. | ([UnitPrice]>=(0.00))
LineTotal | money | 19,4 | decimal(19,4) |  | Not null | Per product subtotal. Computed as OrderQty * UnitPrice. |
ReceivedQty | decimal | 8,2 |  |  | Not null | Quantity actually received from the vendor. | ([ReceivedQty]>=(0.00))
RejectedQty | decimal | 8,2 |  |  | Not null | Quantity rejected during inspection. | ([RejectedQty]>=(0.00))
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.PurchaseOrderID | FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID

Indexes for table 'Purchasing.PurchaseOrderDetail', 2 items

Index Name | Description | Clustered | Unique | Fields
PK_PurchaseOrderDetail_PurchaseOrderID_PurchaseOrderDetailID | Clustered index created by a primary key constraint. | Yes | Yes | PurchaseOrderID, PurchaseOrderDetailID
IX_PurchaseOrderDetail_ProductID | Nonclustered index. | No | No | ProductID

Triggers for table 'Purchasing.PurchaseOrderDetail', 2 items

Name | Description | Type | Enabled
iPurchaseOrderDetail | AFTER INSERT trigger that inserts a row in the TransactionHistory table and updates the PurchaseOrderHeader.SubTotal column. | after Insert | Yes
uPurchaseOrderDetail | AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in PurchaseOrderDetail and updates the PurchaseOrderHeader.SubTotal column. | after Update | Yes

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


Purchasing.PurchaseOrderHeader

Table: 'Purchasing.PurchaseOrderHeader'

13 fields. 150 bytes.

General purchase order information. See PurchaseOrderDetail.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete | ([Status]>=(1) AND [Status]<=(4))
EmployeeID | int |  |  |  | Not null | Employee who created the purchase order. Foreign key to Employee.EmployeeID. |
VendorID | int |  |  |  | Not null | Vendor with whom the purchase order is placed. Foreign key to Vendor.VendorID. |
ShipMethodID | int |  |  |  | Not null | Shipping method. Foreign key to ShipMethod.ShipMethodID. |
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 order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID. | ([SubTotal]>=(0.00))
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 cost. | ([Freight]>=(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_Employee_EmployeeID
PurchaseOrderHeader.ShipMethodID | ShipMethod.ShipMethodID | FK_PurchaseOrderHeader_ShipMethod_ShipMethodID
PurchaseOrderHeader.VendorID | Vendor.VendorID | FK_PurchaseOrderHeader_Vendor_VendorID

Indexes for table 'Purchasing.PurchaseOrderHeader', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_PurchaseOrderHeader_PurchaseOrderID | Clustered index created by a primary key constraint. | Yes | Yes | PurchaseOrderID
IX_PurchaseOrderHeader_EmployeeID | Nonclustered index. | No | No | EmployeeID
IX_PurchaseOrderHeader_VendorID | Nonclustered index. | No | No | VendorID

Triggers for table 'Purchasing.PurchaseOrderHeader', 1 item

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

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


Purchasing.ShipMethod

Table: 'Purchasing.ShipMethod'

6 fields. 178 bytes.

Shipping company lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 shipping charge. | ([ShipBase]>(0.00))
ShipRate | money | 19,4 | decimal(19,4) | (0.00) | Not null | Shipping charge per pound. | ([ShipRate]>(0.00))
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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 created by a primary key constraint. | Yes | Yes | ShipMethodID
AK_ShipMethod_Name | Unique nonclustered index. | No | Yes | Name
AK_ShipMethod_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Purchasing.ShipMethod', 1 item

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

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


Purchasing.Vendor

Table: 'Purchasing.Vendor'

8 fields. 2201 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
VendorID | int identity |  | int |  | Not null | Primary key for Vendor records. |
AccountNumber | AccountNumber |  | nvarchar(15) |  | Not null | Vendor account (identification) number. |
Name | Name |  | nvarchar(50) |  | Not null | Company name. |
CreditRating | tinyint |  |  |  | Not null | 1 = Superior, 2 = Excellent, 3 = Above average, 4 = Average, 5 = Below average | ([CreditRating]>=(1) AND [CreditRating]<=(5))
PreferredVendorStatus | Flag |  | bit | (1) | Not null | 0 = Do not 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. |
PurchasingWebServiceURL | nvarchar | 1024 |  |  | Null | Vendor URL. |
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 created by a primary key constraint. | Yes | Yes | VendorID
AK_Vendor_AccountNumber | Unique nonclustered index. | No | Yes | AccountNumber

Triggers for table 'Purchasing.Vendor', 2 items

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

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


Purchasing.VendorAddress

Table: 'Purchasing.VendorAddress'

4 fields. 28 bytes.

Cross-reference mapping vendors and addresses.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
VendorID | int |  |  |  | Not null | Primary key. Foreign key to Vendor.VendorID. |
AddressID | int |  |  |  | Not null | Primary key. Foreign key to Address.AddressID. |
AddressTypeID | int |  |  |  | Not null | Address type. Foreign key to AddressType.AddressTypeID. |
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_AddressID
VendorAddress.AddressTypeID | AddressType.AddressTypeID | FK_VendorAddress_AddressType_AddressTypeID
VendorAddress.VendorID | Vendor.VendorID | FK_VendorAddress_Vendor_VendorID

Indexes for table 'Purchasing.VendorAddress', 2 items

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

Triggers for table 'Purchasing.VendorAddress', 1 item

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

Dependencies for table 'Purchasing.VendorAddress', 2 items

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


Purchasing.VendorContact

Table: 'Purchasing.VendorContact'

4 fields. 28 bytes.

Cross-reference table mapping vendors and their employees.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
VendorID | int |  |  |  | Not null | Primary key. |
ContactID | int |  |  |  | Not null | Contact (Vendor employee) identification number. Foreign key to Contact.ContactID. |
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_ContactID
VendorContact.ContactTypeID | ContactType.ContactTypeID | FK_VendorContact_ContactType_ContactTypeID
VendorContact.VendorID | Vendor.VendorID | FK_VendorContact_Vendor_VendorID

Indexes for table 'Purchasing.VendorContact', 3 items

Index Name | Description | Clustered | Unique | Fields
PK_VendorContact_VendorID_ContactID | Clustered index created by a primary key constraint. | Yes | Yes | VendorID, ContactID
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 setting the ModifiedDate column in the VendorContact table to the current date. | after Update | Yes

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


Sales.ContactCreditCard

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 Type | Default | Nullable | Description | Check
ContactID | int |  |  |  | Not null | Customer identification number. Foreign key to Contact.ContactID. |
CreditCardID | int |  |  |  | Not null | Credit card identification number. Foreign key to CreditCard.CreditCardID. |
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_ContactID
ContactCreditCard.CreditCardID | CreditCard.CreditCardID | FK_ContactCreditCard_CreditCard_CreditCardID

Indexes for table 'Sales.ContactCreditCard', 1 item

Index Name | Description | Clustered | Unique | Fields
PK_ContactCreditCard_ContactID_CreditCardID | Clustered index created by a primary key constraint. | Yes | Yes | ContactID, CreditCardID

Triggers for table 'Sales.ContactCreditCard', 1 item

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

Dependencies for table 'Sales.ContactCreditCard', 1 item

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


Sales.CountryRegionCurrency

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 Type | Default | Nullable | Description | Check
CountryRegionCode | nvarchar | 3 |  |  | Not null | ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode. |
CurrencyCode | nchar | 3 |  |  | Not null | ISO standard currency code. Foreign key to Currency.CurrencyCode. |
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_CountryRegion_CountryRegionCode
CountryRegionCurrency.CurrencyCode | Currency.CurrencyCode | FK_CountryRegionCurrency_Currency_CurrencyCode

Indexes for table 'Sales.CountryRegionCurrency', 2 items

Index Name | Description | Clustered | Unique | Fields
PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode | Clustered index created by a primary key constraint. | Yes | Yes | CountryRegionCode, CurrencyCode
IX_CountryRegionCurrency_CurrencyCode | Nonclustered index. | No | No | CurrencyCode

Triggers for table 'Sales.CountryRegionCurrency', 1 item

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

Dependencies for table 'Sales.CountryRegionCurrency', 1 item

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


Sales.CreditCard

Table: 'Sales.CreditCard'

6 fields. 173 bytes.

Customer credit card information.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 created by a primary key constraint. | Yes | Yes | CreditCardID
AK_CreditCard_CardNumber | Unique nonclustered index. | No | Yes | CardNumber

Triggers for table 'Sales.CreditCard', 1 item

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

Dependencies for table 'Sales.CreditCard', 1 item

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


Sales.Currency

Table: 'Sales.Currency'

3 fields. 122 bytes.

Lookup table containing standard ISO currencies.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 created by a primary key constraint. | Yes | Yes | CurrencyCode
AK_Currency_Name | Unique nonclustered index. | No | Yes | Name

Triggers for table 'Sales.Currency', 1 item

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

Dependencies for table 'Sales.Currency', 1 item

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


Sales.CurrencyRate

Table: 'Sales.CurrencyRate'

7 fields. 90 bytes.

Currency exchange rates.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
CurrencyRateID | int identity |  | int |  | Not null | Primary key for CurrencyRate 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_FromCurrencyCode
CurrencyRate.ToCurrencyCode | Currency.CurrencyCode | FK_CurrencyRate_Currency_ToCurrencyCode

Indexes for table 'Sales.CurrencyRate', 2 items

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

Triggers for table 'Sales.CurrencyRate', 1 item

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

Dependencies for table 'Sales.CurrencyRate', 1 item

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


Sales.Customer

Table: 'Sales.Customer'

6 fields. 52 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 SalesTerritory.SalesTerritoryID. |
AccountNumber | varchar | 10 |  |  | Not null | Unique number identifying the customer assigned by the accounting system. |
CustomerType | nchar | 1 |  |  | Not null | Customer type: I = Individual, S = Store | (upper([CustomerType])='I' OR upper([CustomerType])='S')
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_TerritoryID

Indexes for table 'Sales.Customer', 4 items

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

Triggers for table 'Sales.Customer', 1 item

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

Dependencies for table 'Sales.Customer', 2 items

Object Name | Type | Field Name
dbo.ufnLeadingZeros | scalar function | N/A
Sales.Customer | user table | CustomerID


Sales.CustomerAddress

Table: 'Sales.CustomerAddress'

5 fields. 44 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
CustomerID | int |  |  |  | Not null | Primary key. Foreign key to Customer.CustomerID. |
AddressID | int |  |  |  | Not null | Primary key. Foreign key to Address.AddressID. |
AddressTypeID | int |  |  |  | Not null | Address type. Foreign key to AddressType.AddressTypeID. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_AddressID
CustomerAddress.AddressTypeID | AddressType.AddressTypeID | FK_CustomerAddress_AddressType_AddressTypeID
CustomerAddress.CustomerID | Customer.CustomerID | FK_CustomerAddress_Customer_CustomerID

Indexes for table 'Sales.CustomerAddress', 2 items

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

Triggers for table 'Sales.CustomerAddress', 1 item

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

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


Sales.Individual

Table: 'Sales.Individual'

4 fields. 24 bytes.

Demographic data about customers that purchase Adventure Works products online.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
CustomerID | int |  |  |  | Not null | Unique customer identification number. Foreign key to Customer.CustomerID. |
ContactID | int |  |  |  | Not null | Identifies the customer in the Contact table. Foreign key to Contact.ContactID. |
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_CustomerID

Indexes for table 'Sales.Individual', 1 item

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

Triggers for table 'Sales.Individual', 1 item

Name | Description | Type | Enabled
iuIndividual | AFTER INSERT, UPDATE 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. | after Insert Update | Yes

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


Sales.SalesOrderDetail

Table: 'Sales.SalesOrderDetail'

11 fields. 182 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesOrderID | int |  |  |  | Not null | Primary key. Foreign key to SalesOrderHeader.SalesOrderID. |
SalesOrderDetailID | int identity |  | int |  | Not null | Primary key. One incremental unique number per product sold. |
CarrierTrackingNumber | nvarchar | 25 |  |  | Null | Shipment tracking number supplied by the shipper. |
OrderQty | smallint |  |  |  | Not null | Quantity ordered per product. | ([OrderQty]>(0))
ProductID | int |  |  |  | Not null | Product sold to customer. Foreign key to Product.ProductID. |
SpecialOfferID | int |  |  |  | Not null | Promotional code. Foreign key to SpecialOffer.SpecialOfferID. |
UnitPrice | money | 19,4 | decimal(19,4) |  | Not null | Selling price of a single product. | ([UnitPrice]>=(0.00))
UnitPriceDiscount | money | 19,4 | decimal(19,4) | (0.0) | Not null | Discount amount. | ([UnitPriceDiscount]>=(0.00))
LineTotal | numeric | 38,6 |  |  | Not null | Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_SalesOrderHeader_SalesOrderID
SalesOrderDetail.SpecialOfferID | SpecialOfferProduct.SpecialOfferID | FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID
SalesOrderDetail.ProductID | SpecialOfferProduct.ProductID | FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID

Indexes for table 'Sales.SalesOrderDetail', 3 items

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

Triggers for table 'Sales.SalesOrderDetail', 1 item

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

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


Sales.SalesOrderHeader

Table: 'Sales.SalesOrderHeader'

27 fields. 608 bytes.

General sales order information.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled | ([Status]>=(0) AND [Status]<=(8))
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. |
PurchaseOrderNumber | OrderNumber |  | nvarchar(25) |  | Null | Customer purchase order number reference. |
AccountNumber | AccountNumber |  | nvarchar(15) |  | Null | Financial accounting number reference. |
CustomerID | int |  |  |  | Not null | Customer identification number. Foreign key to Customer.CustomerID. |
ContactID | int |  |  |  | Not null | Customer contact identification number. Foreign key to Contact.ContactID. |
SalesPersonID | int |  |  |  | Null | Sales person who created the sales order. Foreign key to SalesPerson.SalePersonID. |
TerritoryID | int |  |  |  | Null | Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID. |
BillToAddressID | int |  |  |  | Not null | Customer billing address. Foreign key to Address.AddressID. |
ShipToAddressID | int |  |  |  | Not null | Customer shipping address. Foreign key to Address.AddressID. |
ShipMethodID | int |  |  |  | Not null | Shipping method. Foreign key to ShipMethod.ShipMethodID. |
CreditCardID | int |  |  |  | Null | Credit card identification number. Foreign key to CreditCard.CreditCardID. |
CreditCardApprovalCode | varchar | 15 |  |  | Null | Approval code provided by the credit card company. |
CurrencyRateID | int |  |  |  | Null | Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID. |
SubTotal | money | 19,4 | decimal(19,4) | (0.00) | Not null | Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID. | ([SubTotal]>=(0.00))
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 cost. | ([Freight]>=(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 representative comments. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_BillToAddressID
SalesOrderHeader.ShipToAddressID | Address.AddressID | FK_SalesOrderHeader_Address_ShipToAddressID
SalesOrderHeader.ContactID | Contact.ContactID | FK_SalesOrderHeader_Contact_ContactID
SalesOrderHeader.ShipMethodID | ShipMethod.ShipMethodID | FK_SalesOrderHeader_ShipMethod_ShipMethodID
SalesOrderHeader.CreditCardID | CreditCard.CreditCardID | FK_SalesOrderHeader_CreditCard_CreditCardID
SalesOrderHeader.CurrencyRateID | CurrencyRate.CurrencyRateID | FK_SalesOrderHeader_CurrencyRate_CurrencyRateID
SalesOrderHeader.CustomerID | Customer.CustomerID | FK_SalesOrderHeader_Customer_CustomerID
SalesOrderHeader.SalesPersonID | SalesPerson.SalesPersonID | FK_SalesOrderHeader_SalesPerson_SalesPersonID
SalesOrderHeader.TerritoryID | SalesTerritory.TerritoryID | FK_SalesOrderHeader_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesOrderHeader', 5 items

Index Name | Description | Clustered | Unique | Fields
PK_SalesOrderHeader_SalesOrderID | Clustered index created by a primary key constraint. | Yes | Yes | SalesOrderID
AK_SalesOrderHeader_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid
AK_SalesOrderHeader_SalesOrderNumber | Unique nonclustered index. | No | Yes | SalesOrderNumber
IX_SalesOrderHeader_CustomerID | Nonclustered index. | No | No | CustomerID
IX_SalesOrderHeader_SalesPersonID | Nonclustered index. | No | No | SalesPersonID

Triggers for table 'Sales.SalesOrderHeader', 1 item

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

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


Sales.SalesOrderHeaderSalesReason

Table: 'Sales.SalesOrderHeaderSalesReason'

3 fields. 24 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesOrderID | int |  |  |  | Not null | Primary key. Foreign key to SalesOrderHeader.SalesOrderID. |
SalesReasonID | int |  |  |  | Not null | Primary key. Foreign key to SalesReason.SalesReasonID. |
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_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID | Clustered index created by a primary key constraint. | Yes | Yes | SalesOrderID, SalesReasonID

Triggers for table 'Sales.SalesOrderHeaderSalesReason', 1 item

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

Dependencies for table 'Sales.SalesOrderHeaderSalesReason', 1 item

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


Sales.SalesPerson

Table: 'Sales.SalesPerson'

9 fields. 136 bytes.

Sales representative current information.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesPersonID | int |  |  |  | Not null | Primary key for SalesPerson records. |
TerritoryID | int |  |  |  | Null | Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID. |
SalesQuota | money | 19,4 | decimal(19,4) |  | Null | Projected yearly sales. | ([SalesQuota]>(0.00))
Bonus | money | 19,4 | decimal(19,4) | (0.00) | Not null | Bonus due if quota is met. | ([Bonus]>=(0.00))
CommissionPct | smallmoney | 10,4 | decimal(10,4) | (0.00) | Not null | Commision percent received per sale. | ([CommissionPct]>=(0.00))
SalesYTD | money | 19,4 | decimal(19,4) | (0.00) | Not null | Sales total year to date. | ([SalesYTD]>=(0.00))
SalesLastYear | money | 19,4 | decimal(19,4) | (0.00) | Not null | Sales total of previous year. | ([SalesLastYear]>=(0.00))
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_SalesPersonID
SalesPerson.TerritoryID | SalesTerritory.TerritoryID | FK_SalesPerson_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesPerson', 2 items

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

Triggers for table 'Sales.SalesPerson', 1 item

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

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


Sales.SalesPersonQuotaHistory

Table: 'Sales.SalesPersonQuotaHistory'

5 fields. 73 bytes.

Sales performance tracking.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesPersonID | int |  |  |  | Not null | Sales person identification number. Foreign key to SalesPerson.SalesPersonID. |
QuotaDate | datetime |  |  |  | Not null | Sales quota date. |
SalesQuota | money | 19,4 | decimal(19,4) |  | Not null | Sales quota amount. | ([SalesQuota]>(0.00))
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_SalesPerson_SalesPersonID

Indexes for table 'Sales.SalesPersonQuotaHistory', 2 items

Index Name | Description | Clustered | Unique | Fields
PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDate | Clustered index created by a primary key constraint. | Yes | Yes | SalesPersonID, QuotaDate
AK_SalesPersonQuotaHistory_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Sales.SalesPersonQuotaHistory', 1 item

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

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


Sales.SalesReason

Table: 'Sales.SalesReason'

4 fields. 220 bytes.

Lookup table of customer purchase reasons.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesReasonID | int identity |  | int |  | Not null | Primary key for SalesReason 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 created by a primary key constraint. | Yes | Yes | SalesReasonID

Triggers for table 'Sales.SalesReason', 1 item

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

Dependencies for table 'Sales.SalesReason', 1 item

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


Sales.SalesTaxRate

Table: 'Sales.SalesTaxRate'

7 fields. 153 bytes.

Tax rate lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesTaxRateID | int identity |  | int |  | Not null | Primary key for SalesTaxRate records. |
StateProvinceID | int |  |  |  | Not null | State, province, or country/region the sales tax applies to. |
TaxType | tinyint |  |  |  | Not null | 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions. | ([TaxType]>=(1) AND [TaxType]<=(3))
TaxRate | smallmoney | 10,4 | decimal(10,4) | (0.00) | Not null | Tax rate amount. |
Name | Name |  | nvarchar(50) |  | Not null | Tax rate description. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_StateProvinceID

Indexes for table 'Sales.SalesTaxRate', 3 items

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

Triggers for table 'Sales.SalesTaxRate', 1 item

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

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


Sales.SalesTerritory

Table: 'Sales.SalesTerritory'

10 fields. 326 bytes.

Sales territory lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
TerritoryID | int identity |  | int |  | Not null | Primary key for SalesTerritory records. |
Name | Name |  | nvarchar(50) |  | Not null | Sales territory description |
CountryRegionCode | nvarchar | 3 |  |  | Not null | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. |
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 territory year to date. | ([SalesYTD]>=(0.00))
SalesLastYear | money | 19,4 | decimal(19,4) | (0.00) | Not null | Sales in the territory the previous year. | ([SalesLastYear]>=(0.00))
CostYTD | money | 19,4 | decimal(19,4) | (0.00) | Not null | Business costs in the territory year to date. | ([CostYTD]>=(0.00))
CostLastYear | money | 19,4 | decimal(19,4) | (0.00) | Not null | Business costs in the territory the previous year. | ([CostLastYear]>=(0.00))
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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 created by a primary key constraint. | Yes | Yes | TerritoryID
AK_SalesTerritory_Name | Unique nonclustered index. | No | Yes | Name
AK_SalesTerritory_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Sales.SalesTerritory', 1 item

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

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


Sales.SalesTerritoryHistory

Table: 'Sales.SalesTerritoryHistory'

6 fields. 72 bytes.

Sales representative transfers to other sales territories.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SalesPersonID | int |  |  |  | Not null | Primary key for SalesTerritoryHistory records. |
TerritoryID | int |  |  |  | Not null | Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID. |
StartDate | datetime |  |  |  | Not null | Date the sales representive started work in the territory. |
EndDate | datetime |  |  |  | Null | Date the sales representative left work in the territory. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_SalesPerson_SalesPersonID
SalesTerritoryHistory.TerritoryID | SalesTerritory.TerritoryID | FK_SalesTerritoryHistory_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesTerritoryHistory', 2 items

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

Triggers for table 'Sales.SalesTerritoryHistory', 1 item

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

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


Sales.ShoppingCartItem

Table: 'Sales.ShoppingCartItem'

6 fields. 144 bytes.

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

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
ShoppingCartItemID | int identity |  | int |  | Not null | Primary key for ShoppingCartItem records. |
ShoppingCartID | nvarchar | 50 |  |  | Not null | Shopping cart identification number. |
Quantity | int |  |  | (1) | Not null | Product quantity ordered. | ([Quantity]>=(1))
ProductID | int |  |  |  | Not null | Product ordered. Foreign key to Product.ProductID. |
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_ProductID

Indexes for table 'Sales.ShoppingCartItem', 2 items

Index Name | Description | Clustered | Unique | Fields
PK_ShoppingCartItem_ShoppingCartItemID | Clustered index created by a primary key constraint. | Yes | Yes | ShoppingCartItemID
IX_ShoppingCartItem_ShoppingCartID_ProductID | Nonclustered index. | No | No | ShoppingCartID, ProductID

Triggers for table 'Sales.ShoppingCartItem', 1 item

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

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


Sales.SpecialOffer

Table: 'Sales.SpecialOffer'

11 fields. 798 bytes.

Sale discounts lookup table.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
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 precentage. | ([DiscountPct]>=(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 discount percent allowed. | ([MinQty]>=(0))
MaxQty | int |  |  |  | Null | Maximum discount percent allowed. | ([MaxQty]>=(0))
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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 created by a primary key constraint. | Yes | Yes | SpecialOfferID
AK_SpecialOffer_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid

Triggers for table 'Sales.SpecialOffer', 1 item

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

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


Sales.SpecialOfferProduct

Table: 'Sales.SpecialOfferProduct'

4 fields. 40 bytes.

Cross-reference table mapping products to special offer discounts.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
SpecialOfferID | int |  |  |  | Not null | Primary key for SpecialOfferProduct records. |
ProductID | int |  |  |  | Not null | Product identification number. Foreign key to Product.ProductID. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ProductID
SpecialOfferProduct.SpecialOfferID | SpecialOffer.SpecialOfferID | FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID

Indexes for table 'Sales.SpecialOfferProduct', 3 items

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

Triggers for table 'Sales.SpecialOfferProduct', 1 item

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

Dependencies for table 'Sales.SpecialOfferProduct', 1 item

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


Sales.Store

Table: 'Sales.Store'

6 fields. 140 bytes.

Customers (resellers) of Adventure Works products.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
CustomerID | int |  |  |  | Not null | Primary key. Foreign key to Customer.CustomerID. |
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.SalesPersonID. |
Demographics | xml |  |  |  | Null | Demographic informationg about the store such as the number of employees, annual sales and store type. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_SalesPersonID

Indexes for table 'Sales.Store', 3 items

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

Triggers for table 'Sales.Store', 2 items

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

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


Sales.StoreContact

Table: 'Sales.StoreContact'

5 fields. 44 bytes.

Cross-reference table mapping stores and their employees.

Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check
CustomerID | int |  |  |  | Not null | Store identification number. Foreign key to Customer.CustomerID. |
ContactID | int |  |  |  | Not null | Contact (store employee) identification number. Foreign key to Contact.ContactID. |
ContactTypeID | int |  |  |  | Not null | Contact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID. |
rowguid | uniqueidentifier |  |  | newid() | Not null | ROWGUIDCOL 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_ContactID
StoreContact.ContactTypeID | ContactType.ContactTypeID | FK_StoreContact_ContactType_ContactTypeID
StoreContact.CustomerID | Store.CustomerID | FK_StoreContact_Store_CustomerID

Indexes for table 'Sales.StoreContact', 4 items

Index Name | Description | Clustered | Unique | Fields
PK_StoreContact_CustomerID_ContactID | Clustered index created by a primary key constraint. | Yes | Yes | CustomerID, ContactID
AK_StoreContact_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid
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 setting the ModifiedDate column in the StoreContact table to the current date. | after Update | Yes

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


HumanResources.vEmployee

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


HumanResources.vEmployeeDepartment

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


HumanResources.vEmployeeDepartmentHistory

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


HumanResources.vJobCandidate

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


HumanResources.vJobCandidateEducation

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


HumanResources.vJobCandidateEmployment

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


Person.vAdditionalContactInfo

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


Person.vStateProvinceCountryRegion

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


Production.vProductAndDescription

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


Production.vProductModelCatalogDescription

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


Production.vProductModelInstructions

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


Purchasing.vVendor

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


Sales.vIndividualCustomer

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


Sales.vIndividualDemographics

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


Sales.vSalesPerson

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


Sales.vSalesPersonSalesByFiscalYears

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


Sales.vStoreWithDemographics

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


dbo.ufnGetAccountingEndDate

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 uSalesOrderHeader trigger to set the starting account date. | @RETURN_VALUE datetime(23) [RETURN VALUE]
There are no Dependencies for this object.


dbo.ufnGetAccountingStartDate

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 uSalesOrderHeader trigger to set the ending account date. | @RETURN_VALUE datetime(23) [RETURN VALUE]
There are no Dependencies for this object.


dbo.ufnGetContactInformation

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 first name, last name, job title and contact type for a given contact. | @TABLE_RETURN_VALUE table [RESULT SET COLUMN], @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


dbo.ufnGetDocumentStatusText

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 representation of the Status column in the Document table. | @RETURN_VALUE nvarchar(15) [RETURN VALUE], @Status tinyint(3) [INPUT]
There are no Dependencies for this object.


dbo.ufnGetProductDealerPrice

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 price for a given product on a particular order date. | @RETURN_VALUE money(19) [RETURN VALUE], @ProductID 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


dbo.ufnGetProductListPrice

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 price for a given product on a particular order date. | @RETURN_VALUE money(19) [RETURN VALUE], @ProductID 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


dbo.ufnGetProductStandardCost

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 standard cost for a given product on a particular order date. | @RETURN_VALUE money(19) [RETURN VALUE], @ProductID 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


dbo.ufnGetPurchaseOrderStatusText

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 representation of the Status column in the PurchaseOrderHeader table. | @RETURN_VALUE nvarchar(15) [RETURN VALUE], @Status tinyint(3) [INPUT]
There are no Dependencies for this object.


dbo.ufnGetSalesOrderStatusText

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 representation of the Status column in the SalesOrderHeader table. | @RETURN_VALUE nvarchar(15) [RETURN VALUE], @Status tinyint(3) [INPUT]
There are no Dependencies for this object.


dbo.ufnGetStock

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 of inventory in LocationID 6 (Miscellaneous Storage)for a specified ProductID. | @RETURN_VALUE int(10) [RETURN VALUE], @ProductID int(10) [INPUT]

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


dbo.ufnLeadingZeros

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 Sales.Customer table to help set the account number. | @RETURN_VALUE varchar(8) [RETURN VALUE], @Value int(10) [INPUT]

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

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


dbo.uspGetBillOfMaterials

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 query to return a multi-level bill of material for the specified ProductID. | @RETURN_VALUE int(10) [RETURN VALUE], @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


dbo.uspGetEmployeeManagers

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 query to return the direct and indirect managers of the specified employee. | @RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT]

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


dbo.uspGetManagerEmployees

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 query to return the direct and indirect employees of the specified manager. | @RETURN_VALUE int(10) [RETURN VALUE], @ManagerID int(10) [INPUT]

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


dbo.uspGetWhereUsedProductID

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 query to return all components or assemblies that directly or indirectly use the specified ProductID. | @RETURN_VALUE int(10) [RETURN VALUE], @StartProductID int(10) [INPUT], @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


dbo.uspLogError

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 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. | @RETURN_VALUE int(10) [RETURN VALUE], @ErrorLogID int(10) [INPUT and OUTPUT]

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


dbo.uspPrintError

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 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. | @RETURN_VALUE int(10) [RETURN VALUE]

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


HumanResources.uspUpdateEmployeeHireInfo

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 inserts a new row in the EmployeePayHistory table with the values specified in the input parameters. | @RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT], @Title nvarchar(50) [INPUT], @HireDate 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


HumanResources.uspUpdateEmployeeLogin

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 values specified in the input parameters for the given EmployeeID. | @RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT], @ManagerID 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


HumanResources.uspUpdateEmployeePersonalInfo

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 values specified in the input parameters for the given EmployeeID. | @RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT], @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

Rules

There are no rules in this database.


Database Level Triggers

Database Level Triggers, 1 item

Name
ddlDatabaseTriggerLog


Data Types

Data Types, 39 items

Type name | Code | Size | Sizable | Nullable | Searchable | Autoincremenal | Scale | User Type
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 | 1073741823 | Yes | Yes | Like only | No |  | No
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 | 2147483647 | Yes | Yes | No | No |  | No
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 | 2147483647 | Yes | Yes | Like only | No |  | No
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


Table of Contents

  • Summary
  • Tables
    1. dbo.AWBuildVersion
    2. dbo.DatabaseLog
    3. dbo.ErrorLog
    4. HumanResources.Department
    5. HumanResources.Employee
    6. HumanResources.EmployeeAddress
    7. HumanResources.EmployeeDepartmentHistory
    8. HumanResources.EmployeePayHistory
    9. HumanResources.JobCandidate
    10. HumanResources.Shift
    11. Person.Address
    12. Person.AddressType
    13. Person.Contact
    14. Person.ContactType
    15. Person.CountryRegion
    16. Person.StateProvince
    17. Production.BillOfMaterials
    18. Production.Culture
    19. Production.Document
    20. Production.Illustration
    21. Production.Location
    22. Production.Product
    23. Production.ProductCategory
    24. Production.ProductCostHistory
    25. Production.ProductDescription
    26. Production.ProductDocument
    27. Production.ProductInventory
    28. Production.ProductListPriceHistory
    29. Production.ProductModel
    30. Production.ProductModelIllustration
    31. Production.ProductModelProductDescriptionCulture
    32. Production.ProductPhoto
    33. Production.ProductProductPhoto
    34. Production.ProductReview
    35. Production.ProductSubcategory
    36. Production.ScrapReason
    37. Production.TransactionHistory
    38. Production.TransactionHistoryArchive
    39. Production.UnitMeasure
    40. Production.WorkOrder
    41. Production.WorkOrderRouting
    42. Purchasing.ProductVendor
    43. Purchasing.PurchaseOrderDetail
    44. Purchasing.PurchaseOrderHeader
    45. Purchasing.ShipMethod
    46. Purchasing.Vendor
    47. Purchasing.VendorAddress
    48. Purchasing.VendorContact
    49. Sales.ContactCreditCard
    50. Sales.CountryRegionCurrency
    51. Sales.CreditCard
    52. Sales.Currency
    53. Sales.CurrencyRate
    54. Sales.Customer
    55. Sales.CustomerAddress
    56. Sales.Individual
    57. Sales.SalesOrderDetail
    58. Sales.SalesOrderHeader
    59. Sales.SalesOrderHeaderSalesReason
    60. Sales.SalesPerson
    61. Sales.SalesPersonQuotaHistory
    62. Sales.SalesReason
    63. Sales.SalesTaxRate
    64. Sales.SalesTerritory
    65. Sales.SalesTerritoryHistory
    66. Sales.ShoppingCartItem
    67. Sales.SpecialOffer
    68. Sales.SpecialOfferProduct
    69. Sales.Store
    70. Sales.StoreContact
  • Views
    1. HumanResources.vEmployee
    2. HumanResources.vEmployeeDepartment
    3. HumanResources.vEmployeeDepartmentHistory
    4. HumanResources.vJobCandidate
    5. HumanResources.vJobCandidateEducation
    6. HumanResources.vJobCandidateEmployment
    7. Person.vAdditionalContactInfo
    8. Person.vStateProvinceCountryRegion
    9. Production.vProductAndDescription
    10. Production.vProductModelCatalogDescription
    11. Production.vProductModelInstructions
    12. Purchasing.vVendor
    13. Sales.vIndividualCustomer
    14. Sales.vIndividualDemographics
    15. Sales.vSalesPerson
    16. Sales.vSalesPersonSalesByFiscalYears
    17. Sales.vStoreWithDemographics
  • Procedures and Functions
    1. dbo.ufnGetAccountingEndDate
    2. dbo.ufnGetAccountingStartDate
    3. dbo.ufnGetContactInformation
    4. dbo.ufnGetDocumentStatusText
    5. dbo.ufnGetProductDealerPrice
    6. dbo.ufnGetProductListPrice
    7. dbo.ufnGetProductStandardCost
    8. dbo.ufnGetPurchaseOrderStatusText
    9. dbo.ufnGetSalesOrderStatusText
    10. dbo.ufnGetStock
    11. dbo.ufnLeadingZeros
    12. dbo.uspGetBillOfMaterials
    13. dbo.uspGetEmployeeManagers
    14. dbo.uspGetManagerEmployees
    15. dbo.uspGetWhereUsedProductID
    16. dbo.uspLogError
    17. dbo.uspPrintError
    18. HumanResources.uspUpdateEmployeeHireInfo
    19. HumanResources.uspUpdateEmployeeLogin
    20. HumanResources.uspUpdateEmployeePersonalInfo
  • Rules
  • Database Level Triggers
  • Data Types