SlideShare a Scribd company logo
Instructions
Part 1: SQL Review and Threat Analysis
You must have SQL Server Express, SQL Server Management
Studio, and the Adventure Works® OLTP database installed to
perform this Assessment. You will also want to download, or
bookmark, the design document for that database.
If you do not have the above software installed, please perform
the required installations. The following document will assist
you with installation of the software: SQL Server Setup.
Complete the following:
For each of the following actions, use the Adventure Works
database to formulate an SQL solution.
Please copy the numbered action into your Microsoft Word®
document.
For items 1–5 below, provide screenshot of the execution of the
SQL showing the code and the result set. Make sure to also
respond to items 6 and 7.
Start a next action on a new page.
1. Show a person’s name, credit card number, and type.
2. Show a store name and year-to-date sales. Group by name
and year-to-date values.
3. Create three tables with the following parameters:
IN301: primary key field, vulnerability_id, solution_id and
organization. All fields require a value except the organization.
Identify foreign key columns properly.
Vulnerability: primary key field, vulnerability_name. All fields
require values.
Solution
, primary key field, solution_name. All fields require values.
4. Insert 5 rows into each table. Ensure two IN301 organization
fields have null values.
5. Show an organization, vulnerability and solution. Be sure to
only show the organization with values.
6. Using the Adventure Works design document, identify
important data assets. Explain your table selections.
7. Keeping those important data assets in mind, develop a
DREAD threat rating for the below. Include a brief description
of which had the higher risk rating and explain why.
a. Excessive privilege abuse.
b. Malware.
In order to obtain mastery level for this Competency
Assessment, complete the following:
Apply the Microsoft Threat Modeling Tool™ to model a case of
a mobile client sending a request to a database. Show the
database returning a response to the mobile client. Create a full
report of the results.
Part 2: Big Data Ecosystem
You must have VirtualBox® and Hortonworks Hadoop
HDP installed and running.
If you do not have the above software installed, please perform
the required installations. The following document will assist
you with installation of the software: Hadoop Setup.
Complete the following:
For each of the actions, as applicable, use the Hortonworks
Hadoop HDP virtual machine environment.
Please copy the numbered action into your Microsoft Word
document.
Respond to items 1–3. For items 4–5 below, provide a
screenshot of the execution showing the command and the result
set.
Start a next action on a new page.
1. Other than authentication, explore a big data security concern
in depth. Explain what it is, why it is a security concern and
possible solutions.
2. Other than Kerberos, research what Hadoop uses to ensure
secure authentication, permissions, and/or data accessibility.
3. Explain how Kerberos works in the Hadoop ecosystem.
4. Secure shell to the Hadoop virtual machine.
5. Transfer a file to and from your host and Hadoop virtual
machine.
Dataedo
AdventureWorks
Data Dictionary
2017-05-30
Generated with
http://dataedo.com
Table of Contents
1. AdventureWorks
...............................................................................................
...............................................................................................
.............................. 7
2. Business Entities
...............................................................................................
...............................................................................................
............................... 8
3. People
...............................................................................................
...............................................................................................
................................................ 9
3.1. Tables
...............................................................................................
...............................................................................................
............................................ 9
3.1.1. Table: Person.Address
...............................................................................................
...............................................................................................
....... 9
3.1.2. Table: Person.AddressType
...............................................................................................
...........................................................................................
10
3.1.3. Table: Person.BusinessEntity
...............................................................................................
.......................................................................................... 11
3.1.4. Table: Person.BusinessEntityAddress
...............................................................................................
.......................................................................... 12
3.1.5. Table: Person.BusinessEntityContact
...............................................................................................
.......................................................................... 13
3.1.6. Table: Person.ContactType
...............................................................................................
...........................................................................................
14
3.1.7. Table: Person.CountryRegion
...............................................................................................
....................................................................................... 14
3.1.8. Table: Person.EmailAddress
...............................................................................................
.................................................................................... ...... 15
3.1.9. Table: Person.Password
...............................................................................................
...............................................................................................
.. 16
3.1.10. Table: Person.Person
...............................................................................................
...............................................................................................
..... 16
3.1.11. Table: Person.PersonPhone
...............................................................................................
......................................................................................... 18
3.1.12. Table: Person.PhoneNumberType
...............................................................................................
.............................................................................19
3.1.13. Table: Person.StateProvince
...............................................................................................
........................................................................................ 19
3.2. Views
...............................................................................................
...............................................................................................
........................................... 21
3.2.1. View: Person.vAdditionalContactInfo
...............................................................................................
......................................................................... 21
3.2.2. View: Person.vStateProvinceCountryRegion
...............................................................................................
............................................................ 21
4. Human Resources
...............................................................................................
...............................................................................................
......................... 23
4.1. Tables
...............................................................................................
...............................................................................................
.......................................... 23
4.1.1. Table: HumanResources.Department
...............................................................................................
........................................................................ 23
4.1.2. Table: HumanResources.Employee
...............................................................................................
............................................................................ 24
4.1.3. Table: HumanResources.EmployeeDepartmentHistory
...............................................................................................
........................................ 26
4.1.4. Table: HumanResources.EmployeePayHistory
...............................................................................................
........................................................ 27
4.1.5. Table: HumanResources.JobCandidate
...............................................................................................
..................................................................... 27
4.1.6. Table: HumanResources.Shift
...............................................................................................
...................................................................................... 28
4.2. Views
...............................................................................................
...............................................................................................
.......................................... 29
4.2.1. View: HumanResources.vEmployee
...............................................................................................
........................................................................... 29
4.2.2. View: HumanResources.vEmployeeDepartment
...............................................................................................
.................................................... 29
4.2.3. View: HumanResources.vEmployeeDepartmentHistory
...............................................................................................
....................................... 30
4.2.4. View: HumanResources.vJobCandidate
...............................................................................................
................................................................... 30
4.2.5. View: HumanResources.vJobCandidateEducation
...............................................................................................
................................................. 31
4.2.6. View: HumanResources.vJobCandidateEmployment
...............................................................................................
............................................ 31
4.3. Procedures
...............................................................................................
...............................................................................................
................................ 32
4.3.1. Procedure: dbo.uspGetEmployeeManagers
...............................................................................................
............................................................ 32
4.3.2. Procedure: dbo.uspGetManagerEmployees
...............................................................................................
........................................................... 32
4.3.3. Procedure: dbo.uspSearchCandidateResumes
...............................................................................................
...................................................... 32
4.3.4. Procedure:
HumanResources.uspUpdateEmployeeHireInfo
...............................................................................................
.............................. 32
4.3.5. Procedure: HumanResources.uspUpdateEmployeeLogin
...............................................................................................
................................... 33
4.3.6. Procedure:
HumanResources.uspUpdateEmployeePersonalInfo
...............................................................................................
...................... 33
4.4. Functions
...............................................................................................
...............................................................................................
................................... 33
4.4.1. Function: dbo.ufnGetContactInformation
...............................................................................................
................................................................ 33
5. Products
...............................................................................................
...............................................................................................
.......................................... 34
5.1. Tables
...............................................................................................
...............................................................................................
.......................................... 34
5.1.1. Table: Production.Culture
...............................................................................................
.............................................................................................
34
5.1.2. Table: Production.Document
...............................................................................................
....................................................................................... 35
5.1.3. Table: Production.Illustration
...............................................................................................
....................................................................................... 36
5.1.4. Table: Production.Product
...............................................................................................
............................................................................................
36
5.1.5. Table: Production.ProductCategory
...............................................................................................
...........................................................................39
5.1.6. Table: Production.ProductDescription
...............................................................................................
.......................................................................40
5.1.7. Table: Production.ProductDocument
...............................................................................................
......................................................................... 41
5.1.8. Table: Production.ProductModel
...............................................................................................
................................................................................ 42
5.1.9. Table: Production.ProductModelIllustration
...............................................................................................
............................................................ 42
5.1.10. Table:
Production.ProductModelProductDescriptionCulture
...............................................................................................
.............................43
5.1.11. Table: Production.ProductPhoto
...............................................................................................
................................................................................44
5.1.12. Table: Production.ProductProductPhoto
...............................................................................................
................................................................ 45
5.1.13. Table: Production.ProductReview
...............................................................................................
............................................................................. 45
5.1.14. Table: Production.ProductSubcategory
...............................................................................................
.................................................................. 46
5.1.15. Table: Production.UnitMeasure
...............................................................................................
................................................................................. 47
5.2. Views
...............................................................................................
...............................................................................................
.......................................... 48
5.2.1. View: Production.vProductAndDescription
...............................................................................................
.............................................................. 48
5.2.2. View: Production.vProductModelCatalogDescription
...............................................................................................
...........................................48
5.2.3. View: Production.vProductModelInstructions
...............................................................................................
......................................................... 49
5.3. Procedures
...............................................................................................
...............................................................................................
................................ 49
5.3.1. Procedure: dbo.uspGetBillOfMaterials
...............................................................................................
...................................................................... 49
5.3.2. Procedure: dbo.uspGetWhereUsedProductID
...............................................................................................
........................................................ 50
5.4. Functions
...............................................................................................
...............................................................................................
................................... 50
5.4.1. Function: dbo.ufnGetDocumentStatusText
...............................................................................................
.............................................................. 50
5.4.2. Function: dbo.ufnGetProductDealerPrice
...............................................................................................
................................................................ 50
5.4.3. Function: dbo.ufnGetProductListPrice
...............................................................................................
...................................................................... 50
5.4.4. Function: dbo.ufnGetProductStandardCost
...............................................................................................
............................................................. 51
5.4.5. Function: dbo.ufnGetStock
...............................................................................................
...........................................................................................
51
6. Manufacturing
...............................................................................................
...............................................................................................
............................... 52
6.1. Tables
...............................................................................................
...............................................................................................
.......................................... 52
6.1.1. Table: Production.BillOfMaterials
...............................................................................................
................................................................................ 52
6.1.2. Table: Production.ProductCostHistory
...............................................................................................
...................................................................... 53
6.1.3. Table: Production.ProductListPriceHistory
...............................................................................................
............................................................... 54
6.1.4. Table: Production.ScrapReason
...............................................................................................
.................................................................................. 55
6.1.5. Table: Production.TransactionHistory
...............................................................................................
........................................................................ 55
6.1.6. Table: Production.TransactionHistoryArchive
...............................................................................................
.......................................................... 56
6.1.7. Table: Production.WorkOrder
...............................................................................................
..................................................................................... 57
6.1.8. Table: Production.WorkOrderRouting
...............................................................................................
....................................................................... 58
7. Purchasing
...............................................................................................
...............................................................................................
...................................... 60
7.1. Tables
...............................................................................................
...............................................................................................
.......................................... 60
7.1.1. Table: Purchasing.ProductVendor
...............................................................................................
............................................................................... 60
7.1.2. Table: Purchasing.PurchaseOrderDetail
...............................................................................................
.................................................................... 61
7.1.3. Table: Purchasing.PurchaseOrderHeader
...............................................................................................
.................................................................62
7.1.4. Table: Purchasing.ShipMethod
...............................................................................................
....................................................................................64
7.1.5. Table: Purchasing.Vendor
...............................................................................................
.............................................................................................
65
7.2. Views
...............................................................................................
...............................................................................................
.......................................... 66
7.2.1. View: Purchasing.vVendorWithAddresses
...............................................................................................
................................................................ 66
7.2.2. View: Purchasing.vVendorWithContacts
...............................................................................................
.................................................................. 66
7.3. Functions
...............................................................................................
...............................................................................................
................................... 67
7.3.1. Function: dbo.ufnGetPurchaseOrderStatusText
...............................................................................................
...................................................... 67
8. Inventory
...............................................................................................
...............................................................................................
......................................... 68
8.1. Tables
...............................................................................................
...............................................................................................
.......................................... 68
8.1.1. Table: Production.Location
...............................................................................................
...........................................................................................
68
8.1.2. Table: Production.ProductInventory
...............................................................................................
.......................................................................... 69
9. Sales
...............................................................................................
...............................................................................................
.................................................. 71
9.1. Tables
...............................................................................................
...............................................................................................
.......................................... 71
9.1.1. Table: Sales.CountryRegionCurrency
...............................................................................................
.......................................................................... 71
9.1.2. Table: Sales.CreditCard
...............................................................................................
...............................................................................................
.. 72
9.1.3. Table: Sales.Currency
...............................................................................................
...............................................................................................
...... 73
9.1.4. Table: Sales.CurrencyRate
...............................................................................................
............................................................................................
73
9.1.5. Table: Sales.Customer
...............................................................................................
...............................................................................................
.... 74
9.1.6. Table: Sales.PersonCreditCard
...............................................................................................
.................................................................................... 76
9.1.7. Table: Sales.SalesOrderDetail
...............................................................................................
...................................................................................... 76
9.1.8. Table: Sales.SalesOrderHeader
...............................................................................................
................................................................................... 77
9.1.9. Table: Sales.SalesOrderHeaderSalesReason
...............................................................................................
............................................................ 80
9.1.10. Table: Sales.SalesPerson
...............................................................................................
...............................................................................................
81
9.1.11. Table: Sales.SalesPersonQuotaHistory
...............................................................................................
......................................................................82
9.1.12. Table: Sales.SalesReason
...............................................................................................
.............................................................................................
83
9.1.13. Table: Sales.SalesTaxRate
.......................................................................................... .....
............................................................................................
83
9.1.14. Table: Sales.SalesTerritory
...............................................................................................
...........................................................................................
84
9.1.15. Table: Sales.SalesTerritoryHistory
...............................................................................................
.............................................................................. 86
9.1.16. Table: Sales.ShoppingCartItem
...............................................................................................
.................................................................................. 86
9.1.17. Table: Sales.SpecialOffer
...............................................................................................
.............................................................................................
87
9.1.18. Table: Sales.SpecialOfferProduct
...............................................................................................
............................................................................... 88
9.1.19. Table: Sales.Store
...............................................................................................
...............................................................................................
........... 89
9.2. Views
...............................................................................................
...............................................................................................
.......................................... 90
9.2.1. View: Sales.vIndividualCustomer
...............................................................................................
................................................................................. 90
9.2.2. View: Sales.vPersonDemographics
...............................................................................................
............................................................................. 91
9.2.3. View: Sales.vSalesPerson
...............................................................................................
...............................................................................................
91
9.2.4. View: Sales.vSalesPersonSalesByFiscalYears
...............................................................................................
............................................................ 92
9.2.5. View: Sales.vStoreWithAddresses
...............................................................................................
...............................................................................92
9.2.6. View: Sales.vStoreWithContacts
...............................................................................................
................................................................................. 93
9.2.7. View: Sales.vStoreWithDemographics
...............................................................................................
...................................................................... 93
9.3. Functions
...............................................................................................
...............................................................................................
................................... 94
9.3.1. Function: dbo.ufnGetAccountingEndDate
...............................................................................................
............................................................... 94
9.3.2. Function: dbo.ufnGetAccountingStartDate
...............................................................................................
............................................................. 94
9.3.3. Function: dbo.ufnGetSalesOrderStatusText
...............................................................................................
............................................................ 94
9.3.4. Function: dbo.ufnLeadingZeros
...............................................................................................
................................................................................. 94
10. Admin
...............................................................................................
...............................................................................................
............................................. 95
10.1. Tables
...............................................................................................
...............................................................................................
........................................ 95
10.1.1. Table: dbo.AWBuildVersion
...............................................................................................
........................................................................................ 95
10.1.2. Table: dbo.DatabaseLog
...............................................................................................
.............................................................................................
95
10.1.3. Table: dbo.ErrorLog
...............................................................................................
...............................................................................................
.......95
10.2. Procedures
...............................................................................................
...............................................................................................
.............................. 96
10.2.1. Procedure: dbo.uspLogError
...............................................................................................
...................................................................................... 96
10.2.2. Procedure: dbo.uspPrintError
...............................................................................................
....................................................................................96
Legend
Primary key
Primary key disabled
User-defined primary key
Unique key
Unique key disabled
User-defined unique key
Active trigger
Disabled trigger
Primary key relation
User-defined primary key relation
Foreign key relation
User-defined foreign key relation
Input
Output
Input/Output
Nullable
6 Generated with
http://dataedo.com
This is a sample Dataedo documentation - AdventureWorks -
Microsoft SQL Server sample database.
The AdventureWorks database supports standard online
transaction processing scenarios for a fictitious bicycle
manufacturer (Adventure Works Cycles). Scenarios include
Manufacturing, Sales, Purchasing, Product Management,
Contact Management, and Human Resources.
You can download AdventureWorks database here:
· AdventureWorks for SQL Server 2014 (CodePlex)
· AdventureWorks for SQL Server 2012 (CodePlex)
· AdventureWorks for SQL Server 2008R2 (CodePlex)
1. AdventureWorks
7 Generated with
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/125550
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/55330
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
https://msftdbprodsamples.codeplex.com/releases/view/59211
http://dataedo.com
2. Business Entities
Vendors, customers, and employees have common tables for
addresses and contacts. Those tables are linked to one
table - BusinessEntity that holds ID for all vendors, customers,
and employees tables.
8 Generated with
http://dataedo.com
3. People
Names and addresses of individual customers , vendors, and
employees.
3.1. Tables
3.1.1. Table: Person.Address
Street address information for customers, employees, and
vendors.
Columns
Description / AttributesNData typeName
Primary key for Address records.
Identity / Auto increment column
intAddressID
First street address line.nvarchar(60)AddressLine1
Second street address line.nvarchar(60)AddressLine2
Name of the city.nvarchar(30)City
Unique identification number for the state or province. Foreign
key to
StateProvince table.
intStateProvinceID
Postal code for the street address.nvarchar(15)PostalCode
Latitude and longitude of this address.geographySpatialLocation
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
9 Generated with
http://dataedo.com
Links to
Title / Name / DescriptionJoinTable
FK_Address_StateProvince_StateProvinceID
Foreign key constraint referencing
StateProvince.StateProvinceID.
Person.Address.StateProvinceID =
Person.StateProvince.StateProvinceID
Person.StateProvince
Linked from
Title / Name / DescriptionJoinTable
FK_BusinessEntityAddress_Address_AddressID
Foreign key constraint referencing Address.AddressID.
Person.Address.AddressID =
Person.BusinessEntityAddress.AddressI
D
Person.BusinessEntityAddress
FK_SalesOrderHeader_Address_BillToAddressID
Foreign key constraint referencing Address.AddressID.
Person.Address.AddressID =
Sales.SalesOrderHeader.BillToAddressI
D
Sales.SalesOrderHeader
FK_SalesOrderHeader_Address_ShipToAddressID
Foreign key constraint referencing Address.AddressID.
Person.Address.AddressID =
Sales.SalesOrderHeader.ShipToAddres
sID
Sales.SalesOrderHeader
Unique keys
Name / DescriptionColumns
PK_Address_AddressID
Primary key (clustered) constraint
AddressID
AK_Address_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
IX_Address_AddressLine1_AddressLine2_City_Sta teProvinceI
D_PostalCode
Nonclustered index.
AddressLine1, AddressLine2, City,
StateProvinceID, PostalCode
Uses
Name
Person.Address
Person.StateProvince
Used by
Name
Person.Address
Person.BusinessEntityAddress
Sales.SalesOrderHeader
Sales.SalesOrderHeader
3.1.2. Table: Person.AddressType
Types of addresses stored in the Address table.
Columns
Description / AttributesNData typeName
Primary key for AddressType records.
Identity / Auto increment column
intAddressTypeID
Address type description. For example, Billing, Home, or
Shipping.nvarchar(50)Name
10 Generated with
http://dataedo.com
Description / AttributesNData typeName
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_BusinessEntityAddress_AddressType_AddressTypeID
Foreign key constraint referencing
AddressType.AddressTypeID.
Person.AddressType.AddressTypeID =
Person.BusinessEntityAddress.Address
TypeID
Person.BusinessEntityAddress
Unique keys
Name / DescriptionColumns
PK_AddressType_AddressTypeID
Primary key (clustered) constraint
AddressTypeID
AK_AddressType_Name
Unique nonclustered index.
Name
AK_AddressType_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Used by
Name
Person.AddressType
Person.BusinessEntityAddress
3.1.3. Table: Person.BusinessEntity
Source of the ID that connects vendors, customers, and
employees with address and contact information.
Columns
Description / AttributesNData typeName
Primary key for all customers, vendors, and employees.
Identity / Auto increment column
intBusinessEntityID
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID.
Person.BusinessEntity.BusinessEntityID
=
Person.BusinessEntityAddress.Business
EntityID
Person.BusinessEntityAddress
FK_BusinessEntityContact_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID.
Person.BusinessEntity.BusinessEntityID
=
Person.BusinessEntityContact.Business
EntityID
Person.BusinessEntityContact
11 Generated with
http://dataedo.com
Title / Name / DescriptionJoinTable
FK_Person_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID.
Person.BusinessEntity.BusinessEntityID
= Person.Person.BusinessEntityID
Person.Person
FK_Store_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID
Person.BusinessEntity.BusinessEntityID
= Sales.Store.BusinessEntityID
Sales.Store
FK_Vendor_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID
Person.BusinessEntity.BusinessEntityID
= Purchasing.Vendor.BusinessEntityID
Purchasing.Vendor
Unique keys
Name / DescriptionColumns
PK_BusinessEntity_BusinessEntityID
Primary key (clustered) constraint
BusinessEntityID
AK_BusinessEntity_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Used by
Name
Person.BusinessEntity
Person.BusinessEntityAddress
Person.BusinessEntityContact
Person.Person
Purchasing.Vendor
Sales.Store
3.1.4. Table: Person.BusinessEntityAddress
Cross-reference table mapping customers, vendors, and
employees to their addresses.
Columns
Description / AttributesNData typeName
Primary key. Foreign key to
BusinessEntity.BusinessEntityID.intBusinessEntityID
Primary key. Foreign key to Address.AddressID.intAddressID
Primary key. Foreign key to
AddressType.AddressTypeID.intAddressTypeID
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_BusinessEntityAddress_Address_AddressID
Foreign key constraint referencing Address.AddressID.
Person.BusinessEntityAddress.AddressI
D = Person.Address.AddressID
Person.Address
FK_BusinessEntityAddress_AddressType_AddressTypeID
Foreign key constraint referencing
AddressType.AddressTypeID.
Person.BusinessEntityAddress.Address
TypeID =
Person.AddressType.AddressTypeID
Person.AddressType
FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID.
Person.BusinessEntityAddress.Business
EntityID =
Person.BusinessEntity.BusinessEntityID
Person.BusinessEntity
12 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_BusinessEntityAddress_BusinessEntityID_AddressID_Addr
essTypeID
Primary key (clustered) constraint
BusinessEntityID, AddressID,
AddressTypeID
AK_BusinessEntityAddress_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Uses
Name
Person.BusinessEntityAddress
Person.Address
Person.AddressType
Person.BusinessEntity
3.1.5. Table: Person.BusinessEntityContact
Cross-reference table mapping stores, vendors, and employees
to people
Columns
Description / AttributesNData typeName
Primary key. Foreign key to
BusinessEntity.BusinessEntityID.intBusinessEntityID
Primary key. Foreign key to
Person.BusinessEntityID.intPersonID
Primary key. Foreign key to
ContactType.ContactTypeID.intContactTypeID
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_BusinessEntityContact_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID.
Person.BusinessEntityContact.Business
EntityID =
Person.BusinessEntity.BusinessEntityID
Person.BusinessEntity
FK_BusinessEntityContact_ContactType_ContactTypeID
Foreign key constraint referencing ContactType.ContactTypeID.
Person.BusinessEntityContact.ContactT
ypeID =
Person.ContactType.ContactTypeID
Person.ContactType
FK_BusinessEntityContact_Person_PersonID
Foreign key constraint referencing Person.BusinessEntityID.
Person.BusinessEntityContact.PersonID
= Person.Person.BusinessEntityID
Person.Person
Unique keys
Name / DescriptionColumns
PK_BusinessEntityContact_BusinessEntityID_PersonID_Contac
tTypeID
Primary key (clustered) constraint
BusinessEntityID, PersonID,
ContactTypeID
AK_BusinessEntityContact_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
13 Generated with
http://dataedo.com
Uses
Name
Person.BusinessEntityContact
Person.BusinessEntity
Person.ContactType
Person.Person
3.1.6. Table: Person.ContactType
Lookup table containing the types of business entity contacts.
Columns
Description / AttributesNData typeName
Primary key for ContactType records.
Identity / Auto increment column
intContactTypeID
Contact type description.nvarchar(50)Name
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_BusinessEntityContact_ContactType_ContactTypeID
Foreign key constraint referencing ContactType.ContactTypeID.
Person.ContactType.ContactTypeID =
Person.BusinessEntityContact.ContactT
ypeID
Person.BusinessEntityContact
Unique keys
Name / DescriptionColumns
PK_ContactType_ContactTypeID
Primary key (clustered) constraint
ContactTypeID
AK_ContactType_Name
Unique nonclustered index.
Name
Used by
Name
Person.ContactType
Person.BusinessEntityContact
3.1.7. Table: Person.CountryRegion
Lookup table containing the ISO standard codes for countries
and regions.
Columns
Description / AttributesNData typeName
ISO standard code for countries and
regions.nvarchar(3)CountryRegionCode
Country or region name.nvarchar(50)Name
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
14 Generated with
http://dataedo.com
Linked from
Title / Name / DescriptionJoinTable
FK_CountryRegionCurrency_CountryRegion_CountryRegionCo
de
Foreign key constraint referencing
CountryRegion.CountryRegionCode.
Person.CountryRegion.CountryRegion
Code =
Sales.CountryRegionCurrency.Country
RegionCode
Sales.CountryRegionCurrency
FK_SalesTerritory_CountryRegion_CountryRegionCode
Foreign key constraint referencing
CountryRegion.CountryRegionCode.
Person.CountryRegion.CountryRegion
Code =
Sales.SalesTerritory.CountryRegionCo
de
Sales.SalesTerritory
FK_StateProvince_CountryRegion_CountryRegionCode
Foreign key constraint referencing
CountryRegion.CountryRegionCode.
Person.CountryRegion.CountryRegion
Code =
Person.StateProvince.CountryRegionC
ode
Person.StateProvince
Unique keys
Name / DescriptionColumns
PK_CountryRegion_CountryRegionCode
Primary key (clustered) constraint
CountryRegionCode
AK_CountryRegion_Name
Unique nonclustered index.
Name
Used by
Name
Person.CountryRegion
Person.StateProvince
Sales.CountryRegionCurrency
Sales.SalesTerritory
3.1.8. Table: Person.EmailAddress
Where to send a person email.
Columns
Description / AttributesNData typeName
Primary key. Person associated with this email address. Foreign
key to
Person.BusinessEntityID
intBusinessEntityID
Primary key. ID of this email address.
Identity / Auto increment column
intEmailAddressID
E-mail address for the person.nvarchar(50)EmailAddress
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_EmailAddress_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.EmailAddress.BusinessEntityID
= Person.Person.BusinessEntityID
Person.Person
15 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_EmailAddress_BusinessEntityID_EmailAddressID
Primary key (clustered) constraint
BusinessEntityID, EmailAddressID
Uses
Name
Person.EmailAddress
Person.Person
3.1.9. Table: Person.Password
One way hashed authentication information
Columns
Description / AttributesNData typeName
intBusinessEntityID
Password for the e-mail account.varchar(128)PasswordHash
Random value concatenated with the password string before the
password is hashed.
varchar(10)PasswordSalt
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_Password_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Password.BusinessEntityID =
Person.Person.BusinessEntityID
Person.Person
Unique keys
Name / DescriptionColumns
PK_Password_BusinessEntityID
Primary key (clustered) constraint
BusinessEntityID
Uses
Name
Person.Password
Person.Person
3.1.10. Table: Person.Person
Human beings involved with AdventureWorks: employees,
customer contacts, and vendor contacts.
Columns
Description / AttributesNData typeName
Primary key for Person records.intBusinessEntityID
16 Generated with
http://dataedo.com
Description / AttributesNData typeName
Primary type of person: SC = Store Contact, IN = Individual
(retail)
customer, SP = Sales person, EM = Employee (non-sales), VC =
Vendor
contact, GC = General contact
nchar(2)PersonType
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.
Default: 0
bitNameStyle
A courtesy title. For example, Mr. or Ms.nvarchar(8)Title
First name of the person.nvarchar(50)FirstName
Middle name or middle initial of the
person.nvarchar(50)MiddleName
Last name of the person.nvarchar(50)LastName
Surname suffix. For example, Sr. or Jr.nvarchar(10)Suffix
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.
Default: 0
intEmailPromotion
Additional contact information about the person stored in xml
format.xmlAdditionalContactInfo
Personal information such as hobbies, and income collected
from online
shoppers. Used for sales analysis.
xmlDemographics
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_Person_BusinessEntity_BusinessEntityID
Foreign key constraint referencing
BusinessEntity.BusinessEntityID.
Person.Person.BusinessEntityID =
Person.BusinessEntity.BusinessEntityID
Person.BusinessEntity
Linked from
Title / Name / DescriptionJoinTable
FK_BusinessEntityContact_Person_PersonID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEnti tyID =
Person.BusinessEntityContact.PersonID
Person.BusinessEntityContact
FK_Customer_Person_PersonID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEntityID =
Sales.Customer.PersonID
Sales.Customer
FK_EmailAddress_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEntityID =
Person.EmailAddress.BusinessEntityID
Person.EmailAddress
FK_Employee_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEntityID =
HumanResources.Employee.BusinessE
ntityID
HumanResources.Employee
FK_Password_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEntityID =
Person.Password.BusinessEntityID
Person.Password
FK_PersonCreditCard_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEntityID =
Sales.PersonCreditCard.BusinessEntityI
D
Sales.PersonCreditCard
FK_PersonPhone_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.Person.BusinessEntityID =
Person.PersonPhone.BusinessEntityID
Person.PersonPhone
17 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_Person_BusinessEntityID
Primary key (clustered) constraint
BusinessEntityID
AK_Person_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Triggers
DescriptionWhenName
AFTER INSERT, UPDATE trigger inserting Individual only if
the Customer does
not exist in the Store table and setting the ModifiedDate column
in the Person
table to the current date.
After Insert, UpdateiuPerson
Uses
Name
Person.Person
Person.BusinessEntity
Used by
Name
Person.Person
HumanResources.Employee
Person.BusinessEntityContact
Person.EmailAddress
Person.Password
Person.PersonPhone
Sales.Customer
Sales.PersonCreditCard
3.1.11. Table: Person.PersonPhone
Telephone number and type of a person.
Columns
Description / AttributesNData typeName
Business entity identification number. Foreign key to
Person.BusinessEntityID.
intBusinessEntityID
Telephone number identification
number.nvarchar(25)PhoneNumber
Kind of phone number. Foreign key to
PhoneNumberType.PhoneNumberTypeID.
intPhoneNumberTypeID
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_PersonPhone_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
Person.PersonPhone.BusinessEntityID
= Person.Person.BusinessEntityID
Person.Person
18 Generated with
http://dataedo.com
Title / Name / DescriptionJoinTable
FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID
Foreign key constraint referencing
PhoneNumberType.PhoneNumberTypeID.
Person.PersonPhone.PhoneNumberTy
peID =
Person.PhoneNumberType.PhoneNu
mberTypeID
Person.PhoneNumberType
Unique keys
Name / DescriptionColumns
PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumb
erTypeID
Primary key (clustered) constraint
BusinessEntityID, PhoneNumber,
PhoneNumberTypeID
Uses
Name
Person.PersonPhone
Person.Person
Person.PhoneNumberType
3.1.12. Table: Person.PhoneNumberType
Type of phone number of a person.
Columns
Description / AttributesNData typeName
Primary key for telephone number type records.
Identity / Auto increment column
intPhoneNumberTypeID
Name of the telephone number typenvarchar(50)Name
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID
Foreign key constraint referencing
PhoneNumberType.PhoneNumberTypeID.
Person.PhoneNumberType.PhoneNu
mberTypeID =
Person.PersonPhone.PhoneNumberTy
peID
Person.PersonPhone
Unique keys
Name / DescriptionColumns
PK_PhoneNumberType_PhoneNumberTypeID
Primary key (clustered) constraint
PhoneNumberTypeID
Used by
Name
Person.PhoneNumberType
Person.PersonPhone
3.1.13. Table: Person.StateProvince
State and province lookup table.
19 Generated with
http://dataedo.com
Columns
Description / AttributesNData typeName
Primary key for StateProvince records.
Identity / Auto increment column
intStateProvinceID
ISO standard state or province code.nchar(3)StateProvinceCode
ISO standard country or region code. Foreign key to
CountryRegion.CountryRegionCode.
nvarchar(3)CountryRegionCode
0 = StateProvinceCode exists. 1 = StateProvinceCode
unavailable, using
CountryRegionCode.
Default: 1
bitIsOnlyStateProvinceFlag
State or province description.nvarchar(50)Name
ID of the territory in which the state or province is located.
Foreign key to
SalesTerritory.SalesTerritoryID.
intTerritoryID
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_StateProvince_CountryRegion_CountryRegionCode
Foreign key constraint referencing
CountryRegion.CountryRegionCode.
Person.StateProvince.CountryRegionC
ode =
Person.CountryRegion.CountryRegion
Code
Person.CountryRegion
FK_StateProvince_SalesTerritory_TerritoryID
Foreign key constraint referencing SalesTerritory.TerritoryID.
Person.StateProvince.TerritoryID =
Sales.SalesTerritory.TerritoryID
Sales.SalesTerritory
Linked from
Title / Name / DescriptionJoinTable
FK_Address_StateProvince_StateProvinceID
Foreign key constraint referencing
StateProvince.StateProvinceID.
Person.StateProvince.StateProvinceID
= Person.Address.StateProvinceID
Person.Address
FK_SalesTaxRate_StateProvince_StateProvinceID
Foreign key constraint referencing
StateProvince.StateProvinceID.
Person.StateProvince.StateProvinceID
= Sales.SalesTaxRate.StateProvinceID
Sales.SalesTaxRate
Unique keys
Name / DescriptionColumns
PK_StateProvince_StateProvinceID
Primary key (clustered) constraint
StateProvinceID
AK_StateProvince_Name
Unique nonclustered index.
Name
AK_StateProvince_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
AK_StateProvince_StateProvinceCode_CountryRegionCode
Unique nonclustered index.
StateProvinceCode,
CountryRegionCode
20 Generated with
http://dataedo.com
Uses
Name
Person.StateProvince
Person.CountryRegion
Sales.SalesTerritory
Used by
Name
Person.StateProvince
Person.Address
Sales.SalesTaxRate
3.2. Views
3.2.1. View: Person.vAdditionalContactInfo
Displays the contact name and content from each element in the
xml column AdditionalContactInfo for that person.
Columns
Description / AttributesNData typeName
intBusinessEntityID
nvarchar(50)FirstName
nvarchar(50)MiddleName
nvarchar(50)LastName
nvarchar(50)TelephoneNumber
nvarchar(MAX)TelephoneSpecialInstructions
nvarchar(50)Street
nvarchar(50)City
nvarchar(50)StateProvince
nvarchar(50)PostalCode
nvarchar(50)CountryRegion
nvarchar(MAX)HomeAddressSpecialInstructions
nvarchar(128)EMailAddress
nvarchar(MAX)EMailSpecialInstructions
nvarchar(50)EMailTelephoneNumber
uniqueidentifierrowguid
datetimeModifiedDate
3.2.2. View: Person.vStateProvinceCountryRegion
Joins StateProvince table with CountryRegion table.
21 Generated with
http://dataedo.com
Columns
Description / AttributesNData typeName
intStateProvinceID
nchar(3)StateProvinceCode
bitIsOnlyStateProvinceFlag
nvarchar(50)StateProvinceName
intTerritoryID
nvarchar(3)CountryRegionCode
nvarchar(50)CountryRegionName
22 Generated with
http://dataedo.com
4. Human Resources
Employees of Adventure Works Cycles
4.1. Tables
4.1.1. Table: HumanResources.Department
Lookup table containing the departments within the Adventure
Works Cycles company.
Columns
Description / AttributesNData typeName
Primary key for Department records.
Identity / Auto increment column
smallintDepartmentID
Name of the department.nvarchar(50)Name
Name of the group to which the department
belongs.nvarchar(50)GroupName
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_EmployeeDepartmentHistory_Department_DepartmentID
Foreign key constraint referencing Department.DepartmentID.
HumanResources.Department.Depart
mentID =
HumanResources.EmployeeDepartme
ntHistory.DepartmentID
HumanResources.EmployeeDepart
mentHistory
23 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_Department_DepartmentID
Primary key (clustered) constraint
DepartmentID
AK_Department_Name
Unique nonclustered index.
Name
Used by
Name
HumanResources.Department
HumanResources.EmployeeDepartmentHistory
4.1.2. Table: HumanResources.Employee
Employee information such as salary, department, and title.
Columns
Description / AttributesNData typeName
Primary key for Employee records. Foreign key to
BusinessEntity.BusinessEntityID.
intBusinessEntityID
Unique national identification number such as a social security
number.nvarchar(15)NationalIDNumber
Network login. Test2nvarchar(256)LoginID
Where the employee is located in corporate
hierarchy.hierarchyidOrganizationNode
The depth of the employee in the corporate hierarchy.
Computed: [OrganizationNode].[GetLevel]()
smallintOrganizationLevel
Work title such as Buyer or Sales
Representative.nvarchar(50)JobTitle
Date of birth.dateBirthDate
M = Married, S = Singlenchar(1)MaritalStatus
M = Male, F = Femalenchar(1)Gender
Employee hired on this date.dateHireDate
Job classification. 0 = Hourly, not exempt from collective
bargaining. 1 =
Salaried, exempt from collective bargaining.
Default: 1
bitSalariedFlag
Number of available vacation hours.
Default: 0
smallintVacationHours
Number of available sick leave hours.
Default: 0
smallintSickLeaveHours
0 = Inactive, 1 = Active
Default: 1
bitCurrentFlag
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
24 Generated with
http://dataedo.com
Links to
Title / Name / DescriptionJoinTable
FK_Employee_Person_BusinessEntityID
Foreign key constraint referencing Person.BusinessEntityID.
HumanResources.Employee.BusinessE
ntityID =
Person.Person.BusinessEntityID
Person.Person
Linked from
Title / Name / DescriptionJoinTable
FK_EmployeeDepartmentHistory_Employee_BusinessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.Employee.BusinessE
ntityID =
HumanResources.EmployeeDepartme
ntHistory.BusinessEntityID
HumanResources.EmployeeDepart
mentHistory
FK_EmployeePayHistory_Employee_BusinessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.Employee.BusinessE
ntityID =
HumanResources.EmployeePayHistory
.BusinessEntityID
HumanResources.EmployeePayHist
ory
FK_JobCandidate_Employee_BusinessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.Employee.BusinessE
ntityID =
HumanResources.JobCandidate.Busin
essEntityID
HumanResources.JobCandidate
FK_PurchaseOrderHeader_Employee_EmployeeID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.Employee.BusinessE
ntityID =
Purchasing.PurchaseOrderHeader.Em
ployeeID
Purchasing.PurchaseOrderHeader
FK_SalesPerson_Employee_BusinessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.Employee.BusinessE
ntityID =
Sales.SalesPerson.BusinessEntityID
Sales.SalesPerson
Unique keys
Name / DescriptionColumns
PK_Employee_BusinessEntityID
Primary key (clustered) constraint
BusinessEntityID
AK_Employee_LoginID
Unique nonclustered index.
LoginID
AK_Employee_NationalIDNumber
Unique nonclustered index.
NationalIDNumber
AK_Employee_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Triggers
DescriptionWhenName
INSTEAD OF DELETE trigger which keeps Employees from
being deleted.Instead Of DeletedEmployee
Uses
Name
HumanResources.Employee
Person.Person
25 Generated with
http://dataedo.com
Used by
Name
HumanResources.Employee
HumanResources.EmployeeDepartmentHistory
HumanResources.EmployeePayHistory
HumanResources.JobCandidate
Purchasing.PurchaseOrderHeader
Sales.SalesPerson
4.1.3. Table: HumanResources.EmployeeDepartmentHistory
Employee department transfers.
Columns
Description / AttributesNData typeName
Employee identification number. Foreign key to
Employee.BusinessEntityID.intBusinessEntityID
Department in which the employee worked including currently.
Foreign
key to Department.DepartmentID.
smallintDepartmentID
Identifies which 8-hour shift the employee works. Foreign key
to
Shift.Shift.ID.
tinyintShiftID
Date the employee started work in the department.dateStartDate
Date the employee left the department. NULL = Current
department.dateEndDate
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_EmployeeDepartmentHistory_Department_DepartmentID
Foreign key constraint referencing Department.DepartmentID.
HumanResources.EmployeeDepartme
ntHistory.DepartmentID =
HumanResources.Department.Depart
mentID
HumanResources.Department
FK_EmployeeDepartmentHistory_Employee_BusinessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.EmployeeDepartme
ntHistory.BusinessEntityID =
HumanResources.Employee.BusinessE
ntityID
HumanResources.Employee
FK_EmployeeDepartmentHistory_Shift_ShiftID
Foreign key constraint referencing Shift.ShiftID
HumanResources.EmployeeDepartme
ntHistory.ShiftID =
HumanResources.Shift.ShiftID
HumanResources.Shift
Unique keys
Name / DescriptionColumns
PK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_
DepartmentID
Primary key (clustered) constraint
BusinessEntityID, StartDate,
DepartmentID, ShiftID
26 Generated with
http://dataedo.com
Uses
Name
HumanResources.EmployeeDepartmentHistory
HumanResources.Department
HumanResources.Employee
HumanResources.Shift
4.1.4. Table: HumanResources.EmployeePayHistory
Employee pay history.
Columns
Description / AttributesNData typeName
Employee identification number. Foreign key to
Employee.BusinessEntityID.intBusinessEntityID
Date the change in pay is effectivedatetimeRateChangeDate
Salary hourly rate.moneyRate
1 = Salary received monthly, 2 = Salary received
biweeklytinyintPayFrequency
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_EmployeePayHistory_Employee_BusinessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.EmployeePayHistory
.BusinessEntityID =
HumanResources.Employee.BusinessE
ntityID
HumanResources.Employee
Unique keys
Name / DescriptionColumns
PK_EmployeePayHistory_BusinessEntityID_RateChangeDate
Primary key (clustered) constraint
BusinessEntityID, RateChangeDate
Uses
Name
HumanResources.EmployeePayHistory
HumanResources.Employee
4.1.5. Table: HumanResources.JobCandidate
Résumés submitted to Human Resources by job applicants.
Columns
Description / AttributesNData typeName
Primary key for JobCandidate records.
Identity / Auto increment column
intJobCandidateID
Employee identification number if applicant was hired. Foreign
key to
Employee.BusinessEntityID.
intBusinessEntityID
Résumé in XML format.xmlResume
27 Generated with
http://dataedo.com
Description / AttributesNData typeName
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_JobCandidate_Employee_Busi nessEntityID
Foreign key constraint referencing Employee.EmployeeID.
HumanResources.JobCandidate.Busin
essEntityID =
HumanResources.Employee.BusinessE
ntityID
HumanResources.Employee
Unique keys
Name / DescriptionColumns
PK_JobCandidate_JobCandidateID
Primary key (clustered) constraint
JobCandidateID
Uses
Name
HumanResources.JobCandidate
HumanResources.Employee
4.1.6. Table: HumanResources.Shift
Work shift lookup table.
Columns
Description / AttributesNData typeName
Primary key for Shift records.
Identity / Auto increment column
tinyintShiftID
Shift description.nvarchar(50)Name
Shift start time.time(7)StartTime
Shift end time.time(7)EndTime
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_EmployeeDepartmentHistory_Shift_ShiftID
Foreign key constraint referencing Shift.ShiftID
HumanResources.Shift.ShiftID =
HumanResources.EmployeeDepartme
ntHistory.ShiftID
HumanResources.EmployeeDepart
mentHistory
Unique keys
Name / DescriptionColumns
PK_Shift_ShiftID
Primary key (clustered) constraint
ShiftID
AK_Shift_Name
Unique nonclustered index.
Name
AK_Shift_StartTime_EndTime
Unique nonclustered index.
StartTime, EndTime
28 Generated with
http://dataedo.com
Used by
Name
HumanResources.Shift
HumanResources.EmployeeDepartmentHistory
4.2. Views
4.2.1. View: HumanResources.vEmployee
Employee names and addresses.
Columns
Description / AttributesNData typeName
intBusinessEntityID
nvarchar(8)Title
nvarchar(50)FirstName
nvarchar(50)MiddleName
nvarchar(50)LastName
nvarchar(10)Suffix
nvarchar(50)JobTitle
nvarchar(25)PhoneNumber
nvarchar(50)PhoneNumberType
nvarchar(50)EmailAddress
intEmailPromotion
nvarchar(60)AddressLine1
nvarchar(60)AddressLine2
nvarchar(30)City
nvarchar(50)StateProvinceName
nvarchar(15)PostalCode
nvarchar(50)CountryRegionName
xmlAdditionalContactInfo
4.2.2. View: HumanResources.vEmployeeDepartment
Returns employee name, title, and current department.
Columns
Description / AttributesNData typeName
intBusinessEntityID
nvarchar(8)Title
nvarchar(50)FirstName
nvarchar(50)MiddleName
nvarchar(50)LastName
nvarchar(10)Suffix
29 Generated with
http://dataedo.com
Description / AttributesNData typeName
nvarchar(50)JobTitle
nvarchar(50)Department
nvarchar(50)GroupName
dateStartDate
4.2.3. View: HumanResources.vEmployeeDepartmentHistory
Returns employee name and current and previous departments.
Columns
Description / AttributesNData typeName
intBusinessEntityID
nvarchar(8)Title
nvarchar(50)FirstName
nvarchar(50)MiddleName
nvarchar(50)LastName
nvarchar(10)Suffix
nvarchar(50)Shift
nvarchar(50)Department
nvarchar(50)GroupName
dateStartDate
dateEndDate
4.2.4. View: HumanResources.vJobCa ndidate
Job candidate names and resumes.
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintJobCandidateID
intBusinessEntityID
nvarchar(30)Name.Prefix
nvarchar(30)Name.First
nvarchar(30)Name.Middle
nvarchar(30)Name.Last
nvarchar(30)Name.Suffix
nvarchar(MAX)Skills
nvarchar(30)Addr.Type
nvarchar(100)Addr.Loc.CountryRegion
nvarchar(100)Addr.Loc.State
nvarchar(100)Addr.Loc.City
nvarchar(20)Addr.PostalCode
30 Generated with
http://dataedo.com
Description / AttributesNData typeName
nvarchar(MAX)EMail
nvarchar(MAX)WebSite
datetimeModifiedDate
4.2.5. 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.
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintJobCandidateID
nvarchar(MAX)Edu.Level
datetimeEdu.StartDate
datetimeEdu.EndDate
nvarchar(50)Edu.Degree
nvarchar(50)Edu.Major
nvarchar(50)Edu.Minor
nvarchar(5)Edu.GPA
nvarchar(5)Edu.GPAScale
nvarchar(100)Edu.School
nvarchar(100)Edu.Loc.CountryRegion
nvarchar(100)Edu.Loc.State
nvarchar(100)Edu.Loc.City
4.2.6. 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.
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintJobCandidateID
datetimeEmp.StartDate
datetimeEmp.EndDate
nvarchar(100)Emp.OrgName
nvarchar(100)Emp.JobTitle
nvarchar(MAX)Emp.Responsibility
nvarchar(MAX)Emp.FunctionCategory
nvarchar(MAX)Emp.IndustryCategory
nvarchar(MAX)Emp.Loc.CountryRegion
nvarchar(MAX)Emp.Loc.State
31 Generated with
http://dataedo.com
Description / AttributesNData typeName
nvarchar(MAX)Emp.Loc.City
4.3. Procedures
4.3.1. Procedure: dbo.uspGetEmployeeManagers
Stored procedure using a recursive query to return the direct
and indirect managers of the specified employee.
Input/Output
DescriptionData typeName
Input parameter for the stored procedure
uspGetEmployeeManagers. Enter a
valid BusinessEntityID from the HumanResources.Employee
table.
intBusinessEntityID
4.3.2. Procedure: dbo.uspGetManagerEmployees
Stored procedure using a recursive query to return the direct
and indirect employees of the specified manager.
Input/Output
DescriptionData typeName
Input parameter for the stored procedure
uspGetManagerEmployees. Enter a
valid BusinessEntityID of the manager from the
HumanResources.Employee
table.
intBusinessEntityID
4.3.3. Procedure: dbo.uspSearchCandidateResumes
Input/Output
DescriptionData typeName
nvarchar(1000)searchString
bituseInflectional
bituseThesaurus
intlanguage
4.3.4. Procedure:
HumanResources.uspUpdateEmployeeHireInfo
Input/Output
DescriptionData typeName
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
valid BusinessEntityID from the Employee table.
intBusinessEntityID
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
title for the employee.
nvarchar(50)JobTitle
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
hire date for the employee.
datetimeHireDate
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter
the date the rate changed for the employee.
datetimeRateChangeDate
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter
the new rate for the employee.
moneyRate
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter
the pay frequency for the employee.
tinyintPayFrequency
32 Generated with
http://dataedo.com
DescriptionData typeName
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter
the current flag for the employee.
bitCurrentFlag
4.3.5. Procedure: HumanResources.uspUpdateEmployeeLogin
Input/Output
DescriptionData typeName
Input parameter for the stored procedure
uspUpdateEmployeeLogin. Enter a
valid EmployeeID from the Employee table.
intBusinessEntityID
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
valid ManagerID for the employee.
hierarchyidOrganizationNode
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
valid login for the employee.
nvarchar(256)LoginID
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
title for the employee.
nvarchar(50)JobTitle
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
hire date for the employee.
datetimeHireDate
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter
the current flag for the employee.
bitCurrentFlag
4.3.6. Procedure:
HumanResources.uspUpdateEmployeePersonalInfo
Input/Output
DescriptionData typeName
Input parameter for the stored procedure
uspUpdateEmployeePersonalInfo.
Enter a valid BusinessEntityID from the
HumanResources.Employee table.
intBusinessEntityID
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
national ID for the employee.
nvarchar(15)NationalIDNumber
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
birth date for the employee.
datetimeBirthDate
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
marital status for the employee.
nchar(1)MaritalStatus
Input parameter for the stored procedure
uspUpdateEmployeeHireInfo. Enter a
gender for the employee.
nchar(1)Gender
4.4. Functions
4.4.1. Function: dbo.ufnGetContactInformation
Table value function returning the first name, last name, job
title and contact type for a given contact.
Input/Output
DescriptionData typeName
table typeReturns
Input parameter for the table value function
ufnGetContactInformation. Enter a
valid PersonID from the Person.Contact table.
intPersonID
33 Generated with
http://dataedo.com
5. Products
Products manufactured and sold by Adventure Works Cycles.
5.1. Tables
5.1.1. Table: Production.Culture
Lookup table containing the languages in which some
AdventureWorks data is stored.
Columns
Description / AttributesNData typeName
Primary key for Culture records.nchar(6)CultureID
Culture description.nvarchar(50)Name
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_ProductModelProductDescriptionCulture_Culture_CultureI
D
Foreign key constraint referencing Culture.CultureID.
Production.Culture.CultureID =
Production.ProductModelProductDesc
riptionCulture.CultureID
Production.ProductModelProductD
escriptionCulture
34 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_Culture_CultureID
Primary key (clustered) constraint
CultureID
AK_Culture_Name
Unique nonclustered index.
Name
Used by
Name
Production.Culture
Production.ProductModelProductDescriptionCulture
5.1.2. Table: Production.Document
Product maintenance documents.
Columns
Description / AttributesNData typeName
Primary key for Document records.hierarchyidDocumentNode
Depth in the document hierarchy.
Computed: [DocumentNode].[GetLevel]()
smallintDocumentLevel
Title of the document.nvarchar(50)Title
Employee who controls the document. Foreign key to
Employee.BusinessEntityID
intOwner
0 = This is a folder, 1 = This is a document.
Default: 0
bitFolderFlag
File name of the documentnvarchar(400)FileName
File extension indicating the document type. For example, .doc
or .txt.nvarchar(8)FileExtension
Revision number of the document.nchar(5)Revision
Engineering change approval number.
Default: 0
intChangeNumber
1 = Pending approval, 2 = Approved, 3 = ObsoletetinyintStatus
Document abstract.nvarchar(MAX)DocumentSummary
Complete document.varbinary(MAX)Document
ROWGUIDCOL number uniquely identifying the record.
Required for
FileStream.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_ProductDocument_Document_DocumentNode
Foreign key constraint referencing Document.DocumentNode.
Production.Document.DocumentNode
=
Production.ProductDocument.Docum
entNode
Production.ProductDocument
35 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_Document_DocumentNode
Primary key (clustered) constraint
DocumentNode
AK_Document_DocumentLevel_DocumentNode
Unique nonclustered index.
DocumentLevel, DocumentNode
AK_Document_rowguid
Unique nonclustered index. Used to support FileStream.
rowguid
UQ__Document__F73921F793071A63rowguid
Used by
Name
Production.Document
Production.ProductDocument
5.1.3. Table: Production.Illustration
Bicycle assembly diagrams.
Columns
Description / AttributesNData typeName
Primary key for Illustration records.
Identity / Auto increment column
intIllustrationID
Illustrations used in manufacturing instructions. Stored as
XML.xmlDiagram
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_ProductModelIllustration_Illustration_IllustrationID
Foreign key constraint referencing Illustration.IllustrationID.
Production.Illustration.IllustrationID =
Production.ProductModelIllustration.Ill
ustrationID
Production.ProductModelIllustratio
n
Unique keys
Name / DescriptionColumns
PK_Illustration_IllustrationID
Primary key (clustered) constraint
IllustrationID
Used by
Name
Production.Illustration
Production.ProductModelIllustration
5.1.4. Table: Production.Product
Products sold or used in the manfacturing of sold products.
36 Generated with
http://dataedo.com
Columns
Description / AttributesNData typeName
Primary key for Product records.
Identity / Auto increment column
intProductID
Name of the product.nvarchar(50)Name
Unique product identification
number.nvarchar(25)ProductNumber
0 = Product is purchased, 1 = Product is manufactured in-house.
Default: 1
bitMakeFlag
0 = Product is not a salable item. 1 = Product is salable.
Default: 1
bitFinishedGoodsFlag
Product color.nvarchar(15)Color
Minimum inventory quantity.smallintSafetyStockLevel
Inventory level that triggers a purchase order or work
order.smallintReorderPoint
Standard cost of the product.moneyStandardCost
Selling price.moneyListPrice
Product size.nvarchar(5)Size
Unit of measure for Size column.nchar(3)SizeUnitMeasureCode
Unit of measure for Weight
column.nchar(3)WeightUnitMeasureCode
Product weight.decimal(8, 2)Weight
Number of days required to manufacture the
product.intDaysToManufacture
R = Road, M = Mountain, T = Touring, S =
Standardnchar(2)ProductLine
H = High, M = Medium, L = Lownchar(2)Class
W = Womens, M = Mens, U = Universalnchar(2)Style
Product is a member of this product subcategory. Foreign key to
ProductSubCategory.ProductSubCategoryID.
intProductSubcategoryID
Product is a member of this product model. Foreign key to
ProductModel.ProductModelID.
intProductModelID
Date the product was available for sale.datetimeSellStartDate
Date the product was no longer available for
sale.datetimeSellEndDate
Date the product was discontinued.datetimeDiscontinuedDate
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_Product_ProductModel_ProductModelID
Foreign key constraint referencing
ProductModel.ProductModelID.
Production.Product.ProductModelID =
Production.ProductModel.ProductMo
delID
Production.ProductModel
FK_Product_ProductSubcategory_ProductSubcategoryID
Foreign key constraint referencing
ProductSubcategory.ProductSubcategoryID.
Production.Product.ProductSubcatego
ryID =
Production.ProductSubcategory.Produ
ctSubcategoryID
Production.ProductSubcategory
37 Generated with
http://dataedo.com
Title / Name / DescriptionJoinTable
FK_Product_UnitMeasure_SizeUnitMeasureCode
Foreign key constraint referencing
UnitMeasure.UnitMeasureCode.
Production.Product.SizeUnitMeasureC
ode =
Production.UnitMeasure.UnitMeasure
Code
Production.UnitMeasure
FK_Product_UnitMeasure_WeightUnitMeasureCode
Foreign key constraint referencing
UnitMeasure.UnitMeasureCode.
Production.Product.WeightUnitMeasur
eCode =
Production.UnitMeasure.UnitMeasure
Code
Production.UnitMeasure
Linked from
Title / Name / DescriptionJoinTable
FK_BillOfMaterials_Product_ComponentID
Foreign key constraint referencing Product.ProductAssemblyID.
Production.Product.ProductID =
Production.BillOfMaterials.Component
ID
Production.BillOfMaterials
FK_BillOfMaterials_Product_ProductAssemblyID
Foreign key constraint referencing Product.ProductAssemblyID.
Production.Product.ProductID =
Production.BillOfMaterials.ProductAss
emblyID
Production.BillOfMaterials
FK_ProductCostHistory_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.ProductCostHistory.Produc
tID
Production.ProductCostHistory
FK_ProductDocument_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.ProductDocument.Product
ID
Production.ProductDocument
FK_ProductInventory_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.ProductInventory.ProductI
D
Production.ProductInventory
FK_ProductListPriceHistory_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.ProductListPriceHistory.Pro
ductID
Production.ProductListPriceHistory
FK_ProductProductPhoto_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.ProductProductPhoto.Prod
uctID
Production.ProductProductPhoto
FK_ProductReview_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.ProductReview.ProductID
Production.ProductReview
FK_ProductVendor_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Purchasing.ProductVendor.ProductID
Purchasing.ProductVendor
FK_PurchaseOrderDetail_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Purchasing.PurchaseOrderDetail.Prod
uctID
Purchasing.PurchaseOrderDetail
User-defined relation
Production.Product.ProductID =
Sales.SalesOrderDetail.ProductID
Sales.SalesOrderDetail
FK_ShoppingCartItem_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Sales.ShoppingCartItem.ProductID
Sales.ShoppingCartItem
FK_SpecialOfferProduct_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Sales.SpecialOfferProduct.ProductID
Sales.SpecialOfferProduct
FK_TransactionHistory_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.TransactionHistory.Product
ID
Production.TransactionHistory
User-defined relation
Production.Product.ProductID =
Production.TransactionHistoryArchive.
ProductID
Production.TransactionHistoryArchi
ve
FK_WorkOrder_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.Product.ProductID =
Production.WorkOrder.ProductID
Production.WorkOrder
38 Generated with
http://dataedo.com
Unique keys
Name / DescriptionColumns
PK_Product_ProductID
Primary key (clustered) constraint
ProductID
AK_Product_Name
Unique nonclustered index.
Name
AK_Product_ProductNumber
Unique nonclustered index.
ProductNumber
AK_Product_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Uses
Name
Production.Product
Production.ProductModel
Production.ProductSubcategory
Production.UnitMeasure
Production.UnitMeasure
Used by
Name
Production.Product
Production.BillOfMaterials
Production.BillOfMaterials
Production.ProductCostHistory
Production.ProductDocument
Production.ProductInventory
Production.ProductListPriceHistor y
Production.ProductProductPhoto
Production.ProductReview
Production.TransactionHistory
Production.TransactionHistoryArchive
Production.WorkOrder
Purchasing.ProductVendor
Purchasing.PurchaseOrderDetail
Sales.SalesOrderDetail
Sales.ShoppingCartItem
Sales.SpecialOfferProduct
5.1.5. Table: Production.ProductCategory
High-level product categorization.
39 Generated with
http://dataedo.com
Columns
Description / AttributesNData typeName
Primary key for ProductCategory records.
Identity / Auto increment column
intProductCategoryID
Category description.nvarchar(50)Name
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_ProductSubcategory_ProductCategory_ProductCategoryID
Foreign key constraint referencing
ProductCategory.ProductCategoryID.
Production.ProductCategory.ProductC
ategoryID =
Production.ProductSubcategory.Produ
ctCategoryID
Production.ProductSubcategory
Unique keys
Name / DescriptionColumns
PK_ProductCategory_ProductCategoryID
Primary key (clustered) constraint
ProductCategoryID
AK_ProductCategory_Name
Unique nonclustered index.
Name
AK_ProductCategory_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Used by
Name
Production.ProductCategory
Production.ProductSubcategory
5.1.6. Table: Production.ProductDescriptio n
Product descriptions in several languages.
Columns
Description / AttributesNData typeName
Primary key for ProductDescription records.
Identity / Auto increment column
intProductDescriptionID
Description of the product.nvarchar(400)Description
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
40 Generated with
http://dataedo.com
Linked from
Title / Name / DescriptionJoinTable
FK_ProductModelProductDescriptionCulture_ProductDescriptio
n_Prod
uctDescriptionID
Foreign key constraint referencing
ProductDescription.ProductDescriptionID.
Production.ProductDescription.Produc
tDescriptionID =
Production.ProductModelProductDesc
riptionCulture.ProductDescriptionID
Production.ProductModelProductD
escriptionCulture
Unique keys
Name / DescriptionColumns
PK_ProductDescription_ProductDescriptionID
Primary key (clustered) constraint
ProductDescriptionID
AK_ProductDescription_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Used by
Name
Production.ProductDescription
Production.ProductModelProductDescriptionCulture
5.1.7. Table: Production.ProductDocument
Cross-reference table mapping products to related product
documents.
Columns
Description / AttributesNData typeName
Product identification number. Foreign key to
Product.ProductID.intProductID
Document identification number. Foreign key to
Document.DocumentNode.
hierarchyidDocumentNode
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_ProductDocument_Document_DocumentNode
Foreign key constraint referencing Document.DocumentNode.
Production.ProductDocument.Docum
entNode =
Production.Document.DocumentNode
Production.Document
FK_ProductDocument_Product_ProductID
Foreign key constraint referencing Product.ProductID.
Production.ProductDocument.Product
ID = Production.Product.ProductID
Production.Product
Unique keys
Name / DescriptionColumns
PK_ProductDocument_ProductID_DocumentNode
Primary key (clustered) constraint
ProductID, DocumentNode
Uses
Name
Production.ProductDocument
Production.Document
Production.Product
41 Generated with
http://dataedo.com
5.1.8. Table: Production.ProductModel
Product model classification.
Columns
Description / AttributesNData typeName
Primary key for ProductModel records.
Identity / Auto increment column
intProductModelID
Product model description.nvarchar(50)Name
Detailed product catalog information in xml
format.xmlCatalogDescription
Manufacturing instructions in xml format.xmlInstructions
ROWGUIDCOL number uniquely identifying the record. Used
to support a
merge replication sample.
Default: newid()
uniqueidentifierrowguid
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Linked from
Title / Name / DescriptionJoinTable
FK_Product_ProductModel_ProductModelID
Foreign key constraint referencing
ProductModel.ProductModelID.
Production.ProductModel.ProductMo
delID =
Production.Product.ProductModelID
Production.Product
FK_ProductModelIllustration_ProductModel_ProductModelID
Foreign key constraint referencing
ProductModel.ProductModelID.
Production.ProductModel.ProductMo
delID =
Production.ProductModelIllustration.Pr
oductModelID
Production.ProductModelIllustratio
n
FK_ProductModelProductDescriptionCulture_ProductModel_Pr
oductM
odelID
Foreign key constraint referencing
ProductModel.ProductModelID.
Production.ProductModel.ProductMo
delID =
Production.ProductModelProductDesc
riptionCulture.ProductModelID
Production.ProductModelProductD
escriptionCulture
Unique keys
Name / DescriptionColumns
PK_ProductModel_ProductModelID
Primary key (clustered) constraint
ProductModelID
AK_ProductModel_Name
Unique nonclustered index.
Name
AK_ProductModel_rowguid
Unique nonclustered index. Used to support replication samples.
rowguid
Used by
Name
Production.ProductModel
Production.Product
Production.ProductModelIllustration
Production.ProductModelProductDescriptionCulture
5.1.9. Table: Production.ProductModelIllustration
Cross-reference table mapping product models and illustrations.
42 Generated with
http://dataedo.com
Columns
Description / AttributesNData typeName
Primary key. Foreign key to
ProductModel.ProductModelID.intProductModelID
Primary key. Foreign key to
Illustration.IllustrationID.intIllustrationID
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_ProductModelIllustration_Illustration_IllustrationID
Foreign key constraint referencing Illustration.IllustrationID.
Production.ProductModelIllustra tion.Ill
ustrationID =
Production.Illustration.IllustrationID
Production.Illustration
FK_ProductModelIllustration_ProductModel_ProductModelID
Foreign key constraint referencing
ProductModel.ProductModelID.
Production.ProductModelIllustration.Pr
oductModelID =
Production.ProductModel.ProductMo
delID
Production.ProductModel
Unique keys
Name / DescriptionColumns
PK_ProductModelIllustration_ProductModelID_IllustrationID
Primary key (clustered) constraint
ProductModelID, IllustrationID
Uses
Name
Production.ProductModelIllustration
Production.Illustration
Production.ProductModel
5.1.10. Table:
Production.ProductModelProductDescriptionCulture
Cross-reference table mapping product descriptions and the
language the description is written in.
Columns
Description / AttributesNData typeName
Primary key. Foreign key to
ProductModel.ProductModelID.intProductModelID
Primary key. Foreign key to
ProductDescription.ProductDescriptionID.intProductDescription
ID
Culture identification number. Foreign key to
Culture.CultureID.nchar(6)CultureID
Date and time the record was last updated.
Default: getdate()
datetimeModifiedDate
Links to
Title / Name / DescriptionJoinTable
FK_ProductModelProductDescriptionCulture_Culture_CultureI
D
Foreign key constraint referencing Culture.CultureID.
Production.ProductModelProductDesc
riptionCulture.CultureID =
Production.Culture.CultureID
Production.Culture
FK_ProductModelProductDescriptionCulture_ProductDescriptio
n_Prod
uctDescriptionID
Foreign key constraint referencing
ProductDescription.ProductDescriptionID.
Production.ProductModelProductDesc
riptionCulture.ProductDescriptionID =
Production.ProductDescription.Produc
tDescriptionID
Production.ProductDescription
43 Generated with
http://dataedo.com
Title / Name / DescriptionJoinTable
FK_ProductModelProductDescriptionCulture_ProductModel_Pr
oductM
odelID
Foreign key constraint referencing
ProductModel.ProductModelID.
Production.ProductModelProductDesc
riptionCulture.ProductModelID =
Production.ProductModel.ProductMo
delID
Production.ProductModel
Unique keys
Name / DescriptionColumns
PK_ProductModelProductDescriptionCulture_ProductModelID_
ProductDescriptionID_CultureID
Primary key (clustered) constraint
ProductModelID,
ProductDescriptionID, CultureID
Uses
Name
Production.ProductModelProductDescriptionCulture
Production.Culture
Production.ProductDescription
Production.ProductModel
5.1.11. Table: Production.ProductPhoto
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav
InstructionsPart 1 SQL Review and Threat AnalysisYou must hav

More Related Content

More from TatianaMajor22

Behavior in OrganizationsIntercultural Communications Exercise .docx
Behavior in OrganizationsIntercultural Communications Exercise .docxBehavior in OrganizationsIntercultural Communications Exercise .docx
Behavior in OrganizationsIntercultural Communications Exercise .docx
TatianaMajor22
 
Discussion Question Comparison of Theories on Anxiety Disord.docx
Discussion Question Comparison of Theories on Anxiety Disord.docxDiscussion Question Comparison of Theories on Anxiety Disord.docx
Discussion Question Comparison of Theories on Anxiety Disord.docx
TatianaMajor22
 
I have always liked Dustin Hoffmans style of acting, in this mov.docx
I have always liked Dustin Hoffmans style of acting, in this mov.docxI have always liked Dustin Hoffmans style of acting, in this mov.docx
I have always liked Dustin Hoffmans style of acting, in this mov.docx
TatianaMajor22
 
Is obedience to the law sufficient to ensure ethical behavior Wh.docx
Is obedience to the law sufficient to ensure ethical behavior Wh.docxIs obedience to the law sufficient to ensure ethical behavior Wh.docx
Is obedience to the law sufficient to ensure ethical behavior Wh.docx
TatianaMajor22
 
If you are using the Blackboard Mobile Learn IOS App, please clic.docx
If you are using the Blackboard Mobile Learn IOS App, please clic.docxIf you are using the Blackboard Mobile Learn IOS App, please clic.docx
If you are using the Blackboard Mobile Learn IOS App, please clic.docx
TatianaMajor22
 
Is the proliferation of social media and communication devices a .docx
Is the proliferation of social media and communication devices a .docxIs the proliferation of social media and communication devices a .docx
Is the proliferation of social media and communication devices a .docx
TatianaMajor22
 
MATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docx
MATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docxMATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docx
MATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docx
TatianaMajor22
 
If the CIO is to be valued as a strategic actor, how can he bring.docx
If the CIO is to be valued as a strategic actor, how can he bring.docxIf the CIO is to be valued as a strategic actor, how can he bring.docx
If the CIO is to be valued as a strategic actor, how can he bring.docx
TatianaMajor22
 
I am showing below the proof of breakeven, which is fixed costs .docx
I am showing below the proof of breakeven, which is fixed costs .docxI am showing below the proof of breakeven, which is fixed costs .docx
I am showing below the proof of breakeven, which is fixed costs .docx
TatianaMajor22
 
Examine the way in which death and dying are viewed at different .docx
Examine the way in which death and dying are viewed at different .docxExamine the way in which death and dying are viewed at different .docx
Examine the way in which death and dying are viewed at different .docx
TatianaMajor22
 
Karimi 1 Big Picture Blog Post ​ First Draft College .docx
Karimi 1 Big Picture Blog Post ​ First Draft College .docxKarimi 1 Big Picture Blog Post ​ First Draft College .docx
Karimi 1 Big Picture Blog Post ​ First Draft College .docx
TatianaMajor22
 
Please try not to use hard words Thank youWeek 3Individual.docx
Please try not to use hard words Thank youWeek 3Individual.docxPlease try not to use hard words Thank youWeek 3Individual.docx
Please try not to use hard words Thank youWeek 3Individual.docx
TatianaMajor22
 
1. Uncertainty that the party on the other side of an agreement.docx
1. Uncertainty that the party on the other side of an agreement.docx1. Uncertainty that the party on the other side of an agreement.docx
1. Uncertainty that the party on the other side of an agreement.docx
TatianaMajor22
 
Methodology Draft ;                                              .docx
Methodology Draft ;                                              .docxMethodology Draft ;                                              .docx
Methodology Draft ;                                              .docx
TatianaMajor22
 
Part 3 Internal Environmental ScanOrganizational AssessmentT.docx
Part 3  Internal Environmental ScanOrganizational AssessmentT.docxPart 3  Internal Environmental ScanOrganizational AssessmentT.docx
Part 3 Internal Environmental ScanOrganizational AssessmentT.docx
TatianaMajor22
 
Introduction to Juanita’s WorldThis continuing scenario.docx
Introduction to Juanita’s WorldThis continuing scenario.docxIntroduction to Juanita’s WorldThis continuing scenario.docx
Introduction to Juanita’s WorldThis continuing scenario.docx
TatianaMajor22
 
0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx
0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx
0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx
TatianaMajor22
 
Challenger Space Shuttle Disaster AnalysisFor this assignment, .docx
Challenger Space Shuttle Disaster AnalysisFor this assignment, .docxChallenger Space Shuttle Disaster AnalysisFor this assignment, .docx
Challenger Space Shuttle Disaster AnalysisFor this assignment, .docx
TatianaMajor22
 
Date Description.docx
Date Description.docxDate Description.docx
Date Description.docx
TatianaMajor22
 
Management of Modugno Corporation is considering whether to p.docx
Management of Modugno Corporation is considering whether to p.docxManagement of Modugno Corporation is considering whether to p.docx
Management of Modugno Corporation is considering whether to p.docx
TatianaMajor22
 

More from TatianaMajor22 (20)

Behavior in OrganizationsIntercultural Communications Exercise .docx
Behavior in OrganizationsIntercultural Communications Exercise .docxBehavior in OrganizationsIntercultural Communications Exercise .docx
Behavior in OrganizationsIntercultural Communications Exercise .docx
 
Discussion Question Comparison of Theories on Anxiety Disord.docx
Discussion Question Comparison of Theories on Anxiety Disord.docxDiscussion Question Comparison of Theories on Anxiety Disord.docx
Discussion Question Comparison of Theories on Anxiety Disord.docx
 
I have always liked Dustin Hoffmans style of acting, in this mov.docx
I have always liked Dustin Hoffmans style of acting, in this mov.docxI have always liked Dustin Hoffmans style of acting, in this mov.docx
I have always liked Dustin Hoffmans style of acting, in this mov.docx
 
Is obedience to the law sufficient to ensure ethical behavior Wh.docx
Is obedience to the law sufficient to ensure ethical behavior Wh.docxIs obedience to the law sufficient to ensure ethical behavior Wh.docx
Is obedience to the law sufficient to ensure ethical behavior Wh.docx
 
If you are using the Blackboard Mobile Learn IOS App, please clic.docx
If you are using the Blackboard Mobile Learn IOS App, please clic.docxIf you are using the Blackboard Mobile Learn IOS App, please clic.docx
If you are using the Blackboard Mobile Learn IOS App, please clic.docx
 
Is the proliferation of social media and communication devices a .docx
Is the proliferation of social media and communication devices a .docxIs the proliferation of social media and communication devices a .docx
Is the proliferation of social media and communication devices a .docx
 
MATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docx
MATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docxMATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docx
MATH 107 FINAL EXAMINATIONMULTIPLE CHOICE1. Deter.docx
 
If the CIO is to be valued as a strategic actor, how can he bring.docx
If the CIO is to be valued as a strategic actor, how can he bring.docxIf the CIO is to be valued as a strategic actor, how can he bring.docx
If the CIO is to be valued as a strategic actor, how can he bring.docx
 
I am showing below the proof of breakeven, which is fixed costs .docx
I am showing below the proof of breakeven, which is fixed costs .docxI am showing below the proof of breakeven, which is fixed costs .docx
I am showing below the proof of breakeven, which is fixed costs .docx
 
Examine the way in which death and dying are viewed at different .docx
Examine the way in which death and dying are viewed at different .docxExamine the way in which death and dying are viewed at different .docx
Examine the way in which death and dying are viewed at different .docx
 
Karimi 1 Big Picture Blog Post ​ First Draft College .docx
Karimi 1 Big Picture Blog Post ​ First Draft College .docxKarimi 1 Big Picture Blog Post ​ First Draft College .docx
Karimi 1 Big Picture Blog Post ​ First Draft College .docx
 
Please try not to use hard words Thank youWeek 3Individual.docx
Please try not to use hard words Thank youWeek 3Individual.docxPlease try not to use hard words Thank youWeek 3Individual.docx
Please try not to use hard words Thank youWeek 3Individual.docx
 
1. Uncertainty that the party on the other side of an agreement.docx
1. Uncertainty that the party on the other side of an agreement.docx1. Uncertainty that the party on the other side of an agreement.docx
1. Uncertainty that the party on the other side of an agreement.docx
 
Methodology Draft ;                                              .docx
Methodology Draft ;                                              .docxMethodology Draft ;                                              .docx
Methodology Draft ;                                              .docx
 
Part 3 Internal Environmental ScanOrganizational AssessmentT.docx
Part 3  Internal Environmental ScanOrganizational AssessmentT.docxPart 3  Internal Environmental ScanOrganizational AssessmentT.docx
Part 3 Internal Environmental ScanOrganizational AssessmentT.docx
 
Introduction to Juanita’s WorldThis continuing scenario.docx
Introduction to Juanita’s WorldThis continuing scenario.docxIntroduction to Juanita’s WorldThis continuing scenario.docx
Introduction to Juanita’s WorldThis continuing scenario.docx
 
0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx
0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx
0x08048d02 +0push   ebp   0x08048d03 +1mov    esp,eb.docx
 
Challenger Space Shuttle Disaster AnalysisFor this assignment, .docx
Challenger Space Shuttle Disaster AnalysisFor this assignment, .docxChallenger Space Shuttle Disaster AnalysisFor this assignment, .docx
Challenger Space Shuttle Disaster AnalysisFor this assignment, .docx
 
Date Description.docx
Date Description.docxDate Description.docx
Date Description.docx
 
Management of Modugno Corporation is considering whether to p.docx
Management of Modugno Corporation is considering whether to p.docxManagement of Modugno Corporation is considering whether to p.docx
Management of Modugno Corporation is considering whether to p.docx
 

InstructionsPart 1 SQL Review and Threat AnalysisYou must hav

  • 1. Instructions Part 1: SQL Review and Threat Analysis You must have SQL Server Express, SQL Server Management Studio, and the Adventure Works® OLTP database installed to perform this Assessment. You will also want to download, or bookmark, the design document for that database. If you do not have the above software installed, please perform the required installations. The following document will assist you with installation of the software: SQL Server Setup. Complete the following: For each of the following actions, use the Adventure Works database to formulate an SQL solution. Please copy the numbered action into your Microsoft Word® document. For items 1–5 below, provide screenshot of the execution of the SQL showing the code and the result set. Make sure to also respond to items 6 and 7. Start a next action on a new page. 1. Show a person’s name, credit card number, and type. 2. Show a store name and year-to-date sales. Group by name and year-to-date values. 3. Create three tables with the following parameters: IN301: primary key field, vulnerability_id, solution_id and organization. All fields require a value except the organization. Identify foreign key columns properly. Vulnerability: primary key field, vulnerability_name. All fields require values. Solution
  • 2. , primary key field, solution_name. All fields require values. 4. Insert 5 rows into each table. Ensure two IN301 organization fields have null values. 5. Show an organization, vulnerability and solution. Be sure to only show the organization with values. 6. Using the Adventure Works design document, identify important data assets. Explain your table selections. 7. Keeping those important data assets in mind, develop a DREAD threat rating for the below. Include a brief description of which had the higher risk rating and explain why. a. Excessive privilege abuse. b. Malware. In order to obtain mastery level for this Competency Assessment, complete the following: Apply the Microsoft Threat Modeling Tool™ to model a case of a mobile client sending a request to a database. Show the database returning a response to the mobile client. Create a full report of the results. Part 2: Big Data Ecosystem You must have VirtualBox® and Hortonworks Hadoop HDP installed and running. If you do not have the above software installed, please perform the required installations. The following document will assist you with installation of the software: Hadoop Setup. Complete the following:
  • 3. For each of the actions, as applicable, use the Hortonworks Hadoop HDP virtual machine environment. Please copy the numbered action into your Microsoft Word document. Respond to items 1–3. For items 4–5 below, provide a screenshot of the execution showing the command and the result set. Start a next action on a new page. 1. Other than authentication, explore a big data security concern in depth. Explain what it is, why it is a security concern and possible solutions. 2. Other than Kerberos, research what Hadoop uses to ensure secure authentication, permissions, and/or data accessibility. 3. Explain how Kerberos works in the Hadoop ecosystem. 4. Secure shell to the Hadoop virtual machine. 5. Transfer a file to and from your host and Hadoop virtual machine. Dataedo AdventureWorks
  • 4. Data Dictionary 2017-05-30 Generated with http://dataedo.com Table of Contents 1. AdventureWorks ............................................................................................... ............................................................................................... .............................. 7 2. Business Entities ............................................................................................... ............................................................................................... ............................... 8 3. People ............................................................................................... ............................................................................................... ................................................ 9
  • 5. 3.1. Tables ............................................................................................... ............................................................................................... ............................................ 9 3.1.1. Table: Person.Address ............................................................................................... ............................................................................................... ....... 9 3.1.2. Table: Person.AddressType ............................................................................................... ........................................................................................... 10 3.1.3. Table: Person.BusinessEntity ............................................................................................... .......................................................................................... 11 3.1.4. Table: Person.BusinessEntityAddress ............................................................................................... .......................................................................... 12 3.1.5. Table: Person.BusinessEntityContact
  • 6. ............................................................................................... .......................................................................... 13 3.1.6. Table: Person.ContactType ............................................................................................... ........................................................................................... 14 3.1.7. Table: Person.CountryRegion ............................................................................................... ....................................................................................... 14 3.1.8. Table: Person.EmailAddress ............................................................................................... .................................................................................... ...... 15 3.1.9. Table: Person.Password ............................................................................................... ............................................................................................... .. 16 3.1.10. Table: Person.Person ............................................................................................... ............................................................................................... ..... 16
  • 7. 3.1.11. Table: Person.PersonPhone ............................................................................................... ......................................................................................... 18 3.1.12. Table: Person.PhoneNumberType ............................................................................................... .............................................................................19 3.1.13. Table: Person.StateProvince ............................................................................................... ........................................................................................ 19 3.2. Views ............................................................................................... ............................................................................................... ........................................... 21 3.2.1. View: Person.vAdditionalContactInfo ............................................................................................... ......................................................................... 21 3.2.2. View: Person.vStateProvinceCountryRegion ............................................................................................... ............................................................ 21
  • 8. 4. Human Resources ............................................................................................... ............................................................................................... ......................... 23 4.1. Tables ............................................................................................... ............................................................................................... .......................................... 23 4.1.1. Table: HumanResources.Department ............................................................................................... ........................................................................ 23 4.1.2. Table: HumanResources.Employee ............................................................................................... ............................................................................ 24 4.1.3. Table: HumanResources.EmployeeDepartmentHistory ............................................................................................... ........................................ 26 4.1.4. Table: HumanResources.EmployeePayHistory ...............................................................................................
  • 9. ........................................................ 27 4.1.5. Table: HumanResources.JobCandidate ............................................................................................... ..................................................................... 27 4.1.6. Table: HumanResources.Shift ............................................................................................... ...................................................................................... 28 4.2. Views ............................................................................................... ............................................................................................... .......................................... 29 4.2.1. View: HumanResources.vEmployee ............................................................................................... ........................................................................... 29 4.2.2. View: HumanResources.vEmployeeDepartment ............................................................................................... .................................................... 29 4.2.3. View: HumanResources.vEmployeeDepartmentHistory ...............................................................................................
  • 10. ....................................... 30 4.2.4. View: HumanResources.vJobCandidate ............................................................................................... ................................................................... 30 4.2.5. View: HumanResources.vJobCandidateEducation ............................................................................................... ................................................. 31 4.2.6. View: HumanResources.vJobCandidateEmployment ............................................................................................... ............................................ 31 4.3. Procedures ............................................................................................... ............................................................................................... ................................ 32 4.3.1. Procedure: dbo.uspGetEmployeeManagers ............................................................................................... ............................................................ 32 4.3.2. Procedure: dbo.uspGetManagerEmployees ...............................................................................................
  • 11. ........................................................... 32 4.3.3. Procedure: dbo.uspSearchCandidateResumes ............................................................................................... ...................................................... 32 4.3.4. Procedure: HumanResources.uspUpdateEmployeeHireInfo ............................................................................................... .............................. 32 4.3.5. Procedure: HumanResources.uspUpdateEmployeeLogin ............................................................................................... ................................... 33 4.3.6. Procedure: HumanResources.uspUpdateEmployeePersonalInfo ............................................................................................... ...................... 33 4.4. Functions ............................................................................................... ............................................................................................... ................................... 33
  • 12. 4.4.1. Function: dbo.ufnGetContactInformation ............................................................................................... ................................................................ 33 5. Products ............................................................................................... ............................................................................................... .......................................... 34 5.1. Tables ............................................................................................... ............................................................................................... .......................................... 34 5.1.1. Table: Production.Culture ............................................................................................... ............................................................................................. 34 5.1.2. Table: Production.Document ............................................................................................... ....................................................................................... 35
  • 13. 5.1.3. Table: Production.Illustration ............................................................................................... ....................................................................................... 36 5.1.4. Table: Production.Product ............................................................................................... ............................................................................................ 36 5.1.5. Table: Production.ProductCategory ............................................................................................... ...........................................................................39 5.1.6. Table: Production.ProductDescription ............................................................................................... .......................................................................40 5.1.7. Table: Production.ProductDocument ............................................................................................... ......................................................................... 41 5.1.8. Table: Production.ProductModel ............................................................................................... ................................................................................ 42
  • 14. 5.1.9. Table: Production.ProductModelIllustration ............................................................................................... ............................................................ 42 5.1.10. Table: Production.ProductModelProductDescriptionCulture ............................................................................................... .............................43 5.1.11. Table: Production.ProductPhoto ............................................................................................... ................................................................................44 5.1.12. Table: Production.ProductProductPhoto ............................................................................................... ................................................................ 45 5.1.13. Table: Production.ProductReview ............................................................................................... ............................................................................. 45 5.1.14. Table: Production.ProductSubcategory ............................................................................................... .................................................................. 46
  • 15. 5.1.15. Table: Production.UnitMeasure ............................................................................................... ................................................................................. 47 5.2. Views ............................................................................................... ............................................................................................... .......................................... 48 5.2.1. View: Production.vProductAndDescription ............................................................................................... .............................................................. 48 5.2.2. View: Production.vProductModelCatalogDescription ............................................................................................... ...........................................48 5.2.3. View: Production.vProductModelInstructions ............................................................................................... ......................................................... 49 5.3. Procedures ............................................................................................... ............................................................................................... ................................ 49
  • 16. 5.3.1. Procedure: dbo.uspGetBillOfMaterials ............................................................................................... ...................................................................... 49 5.3.2. Procedure: dbo.uspGetWhereUsedProductID ............................................................................................... ........................................................ 50 5.4. Functions ............................................................................................... ............................................................................................... ................................... 50 5.4.1. Function: dbo.ufnGetDocumentStatusText ............................................................................................... .............................................................. 50 5.4.2. Function: dbo.ufnGetProductDealerPrice ............................................................................................... ................................................................ 50 5.4.3. Function: dbo.ufnGetProductListPrice ............................................................................................... ...................................................................... 50
  • 17. 5.4.4. Function: dbo.ufnGetProductStandardCost ............................................................................................... ............................................................. 51 5.4.5. Function: dbo.ufnGetStock ............................................................................................... ........................................................................................... 51 6. Manufacturing ............................................................................................... ............................................................................................... ............................... 52 6.1. Tables ............................................................................................... ............................................................................................... .......................................... 52 6.1.1. Table: Production.BillOfMaterials ............................................................................................... ................................................................................ 52 6.1.2. Table: Production.ProductCostHistory
  • 18. ............................................................................................... ...................................................................... 53 6.1.3. Table: Production.ProductListPriceHistory ............................................................................................... ............................................................... 54 6.1.4. Table: Production.ScrapReason ............................................................................................... .................................................................................. 55 6.1.5. Table: Production.TransactionHistory ............................................................................................... ........................................................................ 55 6.1.6. Table: Production.TransactionHistoryArchive ............................................................................................... .......................................................... 56 6.1.7. Table: Production.WorkOrder ............................................................................................... ..................................................................................... 57 6.1.8. Table: Production.WorkOrderRouting ...............................................................................................
  • 19. ....................................................................... 58 7. Purchasing ............................................................................................... ............................................................................................... ...................................... 60 7.1. Tables ............................................................................................... ............................................................................................... .......................................... 60 7.1.1. Table: Purchasing.ProductVendor ............................................................................................... ............................................................................... 60 7.1.2. Table: Purchasing.PurchaseOrderDetail ............................................................................................... .................................................................... 61 7.1.3. Table: Purchasing.PurchaseOrderHeader ............................................................................................... .................................................................62 7.1.4. Table: Purchasing.ShipMethod
  • 20. ............................................................................................... ....................................................................................64 7.1.5. Table: Purchasing.Vendor ............................................................................................... ............................................................................................. 65 7.2. Views ............................................................................................... ............................................................................................... .......................................... 66 7.2.1. View: Purchasing.vVendorWithAddresses ............................................................................................... ................................................................ 66 7.2.2. View: Purchasing.vVendorWithContacts ............................................................................................... .................................................................. 66 7.3. Functions ...............................................................................................
  • 21. ............................................................................................... ................................... 67 7.3.1. Function: dbo.ufnGetPurchaseOrderStatusText ............................................................................................... ...................................................... 67 8. Inventory ............................................................................................... ............................................................................................... ......................................... 68 8.1. Tables ............................................................................................... ............................................................................................... .......................................... 68 8.1.1. Table: Production.Location ............................................................................................... ........................................................................................... 68 8.1.2. Table: Production.ProductInventory ............................................................................................... .......................................................................... 69
  • 22. 9. Sales ............................................................................................... ............................................................................................... .................................................. 71 9.1. Tables ............................................................................................... ............................................................................................... .......................................... 71 9.1.1. Table: Sales.CountryRegionCurrency ............................................................................................... .......................................................................... 71 9.1.2. Table: Sales.CreditCard ............................................................................................... ............................................................................................... .. 72 9.1.3. Table: Sales.Currency ............................................................................................... ............................................................................................... ...... 73
  • 23. 9.1.4. Table: Sales.CurrencyRate ............................................................................................... ............................................................................................ 73 9.1.5. Table: Sales.Customer ............................................................................................... ............................................................................................... .... 74 9.1.6. Table: Sales.PersonCreditCard ............................................................................................... .................................................................................... 76 9.1.7. Table: Sales.SalesOrderDetail ............................................................................................... ...................................................................................... 76 9.1.8. Table: Sales.SalesOrderHeader ............................................................................................... ................................................................................... 77 9.1.9. Table: Sales.SalesOrderHeaderSalesReason ............................................................................................... ............................................................ 80
  • 24. 9.1.10. Table: Sales.SalesPerson ............................................................................................... ............................................................................................... 81 9.1.11. Table: Sales.SalesPersonQuotaHistory ............................................................................................... ......................................................................82 9.1.12. Table: Sales.SalesReason ............................................................................................... ............................................................................................. 83 9.1.13. Table: Sales.SalesTaxRate .......................................................................................... ..... ............................................................................................ 83 9.1.14. Table: Sales.SalesTerritory ............................................................................................... ........................................................................................... 84
  • 25. 9.1.15. Table: Sales.SalesTerritoryHistory ............................................................................................... .............................................................................. 86 9.1.16. Table: Sales.ShoppingCartItem ............................................................................................... .................................................................................. 86 9.1.17. Table: Sales.SpecialOffer ............................................................................................... ............................................................................................. 87 9.1.18. Table: Sales.SpecialOfferProduct ............................................................................................... ............................................................................... 88 9.1.19. Table: Sales.Store ............................................................................................... ............................................................................................... ........... 89 9.2. Views ............................................................................................... ...............................................................................................
  • 26. .......................................... 90 9.2.1. View: Sales.vIndividualCustomer ............................................................................................... ................................................................................. 90 9.2.2. View: Sales.vPersonDemographics ............................................................................................... ............................................................................. 91 9.2.3. View: Sales.vSalesPerson ............................................................................................... ............................................................................................... 91 9.2.4. View: Sales.vSalesPersonSalesByFiscalYears ............................................................................................... ............................................................ 92 9.2.5. View: Sales.vStoreWithAddresses ............................................................................................... ...............................................................................92 9.2.6. View: Sales.vStoreWithContacts ...............................................................................................
  • 27. ................................................................................. 93 9.2.7. View: Sales.vStoreWithDemographics ............................................................................................... ...................................................................... 93 9.3. Functions ............................................................................................... ............................................................................................... ................................... 94 9.3.1. Function: dbo.ufnGetAccountingEndDate ............................................................................................... ............................................................... 94 9.3.2. Function: dbo.ufnGetAccountingStartDate ............................................................................................... ............................................................. 94 9.3.3. Function: dbo.ufnGetSalesOrderStatusText ............................................................................................... ............................................................ 94 9.3.4. Function: dbo.ufnLeadingZeros ...............................................................................................
  • 28. ................................................................................. 94 10. Admin ............................................................................................... ............................................................................................... ............................................. 95 10.1. Tables ............................................................................................... ............................................................................................... ........................................ 95 10.1.1. Table: dbo.AWBuildVersion ............................................................................................... ........................................................................................ 95 10.1.2. Table: dbo.DatabaseLog ............................................................................................... ............................................................................................. 95 10.1.3. Table: dbo.ErrorLog ...............................................................................................
  • 29. ............................................................................................... .......95 10.2. Procedures ............................................................................................... ............................................................................................... .............................. 96 10.2.1. Procedure: dbo.uspLogError ............................................................................................... ...................................................................................... 96 10.2.2. Procedure: dbo.uspPrintError ............................................................................................... ....................................................................................96 Legend Primary key Primary key disabled User-defined primary key
  • 30. Unique key Unique key disabled User-defined unique key Active trigger Disabled trigger Primary key relation User-defined primary key relation Foreign key relation User-defined foreign key relation Input Output Input/Output
  • 31. Nullable 6 Generated with http://dataedo.com This is a sample Dataedo documentation - AdventureWorks - Microsoft SQL Server sample database. The AdventureWorks database supports standard online transaction processing scenarios for a fictitious bicycle manufacturer (Adventure Works Cycles). Scenarios include Manufacturing, Sales, Purchasing, Product Management, Contact Management, and Human Resources. You can download AdventureWorks database here: · AdventureWorks for SQL Server 2014 (CodePlex) · AdventureWorks for SQL Server 2012 (CodePlex)
  • 32. · AdventureWorks for SQL Server 2008R2 (CodePlex) 1. AdventureWorks 7 Generated with https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/125550 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330
  • 33. https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/55330 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 https://msftdbprodsamples.codeplex.com/releases/view/59211 http://dataedo.com 2. Business Entities Vendors, customers, and employees have common tables for addresses and contacts. Those tables are linked to one table - BusinessEntity that holds ID for all vendors, customers, and employees tables.
  • 34. 8 Generated with http://dataedo.com 3. People Names and addresses of individual customers , vendors, and employees. 3.1. Tables 3.1.1. Table: Person.Address Street address information for customers, employees, and vendors. Columns Description / AttributesNData typeName Primary key for Address records. Identity / Auto increment column intAddressID
  • 35. First street address line.nvarchar(60)AddressLine1 Second street address line.nvarchar(60)AddressLine2 Name of the city.nvarchar(30)City Unique identification number for the state or province. Foreign key to StateProvince table. intStateProvinceID Postal code for the street address.nvarchar(15)PostalCode Latitude and longitude of this address.geographySpatialLocation ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid
  • 36. Date and time the record was last updated. Default: getdate() datetimeModifiedDate 9 Generated with http://dataedo.com Links to Title / Name / DescriptionJoinTable FK_Address_StateProvince_StateProvinceID Foreign key constraint referencing StateProvince.StateProvinceID. Person.Address.StateProvinceID = Person.StateProvince.StateProvinceID Person.StateProvince
  • 37. Linked from Title / Name / DescriptionJoinTable FK_BusinessEntityAddress_Address_AddressID Foreign key constraint referencing Address.AddressID. Person.Address.AddressID = Person.BusinessEntityAddress.AddressI D Person.BusinessEntityAddress FK_SalesOrderHeader_Address_BillToAddressID Foreign key constraint referencing Address.AddressID. Person.Address.AddressID = Sales.SalesOrderHeader.BillToAddressI D
  • 38. Sales.SalesOrderHeader FK_SalesOrderHeader_Address_ShipToAddressID Foreign key constraint referencing Address.AddressID. Person.Address.AddressID = Sales.SalesOrderHeader.ShipToAddres sID Sales.SalesOrderHeader Unique keys Name / DescriptionColumns PK_Address_AddressID Primary key (clustered) constraint AddressID AK_Address_rowguid
  • 39. Unique nonclustered index. Used to support replication samples. rowguid IX_Address_AddressLine1_AddressLine2_City_Sta teProvinceI D_PostalCode Nonclustered index. AddressLine1, AddressLine2, City, StateProvinceID, PostalCode Uses Name Person.Address Person.StateProvince Used by Name
  • 40. Person.Address Person.BusinessEntityAddress Sales.SalesOrderHeader Sales.SalesOrderHeader 3.1.2. Table: Person.AddressType Types of addresses stored in the Address table. Columns Description / AttributesNData typeName Primary key for AddressType records. Identity / Auto increment column intAddressTypeID Address type description. For example, Billing, Home, or Shipping.nvarchar(50)Name 10 Generated with
  • 41. http://dataedo.com Description / AttributesNData typeName ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_BusinessEntityAddress_AddressType_AddressTypeID
  • 42. Foreign key constraint referencing AddressType.AddressTypeID. Person.AddressType.AddressTypeID = Person.BusinessEntityAddress.Address TypeID Person.BusinessEntityAddress Unique keys Name / DescriptionColumns PK_AddressType_AddressTypeID Primary key (clustered) constraint AddressTypeID AK_AddressType_Name Unique nonclustered index. Name
  • 43. AK_AddressType_rowguid Unique nonclustered index. Used to support replication samples. rowguid Used by Name Person.AddressType Person.BusinessEntityAddress 3.1.3. Table: Person.BusinessEntity Source of the ID that connects vendors, customers, and employees with address and contact information. Columns Description / AttributesNData typeName Primary key for all customers, vendors, and employees.
  • 44. Identity / Auto increment column intBusinessEntityID ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID.
  • 45. Person.BusinessEntity.BusinessEntityID = Person.BusinessEntityAddress.Business EntityID Person.BusinessEntityAddress FK_BusinessEntityContact_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID. Person.BusinessEntity.BusinessEntityID = Person.BusinessEntityContact.Business EntityID Person.BusinessEntityContact
  • 46. 11 Generated with http://dataedo.com Title / Name / DescriptionJoinTable FK_Person_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID. Person.BusinessEntity.BusinessEntityID = Person.Person.BusinessEntityID Person.Person FK_Store_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID Person.BusinessEntity.BusinessEntityID
  • 47. = Sales.Store.BusinessEntityID Sales.Store FK_Vendor_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID Person.BusinessEntity.BusinessEntityID = Purchasing.Vendor.BusinessEntityID Purchasing.Vendor Unique keys Name / DescriptionColumns PK_BusinessEntity_BusinessEntityID Primary key (clustered) constraint BusinessEntityID AK_BusinessEntity_rowguid Unique nonclustered index. Used to support replication samples.
  • 48. rowguid Used by Name Person.BusinessEntity Person.BusinessEntityAddress Person.BusinessEntityContact Person.Person Purchasing.Vendor Sales.Store 3.1.4. Table: Person.BusinessEntityAddress Cross-reference table mapping customers, vendors, and employees to their addresses. Columns
  • 49. Description / AttributesNData typeName Primary key. Foreign key to BusinessEntity.BusinessEntityID.intBusinessEntityID Primary key. Foreign key to Address.AddressID.intAddressID Primary key. Foreign key to AddressType.AddressTypeID.intAddressTypeID ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to
  • 50. Title / Name / DescriptionJoinTable FK_BusinessEntityAddress_Address_AddressID Foreign key constraint referencing Address.AddressID. Person.BusinessEntityAddress.AddressI D = Person.Address.AddressID Person.Address FK_BusinessEntityAddress_AddressType_AddressTypeID Foreign key constraint referencing AddressType.AddressTypeID. Person.BusinessEntityAddress.Address TypeID = Person.AddressType.AddressTypeID Person.AddressType
  • 51. FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID. Person.BusinessEntityAddress.Business EntityID = Person.BusinessEntity.BusinessEntityID Person.BusinessEntity 12 Generated with http://dataedo.com Unique keys Name / DescriptionColumns PK_BusinessEntityAddress_BusinessEntityID_AddressID_Addr essTypeID
  • 52. Primary key (clustered) constraint BusinessEntityID, AddressID, AddressTypeID AK_BusinessEntityAddress_rowguid Unique nonclustered index. Used to support replication samples. rowguid Uses Name Person.BusinessEntityAddress Person.Address Person.AddressType Person.BusinessEntity 3.1.5. Table: Person.BusinessEntityContact
  • 53. Cross-reference table mapping stores, vendors, and employees to people Columns Description / AttributesNData typeName Primary key. Foreign key to BusinessEntity.BusinessEntityID.intBusinessEntityID Primary key. Foreign key to Person.BusinessEntityID.intPersonID Primary key. Foreign key to ContactType.ContactTypeID.intContactTypeID ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid
  • 54. Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_BusinessEntityContact_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID. Person.BusinessEntityContact.Business EntityID = Person.BusinessEntity.BusinessEntityID Person.BusinessEntity FK_BusinessEntityContact_ContactType_ContactTypeID Foreign key constraint referencing ContactType.ContactTypeID.
  • 55. Person.BusinessEntityContact.ContactT ypeID = Person.ContactType.ContactTypeID Person.ContactType FK_BusinessEntityContact_Person_PersonID Foreign key constraint referencing Person.BusinessEntityID. Person.BusinessEntityContact.PersonID = Person.Person.BusinessEntityID Person.Person Unique keys Name / DescriptionColumns PK_BusinessEntityContact_BusinessEntityID_PersonID_Contac tTypeID
  • 56. Primary key (clustered) constraint BusinessEntityID, PersonID, ContactTypeID AK_BusinessEntityContact_rowguid Unique nonclustered index. Used to support replication samples. rowguid 13 Generated with http://dataedo.com Uses Name Person.BusinessEntityContact Person.BusinessEntity Person.ContactType
  • 57. Person.Person 3.1.6. Table: Person.ContactType Lookup table containing the types of business entity contacts. Columns Description / AttributesNData typeName Primary key for ContactType records. Identity / Auto increment column intContactTypeID Contact type description.nvarchar(50)Name Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from
  • 58. Title / Name / DescriptionJoinTable FK_BusinessEntityContact_ContactType_ContactTypeID Foreign key constraint referencing ContactType.ContactTypeID. Person.ContactType.ContactTypeID = Person.BusinessEntityContact.ContactT ypeID Person.BusinessEntityContact Unique keys Name / DescriptionColumns PK_ContactType_ContactTypeID Primary key (clustered) constraint ContactTypeID AK_ContactType_Name
  • 59. Unique nonclustered index. Name Used by Name Person.ContactType Person.BusinessEntityContact 3.1.7. Table: Person.CountryRegion Lookup table containing the ISO standard codes for countries and regions. Columns Description / AttributesNData typeName ISO standard code for countries and regions.nvarchar(3)CountryRegionCode Country or region name.nvarchar(50)Name
  • 60. Date and time the record was last updated. Default: getdate() datetimeModifiedDate 14 Generated with http://dataedo.com Linked from Title / Name / DescriptionJoinTable FK_CountryRegionCurrency_CountryRegion_CountryRegionCo de Foreign key constraint referencing CountryRegion.CountryRegionCode. Person.CountryRegion.CountryRegion Code =
  • 61. Sales.CountryRegionCurrency.Country RegionCode Sales.CountryRegionCurrency FK_SalesTerritory_CountryRegion_CountryRegionCode Foreign key constraint referencing CountryRegion.CountryRegionCode. Person.CountryRegion.CountryRegion Code = Sales.SalesTerritory.CountryRegionCo de Sales.SalesTerritory FK_StateProvince_CountryRegion_CountryRegionCode Foreign key constraint referencing
  • 62. CountryRegion.CountryRegionCode. Person.CountryRegion.CountryRegion Code = Person.StateProvince.CountryRegionC ode Person.StateProvince Unique keys Name / DescriptionColumns PK_CountryRegion_CountryRegionCode Primary key (clustered) constraint CountryRegionCode AK_CountryRegion_Name Unique nonclustered index.
  • 63. Name Used by Name Person.CountryRegion Person.StateProvince Sales.CountryRegionCurrency Sales.SalesTerritory 3.1.8. Table: Person.EmailAddress Where to send a person email. Columns Description / AttributesNData typeName Primary key. Person associated with this email address. Foreign key to
  • 64. Person.BusinessEntityID intBusinessEntityID Primary key. ID of this email address. Identity / Auto increment column intEmailAddressID E-mail address for the person.nvarchar(50)EmailAddress ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to
  • 65. Title / Name / DescriptionJoinTable FK_EmailAddress_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.EmailAddress.BusinessEntityID = Person.Person.BusinessEntityID Person.Person 15 Generated with http://dataedo.com Unique keys Name / DescriptionColumns PK_EmailAddress_BusinessEntityID_EmailAddressID Primary key (clustered) constraint BusinessEntityID, EmailAddressID
  • 66. Uses Name Person.EmailAddress Person.Person 3.1.9. Table: Person.Password One way hashed authentication information Columns Description / AttributesNData typeName intBusinessEntityID Password for the e-mail account.varchar(128)PasswordHash Random value concatenated with the password string before the password is hashed. varchar(10)PasswordSalt
  • 67. ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_Password_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.Password.BusinessEntityID =
  • 68. Person.Person.BusinessEntityID Person.Person Unique keys Name / DescriptionColumns PK_Password_BusinessEntityID Primary key (clustered) constraint BusinessEntityID Uses Name Person.Password Person.Person 3.1.10. Table: Person.Person Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.
  • 69. Columns Description / AttributesNData typeName Primary key for Person records.intBusinessEntityID 16 Generated with http://dataedo.com Description / AttributesNData typeName Primary type of person: SC = Store Contact, IN = Individual (retail) customer, SP = Sales person, EM = Employee (non-sales), VC = Vendor contact, GC = General contact nchar(2)PersonType 0 = The data in FirstName and LastName are stored in western style (first
  • 70. name, last name) order. 1 = Eastern style (last name, first name) order. Default: 0 bitNameStyle A courtesy title. For example, Mr. or Ms.nvarchar(8)Title First name of the person.nvarchar(50)FirstName Middle name or middle initial of the person.nvarchar(50)MiddleName Last name of the person.nvarchar(50)LastName Surname suffix. For example, Sr. or Jr.nvarchar(10)Suffix 0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact
  • 71. does wish to receive e-mail promotions from AdventureWorks and selected partners. Default: 0 intEmailPromotion Additional contact information about the person stored in xml format.xmlAdditionalContactInfo Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis. xmlDemographics ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid()
  • 72. uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_Person_BusinessEntity_BusinessEntityID Foreign key constraint referencing BusinessEntity.BusinessEntityID. Person.Person.BusinessEntityID = Person.BusinessEntity.BusinessEntityID Person.BusinessEntity Linked from Title / Name / DescriptionJoinTable
  • 73. FK_BusinessEntityContact_Person_PersonID Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEnti tyID = Person.BusinessEntityContact.PersonID Person.BusinessEntityContact FK_Customer_Person_PersonID Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEntityID = Sales.Customer.PersonID Sales.Customer FK_EmailAddress_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEntityID = Person.EmailAddress.BusinessEntityID
  • 74. Person.EmailAddress FK_Employee_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEntityID = HumanResources.Employee.BusinessE ntityID HumanResources.Employee FK_Password_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEntityID = Person.Password.BusinessEntityID Person.Password FK_PersonCreditCard_Person_BusinessEntityID
  • 75. Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEntityID = Sales.PersonCreditCard.BusinessEntityI D Sales.PersonCreditCard FK_PersonPhone_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.Person.BusinessEntityID = Person.PersonPhone.BusinessEntityID Person.PersonPhone 17 Generated with http://dataedo.com Unique keys
  • 76. Name / DescriptionColumns PK_Person_BusinessEntityID Primary key (clustered) constraint BusinessEntityID AK_Person_rowguid Unique nonclustered index. Used to support replication samples. rowguid Triggers DescriptionWhenName AFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the ModifiedDate column in the Person table to the current date.
  • 77. After Insert, UpdateiuPerson Uses Name Person.Person Person.BusinessEntity Used by Name Person.Person HumanResources.Employee Person.BusinessEntityContact Person.EmailAddress Person.Password Person.PersonPhone
  • 78. Sales.Customer Sales.PersonCreditCard 3.1.11. Table: Person.PersonPhone Telephone number and type of a person. Columns Description / AttributesNData typeName Business entity identification number. Foreign key to Person.BusinessEntityID. intBusinessEntityID Telephone number identification number.nvarchar(25)PhoneNumber Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID. intPhoneNumberTypeID
  • 79. Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_PersonPhone_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID. Person.PersonPhone.BusinessEntityID = Person.Person.BusinessEntityID Person.Person 18 Generated with http://dataedo.com Title / Name / DescriptionJoinTable
  • 80. FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID Foreign key constraint referencing PhoneNumberType.PhoneNumberTypeID. Person.PersonPhone.PhoneNumberTy peID = Person.PhoneNumberType.PhoneNu mberTypeID Person.PhoneNumberType Unique keys Name / DescriptionColumns PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumb erTypeID Primary key (clustered) constraint
  • 81. BusinessEntityID, PhoneNumber, PhoneNumberTypeID Uses Name Person.PersonPhone Person.Person Person.PhoneNumberType 3.1.12. Table: Person.PhoneNumberType Type of phone number of a person. Columns Description / AttributesNData typeName Primary key for telephone number type records.
  • 82. Identity / Auto increment column intPhoneNumberTypeID Name of the telephone number typenvarchar(50)Name Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID Foreign key constraint referencing PhoneNumberType.PhoneNumberTypeID. Person.PhoneNumberType.PhoneNu mberTypeID = Person.PersonPhone.PhoneNumberTy
  • 83. peID Person.PersonPhone Unique keys Name / DescriptionColumns PK_PhoneNumberType_PhoneNumberTypeID Primary key (clustered) constraint PhoneNumberTypeID Used by Name Person.PhoneNumberType Person.PersonPhone 3.1.13. Table: Person.StateProvince State and province lookup table.
  • 84. 19 Generated with http://dataedo.com Columns Description / AttributesNData typeName Primary key for StateProvince records. Identity / Auto increment column intStateProvinceID ISO standard state or province code.nchar(3)StateProvinceCode ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. nvarchar(3)CountryRegionCode 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using
  • 85. CountryRegionCode. Default: 1 bitIsOnlyStateProvinceFlag State or province description.nvarchar(50)Name ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. intTerritoryID ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated.
  • 86. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_StateProvince_CountryRegion_CountryRegionCode Foreign key constraint referencing CountryRegion.CountryRegionCode. Person.StateProvince.CountryRegionC ode = Person.CountryRegion.CountryRegion Code Person.CountryRegion FK_StateProvince_SalesTerritory_TerritoryID
  • 87. Foreign key constraint referencing SalesTerritory.TerritoryID. Person.StateProvince.TerritoryID = Sales.SalesTerritory.TerritoryID Sales.SalesTerritory Linked from Title / Name / DescriptionJoinTable FK_Address_StateProvince_StateProvinceID Foreign key constraint referencing StateProvince.StateProvinceID. Person.StateProvince.StateProvinceID = Person.Address.StateProvinceID Person.Address FK_SalesTaxRate_StateProvince_StateProvinceID Foreign key constraint referencing StateProvince.StateProvinceID.
  • 88. Person.StateProvince.StateProvinceID = Sales.SalesTaxRate.StateProvinceID Sales.SalesTaxRate Unique keys Name / DescriptionColumns PK_StateProvince_StateProvinceID Primary key (clustered) constraint StateProvinceID AK_StateProvince_Name Unique nonclustered index. Name AK_StateProvince_rowguid Unique nonclustered index. Used to support replication samples. rowguid
  • 89. AK_StateProvince_StateProvinceCode_CountryRegionCode Unique nonclustered index. StateProvinceCode, CountryRegionCode 20 Generated with http://dataedo.com Uses Name Person.StateProvince Person.CountryRegion Sales.SalesTerritory Used by
  • 90. Name Person.StateProvince Person.Address Sales.SalesTaxRate 3.2. Views 3.2.1. View: Person.vAdditionalContactInfo Displays the contact name and content from each element in the xml column AdditionalContactInfo for that person. Columns Description / AttributesNData typeName intBusinessEntityID nvarchar(50)FirstName nvarchar(50)MiddleName
  • 92. datetimeModifiedDate 3.2.2. View: Person.vStateProvinceCountryRegion Joins StateProvince table with CountryRegion table. 21 Generated with http://dataedo.com Columns Description / AttributesNData typeName intStateProvinceID nchar(3)StateProvinceCode bitIsOnlyStateProvinceFlag nvarchar(50)StateProvinceName intTerritoryID
  • 93. nvarchar(3)CountryRegionCode nvarchar(50)CountryRegionName 22 Generated with http://dataedo.com 4. Human Resources Employees of Adventure Works Cycles 4.1. Tables 4.1.1. Table: HumanResources.Department Lookup table containing the departments within the Adventure Works Cycles company. Columns Description / AttributesNData typeName
  • 94. Primary key for Department records. Identity / Auto increment column smallintDepartmentID Name of the department.nvarchar(50)Name Name of the group to which the department belongs.nvarchar(50)GroupName Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_EmployeeDepartmentHistory_Department_DepartmentID Foreign key constraint referencing Department.DepartmentID. HumanResources.Department.Depart
  • 95. mentID = HumanResources.EmployeeDepartme ntHistory.DepartmentID HumanResources.EmployeeDepart mentHistory 23 Generated with http://dataedo.com Unique keys Name / DescriptionColumns PK_Department_DepartmentID Primary key (clustered) constraint DepartmentID AK_Department_Name
  • 96. Unique nonclustered index. Name Used by Name HumanResources.Department HumanResources.EmployeeDepartmentHistory 4.1.2. Table: HumanResources.Employee Employee information such as salary, department, and title. Columns Description / AttributesNData typeName Primary key for Employee records. Foreign key to BusinessEntity.BusinessEntityID. intBusinessEntityID
  • 97. Unique national identification number such as a social security number.nvarchar(15)NationalIDNumber Network login. Test2nvarchar(256)LoginID Where the employee is located in corporate hierarchy.hierarchyidOrganizationNode The depth of the employee in the corporate hierarchy. Computed: [OrganizationNode].[GetLevel]() smallintOrganizationLevel Work title such as Buyer or Sales Representative.nvarchar(50)JobTitle Date of birth.dateBirthDate M = Married, S = Singlenchar(1)MaritalStatus M = Male, F = Femalenchar(1)Gender Employee hired on this date.dateHireDate Job classification. 0 = Hourly, not exempt from collective
  • 98. bargaining. 1 = Salaried, exempt from collective bargaining. Default: 1 bitSalariedFlag Number of available vacation hours. Default: 0 smallintVacationHours Number of available sick leave hours. Default: 0 smallintSickLeaveHours 0 = Inactive, 1 = Active Default: 1 bitCurrentFlag ROWGUIDCOL number uniquely identifying the record. Used to support a
  • 99. merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate 24 Generated with http://dataedo.com Links to Title / Name / DescriptionJoinTable FK_Employee_Person_BusinessEntityID Foreign key constraint referencing Person.BusinessEntityID.
  • 100. HumanResources.Employee.BusinessE ntityID = Person.Person.BusinessEntityID Person.Person Linked from Title / Name / DescriptionJoinTable FK_EmployeeDepartmentHistory_Employee_BusinessEntityID Foreign key constraint referencing Employee.EmployeeID. HumanResources.Employee.BusinessE ntityID = HumanResources.EmployeeDepartme ntHistory.BusinessEntityID HumanResources.EmployeeDepart
  • 101. mentHistory FK_EmployeePayHistory_Employee_BusinessEntityID Foreign key constraint referencing Employee.EmployeeID. HumanResources.Employee.BusinessE ntityID = HumanResources.EmployeePayHistory .BusinessEntityID HumanResources.EmployeePayHist ory FK_JobCandidate_Employee_BusinessEntityID Foreign key constraint referencing Employee.EmployeeID. HumanResources.Employee.BusinessE
  • 102. ntityID = HumanResources.JobCandidate.Busin essEntityID HumanResources.JobCandidate FK_PurchaseOrderHeader_Employee_EmployeeID Foreign key constraint referencing Employee.EmployeeID. HumanResources.Employee.BusinessE ntityID = Purchasing.PurchaseOrderHeader.Em ployeeID Purchasing.PurchaseOrderHeader FK_SalesPerson_Employee_BusinessEntityID Foreign key constraint referencing Employee.EmployeeID.
  • 103. HumanResources.Employee.BusinessE ntityID = Sales.SalesPerson.BusinessEntityID Sales.SalesPerson Unique keys Name / DescriptionColumns PK_Employee_BusinessEntityID Primary key (clustered) constraint BusinessEntityID AK_Employee_LoginID Unique nonclustered index. LoginID AK_Employee_NationalIDNumber
  • 104. Unique nonclustered index. NationalIDNumber AK_Employee_rowguid Unique nonclustered index. Used to support replication samples. rowguid Triggers DescriptionWhenName INSTEAD OF DELETE trigger which keeps Employees from being deleted.Instead Of DeletedEmployee Uses Name HumanResources.Employee Person.Person 25 Generated with
  • 106. Description / AttributesNData typeName Employee identification number. Foreign key to Employee.BusinessEntityID.intBusinessEntityID Department in which the employee worked including currently. Foreign key to Department.DepartmentID. smallintDepartmentID Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID. tinyintShiftID Date the employee started work in the department.dateStartDate Date the employee left the department. NULL = Current department.dateEndDate Date and time the record was last updated. Default: getdate()
  • 107. datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_EmployeeDepartmentHistory_Department_DepartmentID Foreign key constraint referencing Department.DepartmentID. HumanResources.EmployeeDepartme ntHistory.DepartmentID = HumanResources.Department.Depart mentID HumanResources.Department FK_EmployeeDepartmentHistory_Employee_BusinessEntityID Foreign key constraint referencing Employee.EmployeeID. HumanResources.EmployeeDepartme
  • 108. ntHistory.BusinessEntityID = HumanResources.Employee.BusinessE ntityID HumanResources.Employee FK_EmployeeDepartmentHistory_Shift_ShiftID Foreign key constraint referencing Shift.ShiftID HumanResources.EmployeeDepartme ntHistory.ShiftID = HumanResources.Shift.ShiftID HumanResources.Shift Unique keys Name / DescriptionColumns
  • 109. PK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_ DepartmentID Primary key (clustered) constraint BusinessEntityID, StartDate, DepartmentID, ShiftID 26 Generated with http://dataedo.com Uses Name HumanResources.EmployeeDepartmentHistory HumanResources.Department HumanResources.Employee HumanResources.Shift
  • 110. 4.1.4. Table: HumanResources.EmployeePayHistory Employee pay history. Columns Description / AttributesNData typeName Employee identification number. Foreign key to Employee.BusinessEntityID.intBusinessEntityID Date the change in pay is effectivedatetimeRateChangeDate Salary hourly rate.moneyRate 1 = Salary received monthly, 2 = Salary received biweeklytinyintPayFrequency Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to
  • 111. Title / Name / DescriptionJoinTable FK_EmployeePayHistory_Employee_BusinessEntityID Foreign key constraint referencing Employee.EmployeeID. HumanResources.EmployeePayHistory .BusinessEntityID = HumanResources.Employee.BusinessE ntityID HumanResources.Employee Unique keys Name / DescriptionColumns PK_EmployeePayHistory_BusinessEntityID_RateChangeDate Primary key (clustered) constraint BusinessEntityID, RateChangeDate
  • 112. Uses Name HumanResources.EmployeePayHistory HumanResources.Employee 4.1.5. Table: HumanResources.JobCandidate Résumés submitted to Human Resources by job applicants. Columns Description / AttributesNData typeName Primary key for JobCandidate records. Identity / Auto increment column intJobCandidateID Employee identification number if applicant was hired. Foreign key to
  • 113. Employee.BusinessEntityID. intBusinessEntityID Résumé in XML format.xmlResume 27 Generated with http://dataedo.com Description / AttributesNData typeName Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_JobCandidate_Employee_Busi nessEntityID Foreign key constraint referencing Employee.EmployeeID.
  • 114. HumanResources.JobCandidate.Busin essEntityID = HumanResources.Employee.BusinessE ntityID HumanResources.Employee Unique keys Name / DescriptionColumns PK_JobCandidate_JobCandidateID Primary key (clustered) constraint JobCandidateID Uses Name HumanResources.JobCandidate
  • 115. HumanResources.Employee 4.1.6. Table: HumanResources.Shift Work shift lookup table. Columns Description / AttributesNData typeName Primary key for Shift records. Identity / Auto increment column tinyintShiftID Shift description.nvarchar(50)Name Shift start time.time(7)StartTime Shift end time.time(7)EndTime Date and time the record was last updated. Default: getdate() datetimeModifiedDate
  • 116. Linked from Title / Name / DescriptionJoinTable FK_EmployeeDepartmentHistory_Shift_ShiftID Foreign key constraint referencing Shift.ShiftID HumanResources.Shift.ShiftID = HumanResources.EmployeeDepartme ntHistory.ShiftID HumanResources.EmployeeDepart mentHistory Unique keys Name / DescriptionColumns PK_Shift_ShiftID
  • 117. Primary key (clustered) constraint ShiftID AK_Shift_Name Unique nonclustered index. Name AK_Shift_StartTime_EndTime Unique nonclustered index. StartTime, EndTime 28 Generated with http://dataedo.com Used by Name HumanResources.Shift HumanResources.EmployeeDepartmentHistory
  • 118. 4.2. Views 4.2.1. View: HumanResources.vEmployee Employee names and addresses. Columns Description / AttributesNData typeName intBusinessEntityID nvarchar(8)Title nvarchar(50)FirstName nvarchar(50)MiddleName nvarchar(50)LastName nvarchar(10)Suffix nvarchar(50)JobTitle
  • 120. Columns Description / AttributesNData typeName intBusinessEntityID nvarchar(8)Title nvarchar(50)FirstName nvarchar(50)MiddleName nvarchar(50)LastName nvarchar(10)Suffix 29 Generated with http://dataedo.com Description / AttributesNData typeName nvarchar(50)JobTitle
  • 121. nvarchar(50)Department nvarchar(50)GroupName dateStartDate 4.2.3. View: HumanResources.vEmployeeDepartmentHistory Returns employee name and current and previous departments. Columns Description / AttributesNData typeName intBusinessEntityID nvarchar(8)Title nvarchar(50)FirstName nvarchar(50)MiddleName nvarchar(50)LastName
  • 122. nvarchar(10)Suffix nvarchar(50)Shift nvarchar(50)Department nvarchar(50)GroupName dateStartDate dateEndDate 4.2.4. View: HumanResources.vJobCa ndidate Job candidate names and resumes. Columns Description / AttributesNData typeName Identity / Auto increment columnintJobCandidateID intBusinessEntityID nvarchar(30)Name.Prefix
  • 124. Description / AttributesNData typeName nvarchar(MAX)EMail nvarchar(MAX)WebSite datetimeModifiedDate 4.2.5. 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. Columns Description / AttributesNData typeName Identity / Auto increment columnintJobCandidateID
  • 126. 4.2.6. 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. Columns Description / AttributesNData typeName Identity / Auto increment columnintJobCandidateID datetimeEmp.StartDate datetimeEmp.EndDate nvarchar(100)Emp.OrgName nvarchar(100)Emp.JobTitle
  • 127. nvarchar(MAX)Emp.Responsibility nvarchar(MAX)Emp.FunctionCategory nvarchar(MAX)Emp.IndustryCategory nvarchar(MAX)Emp.Loc.CountryRegion nvarchar(MAX)Emp.Loc.State 31 Generated with http://dataedo.com Description / AttributesNData typeName nvarchar(MAX)Emp.Loc.City 4.3. Procedures 4.3.1. Procedure: dbo.uspGetEmployeeManagers Stored procedure using a recursive query to return the direct and indirect managers of the specified employee.
  • 128. Input/Output DescriptionData typeName Input parameter for the stored procedure uspGetEmployeeManagers. Enter a valid BusinessEntityID from the HumanResources.Employee table. intBusinessEntityID 4.3.2. Procedure: dbo.uspGetManagerEmployees Stored procedure using a recursive query to return the direct and indirect employees of the specified manager. Input/Output DescriptionData typeName Input parameter for the stored procedure uspGetManagerEmployees. Enter a valid BusinessEntityID of the manager from the
  • 129. HumanResources.Employee table. intBusinessEntityID 4.3.3. Procedure: dbo.uspSearchCandidateResumes Input/Output DescriptionData typeName nvarchar(1000)searchString bituseInflectional bituseThesaurus intlanguage 4.3.4. Procedure: HumanResources.uspUpdateEmployeeHireInfo Input/Output
  • 130. DescriptionData typeName Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid BusinessEntityID from the Employee table. intBusinessEntityID Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a title for the employee. nvarchar(50)JobTitle Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a hire date for the employee. datetimeHireDate Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the date the rate changed for the employee. datetimeRateChangeDate
  • 131. Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the new rate for the employee. moneyRate Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the pay frequency for the employee. tinyintPayFrequency 32 Generated with http://dataedo.com DescriptionData typeName Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the current flag for the employee. bitCurrentFlag
  • 132. 4.3.5. Procedure: HumanResources.uspUpdateEmployeeLogin Input/Output DescriptionData typeName Input parameter for the stored procedure uspUpdateEmployeeLogin. Enter a valid EmployeeID from the Employee table. intBusinessEntityID Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid ManagerID for the employee. hierarchyidOrganizationNode Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid login for the employee. nvarchar(256)LoginID
  • 133. Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a title for the employee. nvarchar(50)JobTitle Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a hire date for the employee. datetimeHireDate Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the current flag for the employee. bitCurrentFlag 4.3.6. Procedure: HumanResources.uspUpdateEmployeePersonalInfo Input/Output DescriptionData typeName
  • 134. Input parameter for the stored procedure uspUpdateEmployeePersonalInfo. Enter a valid BusinessEntityID from the HumanResources.Employee table. intBusinessEntityID Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a national ID for the employee. nvarchar(15)NationalIDNumber Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a birth date for the employee. datetimeBirthDate Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a marital status for the employee. nchar(1)MaritalStatus
  • 135. Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a gender for the employee. nchar(1)Gender 4.4. Functions 4.4.1. Function: dbo.ufnGetContactInformation Table value function returning the first name, last name, job title and contact type for a given contact. Input/Output DescriptionData typeName table typeReturns Input parameter for the table value function ufnGetContactInformation. Enter a valid PersonID from the Person.Contact table. intPersonID
  • 136. 33 Generated with http://dataedo.com 5. Products Products manufactured and sold by Adventure Works Cycles. 5.1. Tables 5.1.1. Table: Production.Culture Lookup table containing the languages in which some AdventureWorks data is stored. Columns Description / AttributesNData typeName Primary key for Culture records.nchar(6)CultureID Culture description.nvarchar(50)Name Date and time the record was last updated.
  • 137. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_ProductModelProductDescriptionCulture_Culture_CultureI D Foreign key constraint referencing Culture.CultureID. Production.Culture.CultureID = Production.ProductModelProductDesc riptionCulture.CultureID Production.ProductModelProductD escriptionCulture 34 Generated with
  • 138. http://dataedo.com Unique keys Name / DescriptionColumns PK_Culture_CultureID Primary key (clustered) constraint CultureID AK_Culture_Name Unique nonclustered index. Name Used by Name Production.Culture Production.ProductModelProductDescriptionCulture
  • 139. 5.1.2. Table: Production.Document Product maintenance documents. Columns Description / AttributesNData typeName Primary key for Document records.hierarchyidDocumentNode Depth in the document hierarchy. Computed: [DocumentNode].[GetLevel]() smallintDocumentLevel Title of the document.nvarchar(50)Title Employee who controls the document. Foreign key to Employee.BusinessEntityID intOwner 0 = This is a folder, 1 = This is a document. Default: 0
  • 140. bitFolderFlag File name of the documentnvarchar(400)FileName File extension indicating the document type. For example, .doc or .txt.nvarchar(8)FileExtension Revision number of the document.nchar(5)Revision Engineering change approval number. Default: 0 intChangeNumber 1 = Pending approval, 2 = Approved, 3 = ObsoletetinyintStatus Document abstract.nvarchar(MAX)DocumentSummary Complete document.varbinary(MAX)Document ROWGUIDCOL number uniquely identifying the record. Required for FileStream.
  • 141. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_ProductDocument_Document_DocumentNode Foreign key constraint referencing Document.DocumentNode. Production.Document.DocumentNode = Production.ProductDocument.Docum entNode
  • 142. Production.ProductDocument 35 Generated with http://dataedo.com Unique keys Name / DescriptionColumns PK_Document_DocumentNode Primary key (clustered) constraint DocumentNode AK_Document_DocumentLevel_DocumentNode Unique nonclustered index. DocumentLevel, DocumentNode AK_Document_rowguid Unique nonclustered index. Used to support FileStream. rowguid
  • 143. UQ__Document__F73921F793071A63rowguid Used by Name Production.Document Production.ProductDocument 5.1.3. Table: Production.Illustration Bicycle assembly diagrams. Columns Description / AttributesNData typeName Primary key for Illustration records. Identity / Auto increment column intIllustrationID Illustrations used in manufacturing instructions. Stored as
  • 144. XML.xmlDiagram Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_ProductModelIllustration_Illustration_IllustrationID Foreign key constraint referencing Illustration.IllustrationID. Production.Illustration.IllustrationID = Production.ProductModelIllustration.Ill ustrationID Production.ProductModelIllustratio n
  • 145. Unique keys Name / DescriptionColumns PK_Illustration_IllustrationID Primary key (clustered) constraint IllustrationID Used by Name Production.Illustration Production.ProductModelIllustration 5.1.4. Table: Production.Product Products sold or used in the manfacturing of sold products. 36 Generated with http://dataedo.com
  • 146. Columns Description / AttributesNData typeName Primary key for Product records. Identity / Auto increment column intProductID Name of the product.nvarchar(50)Name Unique product identification number.nvarchar(25)ProductNumber 0 = Product is purchased, 1 = Product is manufactured in-house. Default: 1 bitMakeFlag 0 = Product is not a salable item. 1 = Product is salable. Default: 1 bitFinishedGoodsFlag
  • 147. Product color.nvarchar(15)Color Minimum inventory quantity.smallintSafetyStockLevel Inventory level that triggers a purchase order or work order.smallintReorderPoint Standard cost of the product.moneyStandardCost Selling price.moneyListPrice Product size.nvarchar(5)Size Unit of measure for Size column.nchar(3)SizeUnitMeasureCode Unit of measure for Weight column.nchar(3)WeightUnitMeasureCode Product weight.decimal(8, 2)Weight Number of days required to manufacture the product.intDaysToManufacture R = Road, M = Mountain, T = Touring, S = Standardnchar(2)ProductLine
  • 148. H = High, M = Medium, L = Lownchar(2)Class W = Womens, M = Mens, U = Universalnchar(2)Style Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. intProductSubcategoryID Product is a member of this product model. Foreign key to ProductModel.ProductModelID. intProductModelID Date the product was available for sale.datetimeSellStartDate Date the product was no longer available for sale.datetimeSellEndDate Date the product was discontinued.datetimeDiscontinuedDate ROWGUIDCOL number uniquely identifying the record. Used to support a
  • 149. merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_Product_ProductModel_ProductModelID Foreign key constraint referencing ProductModel.ProductModelID. Production.Product.ProductModelID = Production.ProductModel.ProductMo delID
  • 150. Production.ProductModel FK_Product_ProductSubcategory_ProductSubcategoryID Foreign key constraint referencing ProductSubcategory.ProductSubcategoryID. Production.Product.ProductSubcatego ryID = Production.ProductSubcategory.Produ ctSubcategoryID Production.ProductSubcategory 37 Generated with http://dataedo.com Title / Name / DescriptionJoinTable
  • 151. FK_Product_UnitMeasure_SizeUnitMeasureCode Foreign key constraint referencing UnitMeasure.UnitMeasureCode. Production.Product.SizeUnitMeasureC ode = Production.UnitMeasure.UnitMeasure Code Production.UnitMeasure FK_Product_UnitMeasure_WeightUnitMeasureCode Foreign key constraint referencing UnitMeasure.UnitMeasureCode. Production.Product.WeightUnitMeasur eCode =
  • 152. Production.UnitMeasure.UnitMeasure Code Production.UnitMeasure Linked from Title / Name / DescriptionJoinTable FK_BillOfMaterials_Product_ComponentID Foreign key constraint referencing Product.ProductAssemblyID. Production.Product.ProductID = Production.BillOfMaterials.Component ID Production.BillOfMaterials FK_BillOfMaterials_Product_ProductAssemblyID Foreign key constraint referencing Product.ProductAssemblyID.
  • 153. Production.Product.ProductID = Production.BillOfMaterials.ProductAss emblyID Production.BillOfMaterials FK_ProductCostHistory_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Production.ProductCostHistory.Produc tID Production.ProductCostHistory FK_ProductDocument_Product_ProductID Foreign key constraint referencing Product.ProductID.
  • 154. Production.Product.ProductID = Production.ProductDocument.Product ID Production.ProductDocument FK_ProductInventory_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Production.ProductInventory.ProductI D Production.ProductInventory FK_ProductListPriceHistory_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID =
  • 155. Production.ProductListPriceHistory.Pro ductID Production.ProductListPriceHistory FK_ProductProductPhoto_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Production.ProductProductPhoto.Prod uctID Production.ProductProductPhoto FK_ProductReview_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID =
  • 156. Production.ProductReview.ProductID Production.ProductReview FK_ProductVendor_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Purchasing.ProductVendor.ProductID Purchasing.ProductVendor FK_PurchaseOrderDetail_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Purchasing.PurchaseOrderDetail.Prod uctID Purchasing.PurchaseOrderDetail User-defined relation
  • 157. Production.Product.ProductID = Sales.SalesOrderDetail.ProductID Sales.SalesOrderDetail FK_ShoppingCartItem_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Sales.ShoppingCartItem.ProductID Sales.ShoppingCartItem FK_SpecialOfferProduct_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Sales.SpecialOfferProduct.ProductID Sales.SpecialOfferProduct FK_TransactionHistory_Product_ProductID
  • 158. Foreign key constraint referencing Product.ProductID. Production.Product.ProductID = Production.TransactionHistory.Product ID Production.TransactionHistory User-defined relation Production.Product.ProductID = Production.TransactionHistoryArchive. ProductID Production.TransactionHistoryArchi ve FK_WorkOrder_Product_ProductID Foreign key constraint referencing Product.ProductID.
  • 159. Production.Product.ProductID = Production.WorkOrder.ProductID Production.WorkOrder 38 Generated with http://dataedo.com Unique keys Name / DescriptionColumns PK_Product_ProductID Primary key (clustered) constraint ProductID AK_Product_Name Unique nonclustered index. Name
  • 160. AK_Product_ProductNumber Unique nonclustered index. ProductNumber AK_Product_rowguid Unique nonclustered index. Used to support replication samples. rowguid Uses Name Production.Product Production.ProductModel Production.ProductSubcategory Production.UnitMeasure Production.UnitMeasure Used by
  • 163. Primary key for ProductCategory records. Identity / Auto increment column intProductCategoryID Category description.nvarchar(50)Name ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable
  • 164. FK_ProductSubcategory_ProductCategory_ProductCategoryID Foreign key constraint referencing ProductCategory.ProductCategoryID. Production.ProductCategory.ProductC ategoryID = Production.ProductSubcategory.Produ ctCategoryID Production.ProductSubcategory Unique keys Name / DescriptionColumns PK_ProductCategory_ProductCategoryID Primary key (clustered) constraint ProductCategoryID
  • 165. AK_ProductCategory_Name Unique nonclustered index. Name AK_ProductCategory_rowguid Unique nonclustered index. Used to support replication samples. rowguid Used by Name Production.ProductCategory Production.ProductSubcategory 5.1.6. Table: Production.ProductDescriptio n Product descriptions in several languages. Columns Description / AttributesNData typeName
  • 166. Primary key for ProductDescription records. Identity / Auto increment column intProductDescriptionID Description of the product.nvarchar(400)Description ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated. Default: getdate() datetimeModifiedDate 40 Generated with http://dataedo.com
  • 167. Linked from Title / Name / DescriptionJoinTable FK_ProductModelProductDescriptionCulture_ProductDescriptio n_Prod uctDescriptionID Foreign key constraint referencing ProductDescription.ProductDescriptionID. Production.ProductDescription.Produc tDescriptionID = Production.ProductModelProductDesc riptionCulture.ProductDescriptionID Production.ProductModelProductD
  • 168. escriptionCulture Unique keys Name / DescriptionColumns PK_ProductDescription_ProductDescriptionID Primary key (clustered) constraint ProductDescriptionID AK_ProductDescription_rowguid Unique nonclustered index. Used to support replication samples. rowguid Used by Name Production.ProductDescription Production.ProductModelProductDescriptionCulture 5.1.7. Table: Production.ProductDocument
  • 169. Cross-reference table mapping products to related product documents. Columns Description / AttributesNData typeName Product identification number. Foreign key to Product.ProductID.intProductID Document identification number. Foreign key to Document.DocumentNode. hierarchyidDocumentNode Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable
  • 170. FK_ProductDocument_Document_DocumentNode Foreign key constraint referencing Document.DocumentNode. Production.ProductDocument.Docum entNode = Production.Document.DocumentNode Production.Document FK_ProductDocument_Product_ProductID Foreign key constraint referencing Product.ProductID. Production.ProductDocument.Product ID = Production.Product.ProductID Production.Product Unique keys Name / DescriptionColumns
  • 171. PK_ProductDocument_ProductID_DocumentNode Primary key (clustered) constraint ProductID, DocumentNode Uses Name Production.ProductDocument Production.Document Production.Product 41 Generated with http://dataedo.com 5.1.8. Table: Production.ProductModel Product model classification. Columns
  • 172. Description / AttributesNData typeName Primary key for ProductModel records. Identity / Auto increment column intProductModelID Product model description.nvarchar(50)Name Detailed product catalog information in xml format.xmlCatalogDescription Manufacturing instructions in xml format.xmlInstructions ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() uniqueidentifierrowguid Date and time the record was last updated.
  • 173. Default: getdate() datetimeModifiedDate Linked from Title / Name / DescriptionJoinTable FK_Product_ProductModel_ProductModelID Foreign key constraint referencing ProductModel.ProductModelID. Production.ProductModel.ProductMo delID = Production.Product.ProductModelID Production.Product FK_ProductModelIllustration_ProductModel_ProductModelID Foreign key constraint referencing ProductModel.ProductModelID.
  • 175. Production.ProductModelProductDesc riptionCulture.ProductModelID Production.ProductModelProductD escriptionCulture Unique keys Name / DescriptionColumns PK_ProductModel_ProductModelID Primary key (clustered) constraint ProductModelID AK_ProductModel_Name Unique nonclustered index. Name AK_ProductModel_rowguid Unique nonclustered index. Used to support replication samples.
  • 176. rowguid Used by Name Production.ProductModel Production.Product Production.ProductModelIllustration Production.ProductModelProductDescriptionCulture 5.1.9. Table: Production.ProductModelIllustration Cross-reference table mapping product models and illustrations. 42 Generated with http://dataedo.com Columns
  • 177. Description / AttributesNData typeName Primary key. Foreign key to ProductModel.ProductModelID.intProductModelID Primary key. Foreign key to Illustration.IllustrationID.intIllustrationID Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_ProductModelIllustration_Illustration_IllustrationID Foreign key constraint referencing Illustration.IllustrationID. Production.ProductModelIllustra tion.Ill ustrationID =
  • 178. Production.Illustration.IllustrationID Production.Illustration FK_ProductModelIllustration_ProductModel_ProductModelID Foreign key constraint referencing ProductModel.ProductModelID. Production.ProductModelIllustration.Pr oductModelID = Production.ProductModel.ProductMo delID Production.ProductModel Unique keys Name / DescriptionColumns PK_ProductModelIllustration_ProductModelID_IllustrationID
  • 179. Primary key (clustered) constraint ProductModelID, IllustrationID Uses Name Production.ProductModelIllustration Production.Illustration Production.ProductModel 5.1.10. Table: Production.ProductModelProductDescriptionCulture Cross-reference table mapping product descriptions and the language the description is written in. Columns Description / AttributesNData typeName Primary key. Foreign key to ProductModel.ProductModelID.intProductModelID
  • 180. Primary key. Foreign key to ProductDescription.ProductDescriptionID.intProductDescription ID Culture identification number. Foreign key to Culture.CultureID.nchar(6)CultureID Date and time the record was last updated. Default: getdate() datetimeModifiedDate Links to Title / Name / DescriptionJoinTable FK_ProductModelProductDescriptionCulture_Culture_CultureI D Foreign key constraint referencing Culture.CultureID. Production.ProductModelProductDesc riptionCulture.CultureID =
  • 181. Production.Culture.CultureID Production.Culture FK_ProductModelProductDescriptionCulture_ProductDescriptio n_Prod uctDescriptionID Foreign key constraint referencing ProductDescription.ProductDescriptionID. Production.ProductModelProductDesc riptionCulture.ProductDescriptionID = Production.ProductDescription.Produc tDescriptionID Production.ProductDescription 43 Generated with
  • 182. http://dataedo.com Title / Name / DescriptionJoinTable FK_ProductModelProductDescriptionCulture_ProductModel_Pr oductM odelID Foreign key constraint referencing ProductModel.ProductModelID. Production.ProductModelProductDesc riptionCulture.ProductModelID = Production.ProductModel.ProductMo delID Production.ProductModel Unique keys
  • 183. Name / DescriptionColumns PK_ProductModelProductDescriptionCulture_ProductModelID_ ProductDescriptionID_CultureID Primary key (clustered) constraint ProductModelID, ProductDescriptionID, CultureID Uses Name Production.ProductModelProductDescriptionCulture Production.Culture Production.ProductDescription Production.ProductModel 5.1.11. Table: Production.ProductPhoto