Sei sulla pagina 1di 1
AdventureWorks OLTP Schema November 2005 Sales CreditCard ContactCreditCard SalesPersonQuotaHistory PK CreditCardID
AdventureWorks OLTP Schema
November 2005
Sales
CreditCard
ContactCreditCard
SalesPersonQuotaHistory
PK
CreditCardID
PK,FK2
ContactID
PK,FK1
SalesPersonID
SalesPerson
PK,FK1
CreditCardID
Best Print Results if:
CardType
PK
QuotaDate
U1
CardNumber
11X17 paper
Landscape
Fit to 1 sheet
PK,FK1
SalesPersonID
SalesOrderHeaderSalesReason
Samples and Sample Databases at
http://CodePlex.com/SqlServerSamples
SpecialOffer
ModifiedDate
ExpMonth
SalesQuota
PK,FK1
SalesOrderID
ExpYear
PK
SpecialOfferID
FK2
TerritoryID
U1
rowguid
PK,FK2
SalesReasonID
ModifiedDate
SalesQuota
ModifiedDate
SalesTerritoryHistory
Description
Bonus
SalesOrderHeader
ModifiedDate
DiscountPct
PK,FK1
SalesPersonID
CommissionPct
PK
SalesOrderID
Type
dbo
PK,FK2
TerritoryID
SalesYTD
Category
PK
StartDate
SalesLastYear
SalesReason
RevisionNumber
StartDate
U1
rowguid
ErrorLog
OrderDate
PK
SalesReasonID
EndDate
DatabaseLog
EndDate
ModifiedDate
DueDate
Currency
MinQty
PK
ErrorLogID
CurrencyRate
U1
rowguid
PK
DatabaseLogID
ShipDate
Name
MaxQty
ModifiedDate
PK
CurrencyCode
Status
PK
CurrencyRateID
ReasonType
U1
rowguid
ErrorTime
PostTime
OnlineOrderFlag
ModifiedDate
ModifiedDate
AWBuildVersion
UserName
U1
Name
DatabaseUser
U2
SalesOrderNumber
U1
CurrencyRateDate
ErrorNumber
ModifiedDate
PK
SystemInformationID
Event
PurchaseOrderNumber
FK1,U1
FromCurrencyCode
ErrorSeverity
Schema
AccountNumber
FK2,U1
ToCurrencyCode
ErrorState
SalesTerritory
Database Version
Object
FK6
CustomerID
AverageRate
ErrorProcedure
VersionDate
ModifiedDate
TSQL
PK
TerritoryID
FK3
ContactID
EndOfDayRate
ErrorLine
SalesOrderDetail
XmlEvent
FK7
SalesPersonID
ModifiedDate
ErrorMessage
Customer
U1
Name
FK8
TerritoryID
PK,FK1
SalesOrderID
SpecialOfferProduct
CountryRegionCode
FK1
BillToAddressID
PK
SalesOrderDetailID
PK
CustomerID
Group
FK2
ShipToAddressID
PK,FK2
SpecialOfferID
SalesYTD
FK4
ShipMethodID
CarrierTrackingNumber
FK1
TerritoryID
PK,FK1
ProductID
SalesLastYear
CreditCardApprovalCode
OrderQty
U1
AccountNumber
HumanResources
CostYTD
FK5
CurrencyRateID
FK2
ProductID
CustomerType
SalesTaxRate
U1
rowguid
ShoppingCartItem
CostLastYear
CustomerAddress
SubTotal
FK2
SpecialOfferID
U2
rowguid
ModifiedDate
U2
rowguid
TaxAmt
PK
SalesTaxRateID
UnitPrice
ModifiedDate
PK
ShoppingCartItemID
PK,FK3
CustomerID
ModifiedDate
Freight
UnitPriceDiscount
PK,FK1
AddressID
Department
TotalDue
FK1,U2
StateProvinceID
LineTotal
ShoppingCartID
Comment
U2
TaxType
U1
rowguid
Quantity
PK
DepartmentID
FK2
AddressTypeID
U1
rowguid
TaxRate
ModifiedDate
FK1
ProductID
EmployeeDepartmentHistory
U1
rowguid
ModifiedDate
Name
DateCreated
U1
Name
ModifiedDate
FK9
CreditCardID
PK,FK2
EmployeeID
U1
rowguid
ModifiedDate
GroupName
PK,FK1
DepartmentID
ModifiedDate
ModifiedDate
Individual
PK
StartDate
PK,FK3
ShiftID
PK,FK2
CustomerID
EndDate
FK1
ContactID
ModifiedDate
Person
Production
Demographics
ModifiedDate
ProductModelIllustration
StateProvince
Employee
Illustration
ProductPhoto
PK,FK2
ProductModelID
PK
StateProvinceID
Contact
EmployeeID
PK
PK,FK1
IllustrationID
PK
IllustrationID
PK
ProductPhotoID
PK
ContactID
U3
StateProvinceCode
U2
NationalIDNumber
ProductListPriceHistory
ModifiedDate
FK1,U3
CountryRegionCode
Diagram
ThumbNailPhoto
Shift
FK2
ContactID
ModifiedDate
NameStyle
IsOnlyStateProvinceFlag
PK,FK1
ProductID
ThumbnailPhotoFileName
U1
LoginID
Title
U1
Name
PK
StartDate
LargePhoto
PK
ShiftID
FK1
ManagerID
ProductProductPhoto
Address
FirstName
FK2
TerritoryID
LargePhotoFileName
ShiftID
MiddleName
U2
rowguid
EndDate
ModifiedDate
PK,FK1
ProductID
U1
Name
Title
Store
PK
AddressID
LastName
ModifiedDate
ProductReview
ListPrice
PK,FK2
ProductPhotoID
U2
StartTime
BirthDate
PK,FK1
CustomerID
Suffix
ModifiedDate
U2
EndTime
MaritalStatus
U2
AddressLine1
EmailAddress
PK
ProductReviewID
Primary
ModifiedDate
Gender
U2
AddressLine2
Name
EmailPromotion
ModifiedDate
HireDate
U2
City
ProductModel
Phone
FK1
ProductID
Demographics
SalariedFlag
FK1,U2
StateProvinceID
U1
rowguid
PasswordHash
ReviewerName
PK
ProductModelID
VacationHours
U2
PostalCode
ModifiedDate
PasswordSalt
ReviewDate
ProductModelProductDescriptionCulture
JobCandidate
Product
SickLeaveHours
U1
rowguid
EmailAddress
FK2
SalesPersonID
AdditionalContactInfo
U1
Name
CurrentFlag
ModifiedDate
PK,FK3
ProductModelID
U1
Rating
PK
JobCandidateID
rowguid
PK
ProductID
CatalogDescription
U3
rowguid
PK,FK2
ProductDescriptionID
ModifiedDate
Comments
Instructions
ModifiedDate
PK,FK1
CultureID
ModifiedDate
FK1
EmployeeID
U1
Name
U2
rowguid
CountryRegion
Resume
U2
ProductNumber
ModifiedDate
ModifiedDate
ModifiedDate
PK
CountryRegionCode
MakeFlag
StoreContact
FinishedGoodsFlag
ProductSubcategory
U1
Name
BillOfMaterials
Color
PK,FK3
CustomerID
ContactType
ModifiedDate
SafetyStockLevel
AddressType
PK
ProductSubcategoryID
ProductCategory
PK
BillOfMaterialsID
PK,FK1
ContactID
ReorderPoint
EmployeePayHistory
PK
ContactTypeID
PK
AddressTypeID
StandardCost
PK
ProductCategoryID
FK1
ProductCategoryID
FK1,U1
ProductAssemblyID
FK2
ContactTypeID
ListPrice
ProductDescription
PK,FK1
EmployeeID
U1
Name
FK2,U1
ComponentID
U1
rowguid
U1
Name
U1
Name
Size
U1
Name
PK
RateChangeDate
U2
rowguid
U1
StartDate
PK
ProductDescriptionID
ModifiedDate
ModifiedDate
U2
rowguid
FK3
SizeUnitMeasureCode
U2
rowguid
ModifiedDate
Culture
EndDate
ModifiedDate
FK4
WeightUnitMeasureCode
ModifiedDate
Rate
FK3
UnitMeasureCode
Description
Weight
PK
CultureID
PayFrequency
EmployeeAddress
BOMLevel
U1
rowguid
DaysToManufacture
ModifiedDate
PerAssemblyQty
ModifiedDate
ProductLine
U1
Name
PK,FK1
EmployeeID
ModifiedDate
Class
ProductDocument
ModifiedDate
PK,FK2
AddressID
Style
ProductID
FK2
ProductSubcategoryID
ProductCostHistory
U1
rowguid
DocumentID
FK1
ProductModelID
ModifiedDate
PK,FK1
ProductID
SellStartDate
UnitMeasure
PK
StartDate
ModifiedDate
SellEndDate
Purchasing
DiscontinuedDate
PK
UnitMeasureCode
EndDate
U3
rowguid
ShipMethod
StandardCost
ModifiedDate
VendorContact
U1
Name
ModifiedDate
PK
ShipMethodID
ModifiedDate
PK,FK3
VendorID
PK,FK1
ContactID
U1
Name
ShipBase
FK2
ContactTypeID
ShipRate
WorkOrderRouting
TransactionHistoryArchive
Schemas
ProductInventory
ModifiedDate
U2
rowguid
Document
TransactionHistory
ModifiedDate
PK,FK2
WorkOrderID
PK
TransactionID
PK,FK2
ProductID
PK
DocumentID
VendorAddress
PK
ProductID
PK
TransactionID
PK,FK1
LocationID
PK
OperationSequence
ProductID
PK,FK3
VendorID
Title
ReferenceOrderID
FK1
ProductID
PK,FK1
AddressID
Sales
Shelf
U1
FileName
FK1
LocationID
TransactionDate
ReferenceOrderID
Bin
FileExtension
Vendor
ScheduledStartDate
TransactionType
TransactionDate
FK2
AddressTypeID
Quantity
U1
Revision
ScheduledEndDate
Quantity
TransactionType
ModifiedDate
rowguid
PK
VendorID
ChangeNumber
ActualStartDate
ActualCost
Quantity
ModifiedDate
Status
ProductVendor
ActualEndDate
ModifiedDate
Purchasing
ActualCost
U1
AccountNumber
DocumentSummary
ActualResourceHrs
ReferenceOrderLineID
ModifiedDate
Name
PK,FK1
ProductID
Document
PlannedCost
ReferenceOrderLineID
CreditRating
PK,FK3
VendorID
ModifiedDate
PurchaseOrderHeader
ActualCost
PreferredVendorStatus
Location
ModifiedDate
PK
PurchaseOrderID
ActiveFlag
AverageLeadTime
Person
PK,FK3
ShipMethodID
PurchasingWebServiceURL
StandardPrice
PK
LocationID
ModifiedDate
LastReceiptCost
RevisionNumber
LastReceiptDate
U1
Name
Status
MinOrderQty
CostRate
FK1
EmployeeID
MaxOrderQty
Production
Availability
FK2
VendorID
OnOrderQty
ModifiedDate
OrderDate
FK2
UnitMeasureCode
ScrapReason
WorkOrder
ShipDate
ModifiedDate
PK
ScrapReasonID
SubTotal
PK
WorkOrderID
PurchaseOrderDetail
HumanResources
TaxAmt
U1
Name
Freight
PK,FK2
ShipMethodID
FK1
ProductID
ModifiedDate
TotalDue
PK,FK2
PurchaseOrderID
OrderQty
ModifiedDate
PK
PurchaseOrderDetailID
StockedQty
ScrappedQty
dbo
DueDate
StartDate
OrderQty
EndDate
FK1
ProductID
DueDate
UnitPrice
FK2
ScrapReasonID
LineTotal
ModifiedDate
ReceivedQty
RejectedQty
StockedQty
ModifiedDate