Escolar Documentos
Profissional Documentos
Cultura Documentos
AdventureWorks2012
I
Person.Password (19,972 rows) .............................................................................. 12
One way hashed authentication information
II
Production.ProductModelIllustration (7 rows)........................................................ 26
Cross-reference table mapping product models and illustrations.
III
Customer credit card information.
IV
Tables:
Campo
Column Data Type Longitud Identity Nullable COLLATION
Calculado
PK SystemInformationID tinyint 1 X
Primary key for AWBuildVersion records.
Database Version nvarchar(25) 50
SQL_Latin1_Gene
ral_CP1_CI_AS
Version number of the database in 9.yy.mm.dd.00 format.
VersionDate datetime 8
Date and time the record was last updated.
ModifiedDate datetime 8
Date and time the record was last updated.
Indexes:
SystemInformationID
Indexes:
DatabaseLogID
Indexes:
ErrorLogID
Page 6 of 53
Indexes:
DepartmentID
AK_Department_Name (Unique)
Name
Referenced by:
HumanResources.EmployeeDepartmentHistory (DepartmentID)
ModifiedDate datetime 8
Date and time the record was last updated.
Page 7 of 53
Indexes:
BusinessEntityID
AK_Employee_LoginID (Unique)
LoginID
AK_Employee_NationalIDNumber (Unique)
NationalIDNumber
AK_Employee_rowguid (Unique)
rowguid
IX_Employee_OrganizationLevel_OrganizationNode
OrganizationLevel
OrganizationNode
IX_Employee_OrganizationNode
OrganizationNode
References:
Person.Person (BusinessEntityID)
Referenced by:
HumanResources.EmployeeDepartmentHistory (BusinessEntityID)
HumanResources.EmployeePayHistory (BusinessEntityID)
HumanResources.JobCandidate (BusinessEntityID)
Sales.SalesPerson (BusinessEntityID)
Triggers:
Page 8 of 53
Table HumanResources.EmployeeDepartmentHistory (296 rows)
Indexes:
PK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_DepartmentID (Primary Key) (Clustered)
BusinessEntityID
StartDate
DepartmentID
ShiftID
IX_EmployeeDepartmentHistory_DepartmentID
Nonclustered index.
DepartmentID
IX_EmployeeDepartmentHistory_ShiftID
Nonclustered index.
ShiftID
References:
HumanResources.Department (DepartmentID)
HumanResources.Employee (BusinessEntityID)
HumanResources.Shift (ShiftID)
Page 9 of 53
Table HumanResources.EmployeePayHistory (316 rows)
Indexes:
BusinessEntityID
RateChangeDate
References:
HumanResources.Employee (BusinessEntityID)
Resume xml -1 X
Résumé in XML format.
ModifiedDate datetime 8
Date and time the record was last updated.
Indexes:
JobCandidateID
IX_JobCandidate_BusinessEntityID
Page 10 of 53
Nonclustered index.
BusinessEntityID
References:
HumanResources.Employee (BusinessEntityID)
Indexes:
ShiftID
AK_Shift_Name (Unique)
Name
AK_Shift_StartTime_EndTime (Unique)
StartTime
EndTime
Page 11 of 53
Column Data Type Campo Longitud Identity Nullable COLLATION
Calculado
PK AddressID int 4 X
Primary key for Address records.
UK AddressLine1 nvarchar(60) 120 SQL_Latin1_Ge
neral_CP1_CI_A
S
First street address line.
UK AddressLine2 nvarchar(60) 120 X SQL_Latin1_Ge
neral_CP1_CI_A
S
Second street address line.
UK City nvarchar(30) 60 SQL_Latin1_Ge
neral_CP1_CI_A
S
Name of the city.
UK, FK StateProvinceID int 40
Unique identification number for the state or province. Foreign key to StateProvince
table.
UK PostalCode nvarchar(15) 30 SQL_Latin1_Ge
neral_CP1_CI_A
S
Postal code for the street address.
SpatialLocation geography -1 X
Latitude and longitude of this address.
UK rowguid uniqueidentifier 16
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDate datetime 8
Date and time the record was last updated.
Indexes:
AddressID
AK_Address_rowguid (Unique)
rowguid
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode (Unique)
Nonclustered index.
AddressLine1
AddressLine2
City
StateProvinceID
PostalCode
IX_Address_StateProvinceID
Nonclustered index.
StateProvinceID
References:
Person.StateProvince (StateProvinceID)
Referenced by:
Person.BusinessEntityAddress (AddressID)
ModifiedDate datetime 8
Date and time the record was last updated.
Indexes:
AddressTypeID
AK_AddressType_Name (Unique)
Name
AK_AddressType_rowguid (Unique)
rowguid
Referenced by:
Person.BusinessEntityAddress (AddressTypeID)
Page 13 of 53
Indexes:
AK_BusinessEntity_rowguid (Unique)
rowguid
Referenced by:
Person.BusinessEntityAddress (BusinessEntityID)
Person.BusinessEntityContact (BusinessEntityID)
Person.Person (BusinessEntityID)
Purchasing.Vendor (BusinessEntityID)
Sales.Store (BusinessEntityID)
Indexes:
BusinessEntityID
AddressID
AddressTypeID
AK_BusinessEntityAddress_rowguid (Unique)
rowguid
IX_BusinessEntityAddress_AddressID
Nonclustered index.
AddressID
IX_BusinessEntityAddress_AddressTypeID
Nonclustered index.
Page 14 of 53
AddressTypeID
References:
Person.Address (AddressID)
Person.AddressType (AddressTypeID)
Person.BusinessEntity (BusinessEntityID)
Indexes:
BusinessEntityID
PersonID
ContactTypeID
AK_BusinessEntityContact_rowguid (Unique)
rowguid
IX_BusinessEntityContact_ContactTypeID
Nonclustered index.
ContactTypeID
IX_BusinessEntityContact_PersonID
Nonclustered index.
PersonID
References:
Person.BusinessEntity (BusinessEntityID)
Person.ContactType (ContactTypeID)
Page 15 of 53
Lookup table containing the types of business entity contacts.
Indexes:
ContactTypeID
AK_ContactType_Name (Unique)
Name
Referenced by:
Person.BusinessEntityContact (ContactTypeID)
Lookup table containing the ISO standard codes for countries and regions.
Indexes:
CountryRegionCode
AK_CountryRegion_Name (Unique)
Name
Referenced by:
Person.StateProvince (CountryRegionCode)
Sales.CountryRegionCurrency (CountryRegionCode)
Sales.SalesTerritory (CountryRegionCode)
Page 16 of 53
Where to send a person email.
Indexes:
BusinessEntityID
EmailAddressID
IX_EmailAddress_EmailAddress
Nonclustered index.
EmailAddress
References:
Person.Person (BusinessEntityID)
Indexes:
BusinessEntityID
References:
Page 17 of 53
Person.Person (BusinessEntityID)
Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.
Indexes:
BusinessEntityID
AK_Person_rowguid (Unique)
rowguid
PXML_Person_AddContact (XML)
AdditionalContactInfo
PXML_Person_Demographics (XML)
Page 18 of 53
Primary XML index.
Demographics
XMLPATH_Person_Demographics (XML)
Demographics
XMLPROPERTY_Person_Demographics (XML)
Demographics
XMLVALUE_Person_Demographics (XML)
Demographics
IX_Person_LastName_FirstName_MiddleName
LastName
FirstName
MiddleName
References:
Person.BusinessEntity (BusinessEntityID)
Referenced by:
HumanResources.Employee (BusinessEntityID)
Person.EmailAddress (BusinessEntityID)
Person.Password (BusinessEntityID)
Person.PersonPhone (BusinessEntityID)
Sales.PersonCreditCard (BusinessEntityID)
Triggers:
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.
Used by:
Page 19 of 53
Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
BusinessEntityID
PhoneNumber
PhoneNumberTypeID
IX_PersonPhone_PhoneNumber
Nonclustered index.
PhoneNumber
References:
Person.Person (BusinessEntityID)
Person.PhoneNumberType (PhoneNumberTypeID)
Indexes:
PhoneNumberTypeID
Referenced by:
Person.PersonPhone (PhoneNumberTypeID)
Page 20 of 53
0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using
CountryRegionCode.
UK Name Name(nvarchar(50))
State or province description.
FK TerritoryID int
ID of the territory in which the state or province is located. Foreign key to
SalesTerritory.SalesTerritoryID.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
StateProvinceID
AK_StateProvince_Name (Unique)
Name
AK_StateProvince_rowguid (Unique)
rowguid
AK_StateProvince_StateProvinceCode_CountryRegionCode (Unique)
StateProvinceCode
CountryRegionCode
References:
Person.CountryRegion (CountryRegionCode)
Sales.SalesTerritory (TerritoryID)
Referenced by:
Person.Address (StateProvinceID)
Sales.SalesTaxRate (StateProvinceID)
Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent
product and its components.
Page 21 of 53
EndDate datetime X
Date the component stopped being used in the assembly item.
FK UnitMeasureCode nchar(3)
Standard code identifying the unit of measure for the quantity.
BOMLevel smallint
Indicates the depth the component is from its parent (AssemblyID).
PerAssemblyQty decimal(8,2) 1.00
Quantity of the component needed to create the assembly.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
BillOfMaterialsID
Clustered index.
ProductAssemblyID
ComponentID
StartDate
IX_BillOfMaterials_UnitMeasureCode
Nonclustered index.
UnitMeasureCode
References:
Production.UnitMeasure (UnitMeasureCode)
Lookup table containing the languages in which some AdventureWorks data is stored.
Indexes:
CultureID
AK_Culture_Name (Unique)
Page 22 of 53
Name
Referenced by:
Production.ProductModelProductDescriptionCulture (CultureID)
Indexes:
DocumentNode
AK_Document_DocumentLevel_DocumentNode (Unique)
DocumentLevel
DocumentNode
AK_Document_rowguid (Unique)
rowguid
Page 23 of 53
UQ Document F73921F793071A63 (Unique)
rowguid
IX_Document_FileName_Revision
FileName
Revision
References:
Referenced by:
Production.ProductDocument (DocumentNode)
Indexes:
IllustrationID
Referenced by:
Production.ProductModelIllustration (IllustrationID)
Indexes:
Page 24 of 53
PK_Location_LocationID (Primary Key) (Clustered)
LocationID
AK_Location_Name (Unique)
Name
Referenced by:
Production.ProductInventory (LocationID)
Production.WorkOrderRouting (LocationID)
Page 25 of 53
Product is a member of this product subcategory. Foreign key to
ProductSubCategory.ProductSubCategoryID.
FK ProductModelID int X
Product is a member of this product model. Foreign key to
ProductModel.ProductModelID.
SellStartDate datetime
Date the product was available for sale.
SellEndDate datetime X
Date the product was no longer available for sale.
DiscontinuedDate datetime X
Date the product was discontinued.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
ProductID
AK_Product_Name (Unique)
Name
AK_Product_ProductNumber (Unique)
ProductNumber
AK_Product_rowguid (Unique)
rowguid
References:
Production.ProductModel (ProductModelID)
Production.ProductSubcategory (ProductSubcategoryID)
Referenced by:
Production.ProductCostHistory (ProductID)
Production.ProductDocument (ProductID)
Production.ProductInventory (ProductID)
Production.ProductListPriceHistory (ProductID)
Production.ProductProductPhoto (ProductID)
Page 26 of 53
Production.ProductReview (ProductID)
Production.TransactionHistory (ProductID)
Production.WorkOrder (ProductID)
Purchasing.ProductVendor (ProductID)
Purchasing.PurchaseOrderDetail (ProductID)
Sales.ShoppingCartItem (ProductID)
Sales.SpecialOfferProduct (ProductID)
Indexes:
ProductCategoryID
AK_ProductCategory_Name (Unique)
Name
AK_ProductCategory_rowguid (Unique)
rowguid
Referenced by:
Production.ProductSubcategory (ProductCategoryID)
Page 27 of 53
StandardCost money
Standard cost of the product.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
ProductID
StartDate
References:
Production.Product (ProductID)
Indexes:
ProductDescriptionID
AK_ProductDescription_rowguid (Unique)
rowguid
Referenced by:
Production.ProductModelProductDescriptionCulture (ProductDescriptionID)
Page 28 of 53
Indexes:
ProductID
DocumentNode
References:
Production.Document (DocumentNode)
Production.Product (ProductID)
Indexes:
ProductID
LocationID
References:
Production.Location (LocationID)
Production.Product (ProductID)
Page 29 of 53
List price end date
ListPrice money
Product list price.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
ProductID
StartDate
References:
Production.Product (ProductID)
Indexes:
ProductModelID
AK_ProductModel_Name (Unique)
Name
AK_ProductModel_rowguid (Unique)
rowguid
PXML_ProductModel_CatalogDescription (XML)
CatalogDescription
Page 30 of 53
PXML_ProductModel_Instructions (XML)
Instructions
Referenced by:
Production.Product (ProductModelID)
Production.ProductModelIllustration (ProductModelID)
Production.ProductModelProductDescriptionCulture (ProductModelID)
Indexes:
ProductModelID
IllustrationID
References:
Production.Illustration (IllustrationID)
Production.ProductModel (ProductModelID)
Cross-reference table mapping product descriptions and the language the description is written in.
Indexes:
Page 31 of 53
ProductModelID
ProductDescriptionID
CultureID
References:
Production.Culture (CultureID)
Production.ProductDescription (ProductDescriptionID)
Production.ProductModel (ProductModelID)
Product images.
Indexes:
ProductPhotoID
Referenced by:
Production.ProductProductPhoto (ProductPhotoID)
Indexes:
Page 32 of 53
Primary key (clustered) constraint
ProductID
ProductPhotoID
References:
Production.Product (ProductID)
Production.ProductPhoto (ProductPhotoID)
Indexes:
ProductReviewID
IX_ProductReview_ProductID_Name
Nonclustered index.
ProductID
ReviewerName
Comments (Included)
References:
Production.Product (ProductID)
Page 33 of 53
Product category identification number. Foreign key to
ProductCategory.ProductCategoryID.
UK Name Name(nvarchar(50))
Subcategory description.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
ProductSubcategoryID
AK_ProductSubcategory_Name (Unique)
Name
AK_ProductSubcategory_rowguid (Unique)
rowguid
References:
Production.ProductCategory (ProductCategoryID)
Referenced by:
Production.Product (ProductSubcategoryID)
Indexes:
ScrapReasonID
AK_ScrapReason_Name (Unique)
Name
Referenced by:
Page 34 of 53
Production.WorkOrder (ScrapReasonID)
Record of each purchase order, sales order, or work order transaction year to date.
Indexes:
TransactionID
IX_TransactionHistory_ProductID
Nonclustered index.
ProductID
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
Nonclustered index.
ReferenceOrderID
ReferenceOrderLineID
References:
Production.Product (ProductID)
Used by:
Page 35 of 53
Table Production.TransactionHistoryArchive (89,253 rows)
Indexes:
TransactionID
IX_TransactionHistoryArchive_ProductID
Nonclustered index.
ProductID
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
Nonclustered index.
ReferenceOrderID
ReferenceOrderLineID
Indexes:
Page 36 of 53
Primary key (clustered) constraint
UnitMeasureCode
AK_UnitMeasure_Name (Unique)
Name
Referenced by:
Production.BillOfMaterials (UnitMeasureCode)
Purchasing.ProductVendor (UnitMeasureCode)
Indexes:
WorkOrderID
IX_WorkOrder_ProductID
Nonclustered index.
ProductID
IX_WorkOrder_ScrapReasonID
Nonclustered index.
Page 37 of 53
ScrapReasonID
References:
Production.Product (ProductID)
Production.ScrapReason (ScrapReasonID)
Referenced by:
Production.WorkOrderRouting (WorkOrderID)
Triggers:
AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder
table.
Indexes:
WorkOrderID
ProductID
OperationSequence
Page 38 of 53
IX_WorkOrderRouting_ProductID
Nonclustered index.
ProductID
References:
Production.Location (LocationID)
Production.WorkOrder (WorkOrderID)
Indexes:
ProductID
BusinessEntityID
IX_ProductVendor_BusinessEntityID
Nonclustered index.
BusinessEntityID
IX_ProductVendor_UnitMeasureCode
Nonclustered index.
UnitMeasureCode
References:
Page 39 of 53
Production.Product (ProductID)
Production.UnitMeasure (UnitMeasureCode)
Purchasing.Vendor (BusinessEntityID)
Indexes:
PurchaseOrderID
PurchaseOrderDetailID
IX_PurchaseOrderDetail_ProductID
Nonclustered index.
ProductID
References:
Production.Product (ProductID)
Purchasing.PurchaseOrderHeader (PurchaseOrderID)
Triggers:
AFTER INSERT trigger that inserts a row in the TransactionHistory table and updates the
PurchaseOrderHeader.SubTotal column.
Page 40 of 53
uPurchaseOrderDetail (After Update)
AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in
PurchaseOrderDetail and updates the PurchaseOrderHeader.SubTotal column.
Indexes:
PurchaseOrderID
IX_PurchaseOrderHeader_EmployeeID
Nonclustered index.
EmployeeID
IX_PurchaseOrderHeader_VendorID
Nonclustered index.
VendorID
References:
Purchasing.ShipMethod (ShipMethodID)
Page 41 of 53
Purchasing.Vendor (VendorID -> BusinessEntityID)
Referenced by:
Purchasing.PurchaseOrderDetail (PurchaseOrderID)
Triggers:
AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the PurchaseOrderHeader
table.
Used by:
Indexes:
ShipMethodID
AK_ShipMethod_Name (Unique)
Name
AK_ShipMethod_rowguid (Unique)
rowguid
Referenced by:
Purchasing.PurchaseOrderHeader (ShipMethodID)
Sales.SalesOrderHeader (ShipMethodID)
Page 42 of 53
Table Purchasing.Vendor (104 rows)
Companies from whom Adventure Works Cycles purchases parts or other goods.
Indexes:
BusinessEntityID
AK_Vendor_AccountNumber (Unique)
AccountNumber
References:
Person.BusinessEntity (BusinessEntityID)
Referenced by:
Purchasing.ProductVendor (BusinessEntityID)
Triggers:
Page 43 of 53
Date and time the record was last updated.
Indexes:
CountryRegionCode
CurrencyCode
IX_CountryRegionCurrency_CurrencyCode
Nonclustered index.
CurrencyCode
References:
Person.CountryRegion (CountryRegionCode)
Sales.Currency (CurrencyCode)
Indexes:
CreditCardID
AK_CreditCard_CardNumber (Unique)
CardNumber
Referenced by:
Sales.PersonCreditCard (CreditCardID)
Sales.SalesOrderHeader (CreditCardID)
Page 44 of 53
Lookup table containing standard ISO currencies.
Indexes:
CurrencyCode
AK_Currency_Name (Unique)
Name
Referenced by:
Sales.CountryRegionCurrency (CurrencyCode)
Indexes:
CurrencyRateID
AK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCode (Unique)
Page 45 of 53
Unique nonclustered index.
CurrencyRateDate
FromCurrencyCode
ToCurrencyCode
References:
Referenced by:
Sales.SalesOrderHeader (CurrencyRateID)
Current customer information. Also see the Person and Store tables.
Indexes:
CustomerID
AK_Customer_AccountNumber (Unique)
AccountNumber
AK_Customer_rowguid (Unique)
rowguid
IX_Customer_TerritoryID
Nonclustered index.
TerritoryID
References:
Page 46 of 53
Person.Person (PersonID -> BusinessEntityID)
Sales.SalesTerritory (TerritoryID)
Referenced by:
Sales.SalesOrderHeader (CustomerID)
Used by:
Cross-reference table mapping people to their credit card information in the CreditCard table.
Indexes:
BusinessEntityID
CreditCardID
References:
Person.Person (BusinessEntityID)
Sales.CreditCard (CreditCardID)
Page 47 of 53
Discount amount.
LineTotal numeric(38,6)
Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
SalesOrderID
SalesOrderDetailID
AK_SalesOrderDetail_rowguid (Unique)
rowguid
IX_SalesOrderDetail_ProductID
Nonclustered index.
ProductID
References:
Sales.SalesOrderHeader (SalesOrderID)
Triggers:
AFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in
SalesOrderDetail and updates the SalesOrderHeader.SubTotal column.
Page 48 of 53
Unique sales order identification number.
PurchaseOrderNumber OrderNumber(nvarchar(25)) X
Customer purchase order number reference.
AccountNumber AccountNumber(nvarchar(15)) X
Financial accounting number reference.
FK CustomerID int
Customer identification number. Foreign key to Customer.BusinessEntityID.
FK SalesPersonID int X
Sales person who created the sales order. Foreign key to SalesPerson.BusinessEntityID.
FK TerritoryID int X
Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID.
FK BillToAddressID int
Customer billing address. Foreign key to Address.AddressID.
FK ShipToAddressID int
Customer shipping address. Foreign key to Address.AddressID.
FK ShipMethodID int
Shipping method. Foreign key to ShipMethod.ShipMethodID.
FK CreditCardID int X
Credit card identification number. Foreign key to CreditCard.CreditCardID.
CreditCardApprovalCode varchar(15) X
Approval code provided by the credit card company.
FK CurrencyRateID int X
Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID.
SubTotal money 0.00
Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate
SalesOrderID.
TaxAmt money 0.00
Tax amount.
Freight money 0.00
Shipping cost.
TotalDue money
Total due from customer. Computed as Subtotal + TaxAmt + Freight.
Comment nvarchar(128) X
Sales representative comments.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
SalesOrderID
AK_SalesOrderHeader_rowguid (Unique)
rowguid
AK_SalesOrderHeader_SalesOrderNumber (Unique)
SalesOrderNumber
IX_SalesOrderHeader_CustomerID
Page 49 of 53
Nonclustered index.
CustomerID
IX_SalesOrderHeader_SalesPersonID
Nonclustered index.
SalesPersonID
References:
Purchasing.ShipMethod (ShipMethodID)
Sales.CreditCard (CreditCardID)
Sales.CurrencyRate (CurrencyRateID)
Sales.Customer (CustomerID)
Sales.SalesTerritory (TerritoryID)
Referenced by:
Sales.SalesOrderDetail (SalesOrderID)
Sales.SalesOrderHeaderSalesReason (SalesOrderID)
Triggers:
AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the SalesOrderHeader
table.Updates the SalesYTD column in the SalesPerson and SalesTerritory tables.
Used by:
Indexes:
SalesOrderID
SalesReasonID
References:
Page 50 of 53
Sales.SalesOrderHeader (SalesOrderID)
Sales.SalesReason (SalesReasonID)
Indexes:
BusinessEntityID
AK_SalesPerson_rowguid (Unique)
rowguid
References:
HumanResources.Employee (BusinessEntityID)
Sales.SalesTerritory (TerritoryID)
Referenced by:
Sales.SalesPersonQuotaHistory (BusinessEntityID)
Sales.SalesTerritoryHistory (BusinessEntityID)
Used by:
Page 51 of 53
Table Sales.SalesPersonQuotaHistory (163 rows)
Indexes:
BusinessEntityID
QuotaDate
AK_SalesPersonQuotaHistory_rowguid (Unique)
rowguid
References:
Sales.SalesPerson (BusinessEntityID)
Indexes:
SalesReasonID
Referenced by:
Sales.SalesOrderHeaderSalesReason (SalesReasonID)
Page 52 of 53
Table Sales.SalesTaxRate (29 rows)
Indexes:
SalesTaxRateID
AK_SalesTaxRate_rowguid (Unique)
rowguid
AK_SalesTaxRate_StateProvinceID_TaxType (Unique)
StateProvinceID
TaxType
References:
Person.StateProvince (StateProvinceID)
Page 53 of 53
SalesLastYear money 0.00
Sales in the territory the previous year.
CostYTD money 0.00
Business costs in the territory year to date.
CostLastYear money 0.00
Business costs in the territory the previous year.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
TerritoryID
AK_SalesTerritory_Name (Unique)
Name
AK_SalesTerritory_rowguid (Unique)
rowguid
References:
Person.CountryRegion (CountryRegionCode)
Referenced by:
Person.StateProvince (TerritoryID)
Sales.Customer (TerritoryID)
Sales.SalesOrderHeader (TerritoryID)
Sales.SalesPerson (TerritoryID)
Sales.SalesTerritoryHistory (TerritoryID)
Used by:
Page 54 of 53
Date the sales representative left work in the territory.
UK rowguid uniqueidentifier newid()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
BusinessEntityID
StartDate
TerritoryID
AK_SalesTerritoryHistory_rowguid (Unique)
rowguid
References:
Sales.SalesPerson (BusinessEntityID)
Sales.SalesTerritory (TerritoryID)
Indexes:
ShoppingCartItemID
IX_ShoppingCartItem_ShoppingCartID_ProductID
Nonclustered index.
ShoppingCartID
ProductID
References:
Page 55 of 53
Production.Product (ProductID)
Indexes:
SpecialOfferID
AK_SpecialOffer_rowguid (Unique)
rowguid
Referenced by:
Sales.SpecialOfferProduct (SpecialOfferID)
Page 56 of 53
ROWGUIDCOL number uniquely identifying the record. Used to support a merge
replication sample.
ModifiedDate datetime getdate()
Date and time the record was last updated.
Indexes:
SpecialOfferID
ProductID
AK_SpecialOfferProduct_rowguid (Unique)
rowguid
IX_SpecialOfferProduct_ProductID
Nonclustered index.
ProductID
References:
Production.Product (ProductID)
Sales.SpecialOffer (SpecialOfferID)
Referenced by:
Indexes:
BusinessEntityID
Page 57 of 53
AK_Store_rowguid (Unique)
rowguid
PXML_Store_Demographics (XML)
Demographics
IX_Store_SalesPersonID
Nonclustered index.
SalesPersonID
References:
Person.BusinessEntity (BusinessEntityID)
Referenced by:
Page 58 of 53
Page 59 of 53