Dataedo.com

?Free EditionAdventureWorksDatabase documentation 39801801428752014-09-02Generated with00Table of ContentsTOC \h HYPERLINK \l "_Toc724314426"1. CorePAGEREF _Toc7243144266HYPERLINK \l "_Toc1758954507"1.1. TablesPAGEREF _Toc17589545076HYPERLINK \l "_Toc1820606823"1.1.1. Table: AWBuildVersionPAGEREF _Toc18206068236HYPERLINK \l "_Toc570919275"1.1.2. Table: DatabaseLogPAGEREF _Toc5709192756HYPERLINK \l "_Toc632571591"1.1.3. Table: ErrorLogPAGEREF _Toc6325715916HYPERLINK \l "_Toc273910467"1.2. ProceduresPAGEREF _Toc2739104677HYPERLINK \l "_Toc1293592866"1.2.1. Procedure: uspLogErrorPAGEREF _Toc12935928667HYPERLINK \l "_Toc1939428358"1.2.2. Procedure: uspPrintErrorPAGEREF _Toc19394283587HYPERLINK \l "_Toc176030604"1.3. FunctionsPAGEREF _Toc1760306047HYPERLINK \l "_Toc1875502472"1.3.1. Function: ufnGetAccountingEndDatePAGEREF _Toc18755024727HYPERLINK \l "_Toc335562783"1.3.2. Function: ufnGetAccountingStartDatePAGEREF _Toc3355627837HYPERLINK \l "_Toc2001080674"1.3.3. Function: ufnGetDocumentStatusTextPAGEREF _Toc20010806748HYPERLINK \l "_Toc1519114918"1.3.4. Function: ufnLeadingZerosPAGEREF _Toc15191149188HYPERLINK \l "_Toc488199429"2. Human ResourcesPAGEREF _Toc4881994299HYPERLINK \l "_Toc2062732990"2.1. TablesPAGEREF _Toc20627329909HYPERLINK \l "_Toc888009131"2.1.1. Table: DepartmentPAGEREF _Toc8880091319HYPERLINK \l "_Toc1580767234"2.1.2. Table: EmployeePAGEREF _Toc15807672349HYPERLINK \l "_Toc1704071866"2.1.3. Table: EmployeeDepartmentHistoryPAGEREF _Toc170407186610HYPERLINK \l "_Toc1765724182"2.1.4. Table: EmployeePayHistoryPAGEREF _Toc176572418210HYPERLINK \l "_Toc1283758426"2.1.5. Table: JobCandidatePAGEREF _Toc128375842611HYPERLINK \l "_Toc1827376498"2.1.6. Table: ShiftPAGEREF _Toc182737649811HYPERLINK \l "_Toc1889028814"2.2. ViewsPAGEREF _Toc188902881411HYPERLINK \l "_Toc1407063058"2.2.1. View: vEmployeePAGEREF _Toc140706305811HYPERLINK \l "_Toc986749618"2.2.2. View: vEmployeeDepartmentPAGEREF _Toc98674961812HYPERLINK \l "_Toc1530367690"2.2.3. View: vEmployeeDepartmentHistoryPAGEREF _Toc153036769012HYPERLINK \l "_Toc1110054250"2.2.4. View: vJobCandidatePAGEREF _Toc111005425013HYPERLINK \l "_Toc1171706566"2.2.5. View: vJobCandidateEducationPAGEREF _Toc117170656613HYPERLINK \l "_Toc751393126"2.2.6. View: vJobCandidateEmploymentPAGEREF _Toc75139312614HYPERLINK \l "_Toc813045442"2.3. ProceduresPAGEREF _Toc81304544214HYPERLINK \l "_Toc1407383805"2.3.1. Procedure: uspGetEmployeeManagersPAGEREF _Toc140738380514HYPERLINK \l "_Toc331079686"2.3.2. Procedure: uspGetManagerEmployeesPAGEREF _Toc33107968614HYPERLINK \l "_Toc874697758"2.3.3. Procedure: uspSearchCandidateResumesPAGEREF _Toc87469775814HYPERLINK \l "_Toc392732002"3. New modulePAGEREF _Toc39273200216HYPERLINK \l "_Toc1719552630"4. PeoplePAGEREF _Toc171955263017HYPERLINK \l "_Toc936350074"4.1. TablesPAGEREF _Toc93635007417HYPERLINK \l "_Toc2119362332"4.1.1. Table: AddressPAGEREF _Toc211936233217HYPERLINK \l "_Toc516036634"4.1.2. Table: AddressTypePAGEREF _Toc51603663417HYPERLINK \l "_Toc577688950"4.1.3. Table: BusinessEntityPAGEREF _Toc57768895018HYPERLINK \l "_Toc639341266"4.1.4. Table: BusinessEntityAddressPAGEREF _Toc63934126618HYPERLINK \l "_Toc157375510"4.1.5. Table: BusinessEntityContactPAGEREF _Toc15737551018HYPERLINK \l "_Toc219027826"4.1.6. Table: ContactTypePAGEREF _Toc21902782619HYPERLINK \l "_Toc1946198033"4.1.7. Table: CountryRegionPAGEREF _Toc194619803319HYPERLINK \l "_Toc342332458"4.1.8. Table: EmailAddressPAGEREF _Toc34233245819HYPERLINK \l "_Toc403984774"4.1.9. Table: PasswordPAGEREF _Toc40398477420HYPERLINK \l "_Toc1587536909"4.1.10. Table: PersonPAGEREF _Toc158753690920HYPERLINK \l "_Toc45323650"4.1.11. Table: PersonPhonePAGEREF _Toc4532365021HYPERLINK \l "_Toc1710841541"4.1.12. Table: PhoneNumberTypePAGEREF _Toc171084154121HYPERLINK \l "_Toc1772493857"4.1.13. Table: StateProvincePAGEREF _Toc177249385722HYPERLINK \l "_Toc1834146173"4.2. ViewsPAGEREF _Toc183414617322HYPERLINK \l "_Toc1352180417"4.2.1. View: vAdditionalContactInfoPAGEREF _Toc135218041722HYPERLINK \l "_Toc1957450805"4.2.2. View: vStateProvinceCountryRegionPAGEREF _Toc195745080523HYPERLINK \l "_Toc993519293"4.3. FunctionsPAGEREF _Toc99351929323HYPERLINK \l "_Toc1115591009"4.3.1. Function: ufnGetContactInformationPAGEREF _Toc111559100923HYPERLINK \l "_Toc1055171609"5. ProductionPAGEREF _Toc105517160924HYPERLINK \l "_Toc1598789681"5.1. TablesPAGEREF _Toc159878968124HYPERLINK \l "_Toc797648151"5.1.1. Table: BillOfMaterialsPAGEREF _Toc79764815124HYPERLINK \l "_Toc1660441997"5.1.2. Table: CulturePAGEREF _Toc166044199724HYPERLINK \l "_Toc1240128557"5.1.3. Table: DocumentPAGEREF _Toc124012855724HYPERLINK \l "_Toc1363433189"5.1.4. Table: IllustrationPAGEREF _Toc136343318925HYPERLINK \l "_Toc881467433"5.1.5. Table: LocationPAGEREF _Toc88146743325HYPERLINK \l "_Toc461153993"5.1.6. Table: ProductPAGEREF _Toc46115399326HYPERLINK \l "_Toc102492869"5.1.7. Table: ProductCategoryPAGEREF _Toc10249286927HYPERLINK \l "_Toc164145185"5.1.8. Table: ProductCostHistoryPAGEREF _Toc16414518527HYPERLINK \l "_Toc287449817"5.1.9. Table: ProductDescriptionPAGEREF _Toc28744981727HYPERLINK \l "_Toc349102133"5.1.10. Table: ProductDocumentPAGEREF _Toc34910213328HYPERLINK \l "_Toc410754449"5.1.11. Table: ProductInventoryPAGEREF _Toc41075444928HYPERLINK \l "_Toc472406765"5.1.12. Table: ProductListPriceHistoryPAGEREF _Toc47240676529HYPERLINK \l "_Toc1655958900"5.1.13. Table: ProductModelPAGEREF _Toc165595890029HYPERLINK \l "_Toc1717611216"5.1.14. Table: ProductModelIllustrationPAGEREF _Toc171761121629HYPERLINK \l "_Toc1779263532"5.1.15. Table: ProductModelProductDescriptionCulturePAGEREF _Toc177926353230HYPERLINK \l "_Toc1840915848"5.1.16. Table: ProductPhotoPAGEREF _Toc184091584830HYPERLINK \l "_Toc1902568164"5.1.17. Table: ProductProductPhotoPAGEREF _Toc190256816430HYPERLINK \l "_Toc1482254724"5.1.18. Table: ProductReviewPAGEREF _Toc148225472431HYPERLINK \l "_Toc1543907040"5.1.19. Table: ProductSubcategoryPAGEREF _Toc154390704031HYPERLINK \l "_Toc1605559356"5.1.20. Table: ScrapReasonPAGEREF _Toc160555935632HYPERLINK \l "_Toc1667211672"5.1.21. Table: TransactionHistoryPAGEREF _Toc166721167232HYPERLINK \l "_Toc1246898232"5.1.22. Table: TransactionHistoryArchivePAGEREF _Toc124689823232HYPERLINK \l "_Toc826584792"5.1.23. Table: UnitMeasurePAGEREF _Toc82658479233HYPERLINK \l "_Toc888237108"5.1.24. Table: WorkOrderPAGEREF _Toc88823710833HYPERLINK \l "_Toc467923668"5.1.25. Table: WorkOrderRoutingPAGEREF _Toc46792366834HYPERLINK \l "_Toc1073194056"5.2. ViewsPAGEREF _Toc107319405634HYPERLINK \l "_Toc109262544"5.2.1. View: vProductAndDescriptionPAGEREF _Toc10926254434HYPERLINK \l "_Toc652880616"5.2.2. View: vProductModelCatalogDescriptionPAGEREF _Toc65288061635HYPERLINK \l "_Toc294219492"5.2.3. View: vProductModelInstructionsPAGEREF _Toc29421949235HYPERLINK \l "_Toc2021389699"5.3. ProceduresPAGEREF _Toc202138969936HYPERLINK \l "_Toc417524124"5.3.1. Procedure: uspGetBillOfMaterialsPAGEREF _Toc41752412436HYPERLINK \l "_Toc2083042015"5.3.2. Procedure: uspGetWhereUsedProductIDPAGEREF _Toc208304201536HYPERLINK \l "_Toc479176440"5.4. FunctionsPAGEREF _Toc47917644036HYPERLINK \l "_Toc2144694331"5.4.1. Function: ufnGetProductDealerPricePAGEREF _Toc214469433136HYPERLINK \l "_Toc58863000"5.4.2. Function: ufnGetProductListPricePAGEREF _Toc5886300036HYPERLINK \l "_Toc120515316"5.4.3. Function: ufnGetProductStandardCostPAGEREF _Toc12051531637HYPERLINK \l "_Toc182167632"5.4.4. Function: ufnGetStockPAGEREF _Toc18216763237HYPERLINK \l "_Toc1365719767"6. PurchasingPAGEREF _Toc136571976738HYPERLINK \l "_Toc1909337839"6.1. TablesPAGEREF _Toc190933783938HYPERLINK \l "_Toc1427372083"6.1.1. Table: ProductVendorPAGEREF _Toc142737208338HYPERLINK \l "_Toc2032642471"6.1.2. Table: PurchaseOrderDetailPAGEREF _Toc203264247138HYPERLINK \l "_Toc1612329031"6.1.3. Table: PurchaseOrderHeaderPAGEREF _Toc161232903139HYPERLINK \l "_Toc1735633663"6.1.4. Table: ShipMethodPAGEREF _Toc173563366339HYPERLINK \l "_Toc1315320223"6.1.5. Table: VendorPAGEREF _Toc131532022340HYPERLINK \l "_Toc1438624855"6.2. ViewsPAGEREF _Toc143862485540HYPERLINK \l "_Toc956659099"6.2.1. View: vVendorWithAddressesPAGEREF _Toc95665909940HYPERLINK \l "_Toc1018311415"6.2.2. View: vVendorWithContactsPAGEREF _Toc101831141541HYPERLINK \l "_Toc597997975"6.3. FunctionsPAGEREF _Toc59799797541HYPERLINK \l "_Toc659650291"6.3.1. Function: ufnGetPurchaseOrderStatusTextPAGEREF _Toc65965029141HYPERLINK \l "_Toc177684535"7. SalesPAGEREF _Toc17768453542HYPERLINK \l "_Toc721302607"7.1. TablesPAGEREF _Toc72130260742HYPERLINK \l "_Toc782954923"7.1.1. Table: CountryRegionCurrencyPAGEREF _Toc78295492342HYPERLINK \l "_Toc844607239"7.1.2. Table: CreditCardPAGEREF _Toc84460723942HYPERLINK \l "_Toc424293799"7.1.3. Table: CurrencyPAGEREF _Toc42429379942HYPERLINK \l "_Toc485946115"7.1.4. Table: CurrencyRatePAGEREF _Toc48594611543HYPERLINK \l "_Toc65632675"7.1.5. Table: CustomerPAGEREF _Toc6563267543HYPERLINK \l "_Toc1792802882"7.1.6. Table: PersonCreditCardPAGEREF _Toc179280288244HYPERLINK \l "_Toc1854455198"7.1.7. Table: SalesOrderDetailPAGEREF _Toc185445519844HYPERLINK \l "_Toc1977759830"7.1.8. Table: SalesOrderHeaderPAGEREF _Toc197775983044HYPERLINK \l "_Toc1619098706"7.1.9. Table: SalesOrderHeaderSalesReasonPAGEREF _Toc161909870646HYPERLINK \l "_Toc1198785266"7.1.10. Table: SalesPersonPAGEREF _Toc119878526646HYPERLINK \l "_Toc1322089898"7.1.11. Table: SalesPersonQuotaHistoryPAGEREF _Toc132208989846HYPERLINK \l "_Toc1383742214"7.1.12. Table: SalesReasonPAGEREF _Toc138374221447HYPERLINK \l "_Toc963428774"7.1.13. Table: SalesTaxRatePAGEREF _Toc96342877447HYPERLINK \l "_Toc543115334"7.1.14. Table: SalesTerritoryPAGEREF _Toc54311533448HYPERLINK \l "_Toc666419966"7.1.15. Table: SalesTerritoryHistoryPAGEREF _Toc66641996648HYPERLINK \l "_Toc246106526"7.1.16. Table: ShoppingCartItemPAGEREF _Toc24610652649HYPERLINK \l "_Toc307758842"7.1.17. Table: SpecialOfferPAGEREF _Toc30775884249HYPERLINK \l "_Toc431063474"7.1.18. Table: SpecialOfferProductPAGEREF _Toc43106347449HYPERLINK \l "_Toc492715790"7.1.19. Table: StorePAGEREF _Toc49271579050HYPERLINK \l "_Toc616020422"7.2. ViewsPAGEREF _Toc61602042250HYPERLINK \l "_Toc1799572557"7.2.1. View: vIndividualCustomerPAGEREF _Toc179957255750HYPERLINK \l "_Toc1922877189"7.2.2. View: vPersonDemographicsPAGEREF _Toc192287718951HYPERLINK \l "_Toc2046181821"7.2.3. View: vSalesPersonPAGEREF _Toc204618182151HYPERLINK \l "_Toc22002806"7.2.4. View: vSalesPersonSalesByFiscalYearsPAGEREF _Toc2200280652HYPERLINK \l "_Toc1205554941"7.2.5. View: vStoreWithAddressesPAGEREF _Toc120555494152HYPERLINK \l "_Toc1328859573"7.2.6. View: vStoreWithContactsPAGEREF _Toc132885957353HYPERLINK \l "_Toc1390511889"7.2.7. View: vStoreWithDemographicsPAGEREF _Toc139051188953HYPERLINK \l "_Toc1513816521"7.3. FunctionsPAGEREF _Toc151381652154HYPERLINK \l "_Toc1031850765"7.3.1. Function: ufnGetSalesOrderStatusTextPAGEREF _Toc103185076554CoreTablesTable: AWBuildVersionCurrent version number of the AdventureWorks 2012 sample database. ColumnsNameData TypeDescriptionSystemInformationIDtinyintPrimary key for AWBuildVersion records.Database Versionnvarchar(25)Version number of the database in 9.yy.mm.dd.00 format.VersionDatedatetimeDate and time the record was last updated.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_AWBuildVersion_SystemInformationIDSystemInformationIDTable: DatabaseLogAudit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog.ColumnsNameData TypeDescriptionDatabaseLogIDintPrimary key for DatabaseLog records.PostTimedatetimeThe date and time the DDL change occurred.DatabaseUsernvarchar(128)The user who implemented the DDL change.Eventnvarchar(128)The type of DDL statement that was executed.Schemanvarchar(128)The schema to which the changed object belongs.Objectnvarchar(128)The object that was changed by the DDL statment.TSQLnvarchar(MAX)The exact Transact-SQL statement that was executed.XmlEventxmlThe raw XML data generated by database trigger.Unique keysNameColumnsDescriptionPK_DatabaseLog_DatabaseLogIDDatabaseLogIDTable: ErrorLogAudit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct.ColumnsNameData TypeDescriptionErrorLogIDintPrimary key for ErrorLog records.ErrorTimedatetimeThe date and time at which the error occurred.UserNamenvarchar(128)The user who executed the batch in which the error occurred.ErrorNumberintThe error number of the error that occurred.ErrorSeverityintThe severity of the error that occurred.ErrorStateintThe state number of the error that occurred.ErrorProcedurenvarchar(126)The name of the stored procedure or trigger where the error occurred.ErrorLineintThe line number at which the error occurred.ErrorMessagenvarchar(4000)The message text of the error that occurred.Unique keysNameColumnsDescriptionPK_ErrorLog_ErrorLogIDErrorLogIDProceduresProcedure: uspLogErrorLogs error information in the ErrorLog table about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without inserting error information.Input/OutputNameData TypeDescriptionErrorLogIDint Procedure: uspPrintErrorPrints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information.FunctionsFunction: ufnGetAccountingEndDateScalar function used in the uSalesOrderHeader trigger to set the starting account date.Input/OutputNameData TypeDescriptionReturnsdatetime Function: ufnGetAccountingStartDateScalar function used in the uSalesOrderHeader trigger to set the ending account date.Input/OutputNameData TypeDescriptionReturnsdatetime Function: ufnGetDocumentStatusTextScalar function returning the text representation of the Status column in the Document table.Input/OutputNameData TypeDescriptionReturnsnvarchar(16)Statustinyint Function: ufnLeadingZerosScalar function used by the Sales.Customer table to help set the account number.Input/OutputNameData TypeDescriptionReturnsvarchar(8)Valueint Human ResourcesTablesTable: DepartmentLookup table containing the departments within the Adventure Works Cycles company.ColumnsNameData TypeDescriptionDepartmentIDsmallintPrimary key for Department records.Namenvarchar(50)Name of the department.GroupNamenvarchar(50)Name of the group to which the department belongs.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Department_DepartmentIDDepartmentIDAK_Department_NameNameTable: EmployeeEmployee information such as salary, department, and title.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key for Employee records. Foreign key to BusinessEntity.BusinessEntityID.NationalIDNumbernvarchar(15)Unique national identification number such as a social security number.LoginIDnvarchar(256)Network anizationNodehierarchyidWhere the employee is located in corporate anizationLevelsmallintThe depth of the employee in the corporate hierarchy.JobTitlenvarchar(50)Work title such as Buyer or Sales Representative.BirthDatedateDate of birth.MaritalStatusnchar(1)M = Married, S = SingleGendernchar(1)M = Male, F = FemaleHireDatedateEmployee hired on this date.SalariedFlagbitJob classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.VacationHourssmallintNumber of available vacation hours.SickLeaveHourssmallintNumber of available sick leave hours.CurrentFlagbit0 = Inactive, 1 = ActiverowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Employee_BusinessEntityIDBusinessEntityIDAK_Employee_LoginIDLoginIDAK_Employee_NationalIDNumberNationalIDNumberAK_Employee_rowguidrowguidTable: EmployeeDepartmentHistoryEmployee department transfers.ColumnsNameData TypeDescriptionBusinessEntityIDintEmployee identification number. Foreign key to Employee.BusinessEntityID.DepartmentIDsmallintDepartment in which the employee worked including currently. Foreign key to Department.DepartmentID.ShiftIDtinyintIdentifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID.StartDatedateDate the employee started work in the department.EndDatedateDate the employee left the department. NULL = Current department.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_DepartmentIDBusinessEntityID, StartDate, DepartmentID, ShiftIDTable: EmployeePayHistoryEmployee pay history.ColumnsNameData TypeDescriptionBusinessEntityIDintEmployee identification number. Foreign key to Employee.BusinessEntityID.RateChangeDatedatetimeDate the change in pay is effectiveRatemoneySalary hourly rate.PayFrequencytinyint1 = Salary received monthly, 2 = Salary received biweeklyModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_EmployeePayHistory_BusinessEntityID_RateChangeDateBusinessEntityID, RateChangeDateTable: JobCandidateRésumés submitted to Human Resources by job applicants.ColumnsNameData TypeDescriptionJobCandidateIDintPrimary key for JobCandidate records.BusinessEntityIDintEmployee identification number if applicant was hired. Foreign key to Employee.BusinessEntityID.ResumexmlRésumé in XML format.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_JobCandidate_JobCandidateIDJobCandidateIDTable: ShiftWork shift lookup table.ColumnsNameData TypeDescriptionShiftIDtinyintPrimary key for Shift records.Namenvarchar(50)Shift description.StartTimetime(7)Shift start time.EndTimetime(7)Shift end time.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Shift_ShiftIDShiftIDAK_Shift_NameNameAK_Shift_StartTime_EndTimeStartTime, EndTimeViewsView: vEmployeeEmployee names and addresses.ColumnsNameData TypeDescriptionBusinessEntityIDintTitlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)JobTitlenvarchar(50)PhoneNumbernvarchar(25)PhoneNumberTypenvarchar(50)EmailAddressnvarchar(50)EmailPromotionintAddressLine1nvarchar(60)AddressLine2nvarchar(60)Citynvarchar(30)StateProvinceNamenvarchar(50)PostalCodenvarchar(15)CountryRegionNamenvarchar(50)AdditionalContactInfoxmlView: vEmployeeDepartmentReturns employee name, title, and current department.ColumnsNameData TypeDescriptionBusinessEntityIDintTitlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)JobTitlenvarchar(50)Departmentnvarchar(50)GroupNamenvarchar(50)StartDatedateView: vEmployeeDepartmentHistoryReturns employee name and current and previous departments.ColumnsNameData TypeDescriptionBusinessEntityIDintTitlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)Shiftnvarchar(50)Departmentnvarchar(50)GroupNamenvarchar(50)StartDatedateEndDatedateView: vJobCandidateJob candidate names and resumes.ColumnsNameData TypeDescriptionJobCandidateIDintBusinessEntityIDintName.Prefixnvarchar(30)Name.Firstnvarchar(30)Name.Middlenvarchar(30)Name.Lastnvarchar(30)Name.Suffixnvarchar(30)Skillsnvarchar(MAX)Addr.Typenvarchar(30)Addr.Loc.CountryRegionnvarchar(100)Addr.Loc.Statenvarchar(100)Addr.Loc.Citynvarchar(100)Addr.PostalCodenvarchar(20)EMailnvarchar(MAX)WebSitenvarchar(MAX)ModifiedDatedatetimeView: vJobCandidateEducationDisplays 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.ColumnsNameData TypeDescriptionJobCandidateIDintEdu.Levelnvarchar(MAX)Edu.StartDatedatetimeEdu.EndDatedatetimeEdu.Degreenvarchar(50)Edu.Majornvarchar(50)Edu.Minornvarchar(50)Edu.GPAnvarchar(5)Edu.GPAScalenvarchar(5)Edu.Schoolnvarchar(100)Edu.Loc.CountryRegionnvarchar(100)Edu.Loc.Statenvarchar(100)Edu.Loc.Citynvarchar(100)View: vJobCandidateEmploymentDisplays 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.ColumnsNameData TypeDescriptionJobCandidateIDintEmp.StartDatedatetimeEmp.Namenvarchar(100)Emp.JobTitlenvarchar(100)Emp.Responsibilitynvarchar(MAX)Emp.FunctionCategorynvarchar(MAX)Emp.IndustryCategorynvarchar(MAX)Emp.Loc.CountryRegionnvarchar(MAX)Emp.Loc.Statenvarchar(MAX)Emp.Loc.Citynvarchar(MAX)ProceduresProcedure: uspGetEmployeeManagersStored procedure using a recursive query to return the direct and indirect managers of the specified employee.Input/OutputNameData TypeDescriptionBusinessEntityIDint Procedure: uspGetManagerEmployeesStored procedure using a recursive query to return the direct and indirect employees of the specified manager.Input/OutputNameData TypeDescriptionBusinessEntityIDint Procedure: uspSearchCandidateResumesInput/OutputNameData TypeDescriptionsearchStringnvarchar(1000)useInflectionalbit useThesaurusbit languageint New modulePeopleTablesTable: AddressStreet address information for customers, employees, and vendors.ColumnsNameData TypeDescriptionAddressIDintPrimary key for Address records.AddressLine1nvarchar(60)First street address line.AddressLine2nvarchar(60)Second street address line.Citynvarchar(30)Name of the city.StateProvinceIDintUnique identification number for the state or province. Foreign key to StateProvince table.PostalCodenvarchar(15)Postal code for the street address.SpatialLocationgeographyLatitude and longitude of this address.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Address_AddressIDAddressIDAK_Address_rowguidrowguidIX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCodeAddressLine1, AddressLine2, City, StateProvinceID, PostalCodeTable: AddressTypeTypes of addresses stored in the Address table. ColumnsNameData TypeDescriptionAddressTypeIDintPrimary key for AddressType records.Namenvarchar(50)Address type description. For example, Billing, Home, or Shipping.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_AddressType_AddressTypeIDAddressTypeIDAK_AddressType_NameNameAK_AddressType_rowguidrowguidTable: BusinessEntitySource of the ID that connects vendors, customers, and employees with address and contact information.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key for all customers, vendors, and employees.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_BusinessEntity_BusinessEntityIDBusinessEntityIDAK_BusinessEntity_rowguidrowguidTable: BusinessEntityAddressCross-reference table mapping customers, vendors, and employees to their addresses.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key. Foreign key to BusinessEntity.BusinessEntityID.AddressIDintPrimary key. Foreign key to Address.AddressID.AddressTypeIDintPrimary key. Foreign key to AddressType.AddressTypeID.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeIDBusinessEntityID, AddressID, AddressTypeIDAK_BusinessEntityAddress_rowguidrowguidTable: BusinessEntityContactCross-reference table mapping stores, vendors, and employees to peopleColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key. Foreign key to BusinessEntity.BusinessEntityID.PersonIDintPrimary key. Foreign key to Person.BusinessEntityID.ContactTypeIDintPrimary key. Foreign key to ContactType.ContactTypeID.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeIDBusinessEntityID, PersonID, ContactTypeIDAK_BusinessEntityContact_rowguidrowguidTable: ContactTypeLookup table containing the types of business entity contacts.ColumnsNameData TypeDescriptionContactTypeIDintPrimary key for ContactType records.Namenvarchar(50)Contact type description.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ContactType_ContactTypeIDContactTypeIDAK_ContactType_NameNameTable: CountryRegionLookup table containing the ISO standard codes for countries and regions.ColumnsNameData TypeDescriptionCountryRegionCodenvarchar(3)ISO standard code for countries and regions.Namenvarchar(50)Country or region name.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_CountryRegion_CountryRegionCodeCountryRegionCodeAK_CountryRegion_NameNameTable: EmailAddressWhere to send a person email.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key. Person associated with this email address. Foreign key to Person.BusinessEntityIDEmailAddressIDintPrimary key. ID of this email address.EmailAddressnvarchar(50)E-mail address for the person.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_EmailAddress_BusinessEntityID_EmailAddressIDBusinessEntityID, EmailAddressIDTable: PasswordOne way hashed authentication informationColumnsNameData TypeDescriptionBusinessEntityIDintPasswordHashvarchar(128)Password for the e-mail account.PasswordSaltvarchar(10)Random value concatenated with the password string before the password is hashed.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Password_BusinessEntityIDBusinessEntityIDTable: PersonHuman beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key for Person records.PersonTypenchar(2)Primary type of person: SC = Store Contact, IN = Individual (retail) customer, SP = Sales person, EM = Employee (non-sales), VC = Vendor contact, GC = General contactNameStylebit0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order.Titlenvarchar(8)A courtesy title. For example, Mr. or Ms.FirstNamenvarchar(50)First name of the person.MiddleNamenvarchar(50)Middle name or middle initial of the person.LastNamenvarchar(50)Last name of the person.Suffixnvarchar(10)Surname suffix. For example, Sr. or Jr.EmailPromotionint0 = 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. AdditionalContactInfoxmlAdditional contact information about the person stored in xml format. DemographicsxmlPersonal information such as hobbies, and income collected from online shoppers. Used for sales analysis.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Person_BusinessEntityIDBusinessEntityIDAK_Person_rowguidrowguidTable: PersonPhoneTelephone number and type of a person.ColumnsNameData TypeDescriptionBusinessEntityIDintBusiness entity identification number. Foreign key to Person.BusinessEntityID.PhoneNumbernvarchar(25)Telephone number identification number.PhoneNumberTypeIDintKind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeIDBusinessEntityID, PhoneNumber, PhoneNumberTypeIDTable: PhoneNumberTypeType of phone number of a person.ColumnsNameData TypeDescriptionPhoneNumberTypeIDintPrimary key for telephone number type records.Namenvarchar(50)Name of the telephone number typeModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_PhoneNumberType_PhoneNumberTypeIDPhoneNumberTypeIDTable: StateProvinceState and province lookup table.ColumnsNameData TypeDescriptionStateProvinceIDintPrimary key for StateProvince records.StateProvinceCodenchar(3)ISO standard state or province code.CountryRegionCodenvarchar(3)ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. IsOnlyStateProvinceFlagbit0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.Namenvarchar(50)State or province description.TerritoryIDintID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_StateProvince_StateProvinceIDStateProvinceIDAK_StateProvince_NameNameAK_StateProvince_rowguidrowguidAK_StateProvince_StateProvinceCode_CountryRegionCodeStateProvinceCode, CountryRegionCodeViewsView: vAdditionalContactInfoDisplays the contact name and content from each element in the xml column AdditionalContactInfo for that person.ColumnsNameData TypeDescriptionBusinessEntityIDintFirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)TelephoneNumbernvarchar(50)TelephoneSpecialInstructionsnvarchar(MAX)Streetnvarchar(50)Citynvarchar(50)StateProvincenvarchar(50)PostalCodenvarchar(50)CountryRegionnvarchar(50)HomeAddressSpecialInstructionsnvarchar(MAX)EMailAddressnvarchar(128)EMailSpecialInstructionsnvarchar(MAX)EMailTelephoneNumbernvarchar(50)rowguiduniqueidentifierModifiedDatedatetimeView: vStateProvinceCountryRegionJoins StateProvince table with CountryRegion table.ColumnsNameData TypeDescriptionStateProvinceIDintStateProvinceCodenchar(3)IsOnlyStateProvinceFlagbitStateProvinceNamenvarchar(50)TerritoryIDintCountryRegionCodenvarchar(3)CountryRegionNamenvarchar(50)FunctionsFunction: ufnGetContactInformationTable value function returning the first name, last name, job title and contact type for a given contact.Input/OutputNameData TypeDescriptionPersonIDint ProductionTablesTable: BillOfMaterialsItems required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.ColumnsNameData TypeDescriptionBillOfMaterialsIDintPrimary key for BillOfMaterials records.ProductAssemblyIDintParent product identification number. Foreign key to Product.ponentIDintComponent identification number. Foreign key to Product.ProductID.StartDatedatetimeDate the component started being used in the assembly item.EndDatedatetimeDate the component stopped being used in the assembly item.UnitMeasureCodenchar(3)Standard code identifying the unit of measure for the quantity.BOMLevelsmallintIndicates the depth the component is from its parent (AssemblyID).PerAssemblyQtydecimal(8, 2)Quantity of the component needed to create the assembly.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_BillOfMaterials_BillOfMaterialsIDBillOfMaterialsIDAK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDateProductAssemblyID, ComponentID, StartDateTable: CultureLookup table containing the languages in which some AdventureWorks data is stored.ColumnsNameData TypeDescriptionCultureIDnchar(6)Primary key for Culture records.Namenvarchar(50)Culture description.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Culture_CultureIDCultureIDAK_Culture_NameNameTable: DocumentProduct maintenance documents.ColumnsNameData TypeDescriptionDocumentNodehierarchyidPrimary key for Document records.DocumentLevelsmallintDepth in the document hierarchy.Titlenvarchar(50)Title of the document.OwnerintEmployee who controls the document. Foreign key to Employee.BusinessEntityIDFolderFlagbit0 = This is a folder, 1 = This is a document.FileNamenvarchar(400)File name of the documentFileExtensionnvarchar(8)File extension indicating the document type. For example, .doc or .txt.Revisionnchar(5)Revision number of the document. ChangeNumberintEngineering change approval number.Statustinyint1 = Pending approval, 2 = Approved, 3 = ObsoleteDocumentSummarynvarchar(MAX)Document abstract.Documentvarbinary(MAX)Complete document.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Required for FileStream.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Document_DocumentNodeDocumentNodeAK_Document_DocumentLevel_DocumentNodeDocumentLevel, DocumentNodeAK_Document_rowguidrowguidUQ__Document__F73921F793071A63rowguidTable: IllustrationBicycle assembly diagrams.ColumnsNameData TypeDescriptionIllustrationIDintPrimary key for Illustration records.DiagramxmlIllustrations used in manufacturing instructions. Stored as XML.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Illustration_IllustrationIDIllustrationIDTable: LocationProduct inventory and manufacturing locations.ColumnsNameData TypeDescriptionLocationIDsmallintPrimary key for Location records.Namenvarchar(50)Location description.CostRatesmallmoneyStandard hourly cost of the manufacturing location.Availabilitydecimal(8, 2)Work capacity (in hours) of the manufacturing location.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Location_LocationIDLocationIDAK_Location_NameNameTable: ProductProducts sold or used in the manfacturing of sold products.ColumnsNameData TypeDescriptionProductIDintPrimary key for Product records.Namenvarchar(50)Name of the product.ProductNumbernvarchar(25)Unique product identification number.MakeFlagbit0 = Product is purchased, 1 = Product is manufactured in-house.FinishedGoodsFlagbit0 = Product is not a salable item. 1 = Product is salable.Colornvarchar(15)Product color.SafetyStockLevelsmallintMinimum inventory quantity. ReorderPointsmallintInventory level that triggers a purchase order or work order. StandardCostmoneyStandard cost of the product.ListPricemoneySelling price.Sizenvarchar(5)Product size.SizeUnitMeasureCodenchar(3)Unit of measure for Size column.WeightUnitMeasureCodenchar(3)Unit of measure for Weight column.Weightdecimal(8, 2)Product weight.DaysToManufactureintNumber of days required to manufacture the product.ProductLinenchar(2)R = Road, M = Mountain, T = Touring, S = StandardClassnchar(2)H = High, M = Medium, L = LowStylenchar(2)W = Womens, M = Mens, U = UniversalProductSubcategoryIDintProduct is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. ProductModelIDintProduct is a member of this product model. Foreign key to ProductModel.ProductModelID.SellStartDatedatetimeDate the product was available for sale.SellEndDatedatetimeDate the product was no longer available for sale.DiscontinuedDatedatetimeDate the product was discontinued.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Product_ProductIDProductIDAK_Product_NameNameAK_Product_ProductNumberProductNumberAK_Product_rowguidrowguidTable: ProductCategoryHigh-level product categorization.ColumnsNameData TypeDescriptionProductCategoryIDintPrimary key for ProductCategory records.Namenvarchar(50)Category description.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductCategory_ProductCategoryIDProductCategoryIDAK_ProductCategory_NameNameAK_ProductCategory_rowguidrowguidTable: ProductCostHistoryChanges in the cost of a product over time.ColumnsNameData TypeDescriptionProductIDintProduct identification number. Foreign key to Product.ProductIDStartDatedatetimeProduct cost start date.EndDatedatetimeProduct cost end date.StandardCostmoneyStandard cost of the product.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductCostHistory_ProductID_StartDateProductID, StartDateTable: ProductDescriptionProduct descriptions in several languages.ColumnsNameData TypeDescriptionProductDescriptionIDintPrimary key for ProductDescription records.Descriptionnvarchar(400)Description of the product.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductDescription_ProductDescriptionIDProductDescriptionIDAK_ProductDescription_rowguidrowguidTable: ProductDocumentCross-reference table mapping products to related product documents.ColumnsNameData TypeDescriptionProductIDintProduct identification number. Foreign key to Product.ProductID.DocumentNodehierarchyidDocument identification number. Foreign key to Document.DocumentNode.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductDocument_ProductID_DocumentNodeProductID, DocumentNodeTable: ProductInventoryProduct inventory information.ColumnsNameData TypeDescriptionProductIDintProduct identification number. Foreign key to Product.ProductID.LocationIDsmallintInventory location identification number. Foreign key to Location.LocationID. Shelfnvarchar(10)Storage compartment within an inventory location.BintinyintStorage container on a shelf in an inventory location.QuantitysmallintQuantity of products in the inventory location.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductInventory_ProductID_LocationIDProductID, LocationIDTable: ProductListPriceHistoryChanges in the list price of a product over time.ColumnsNameData TypeDescriptionProductIDintProduct identification number. Foreign key to Product.ProductIDStartDatedatetimeList price start date.EndDatedatetimeList price end dateListPricemoneyProduct list price.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductListPriceHistory_ProductID_StartDateProductID, StartDateTable: ProductModelProduct model classification.ColumnsNameData TypeDescriptionProductModelIDintPrimary key for ProductModel records.Namenvarchar(50)Product model description.CatalogDescriptionxmlDetailed product catalog information in xml format.InstructionsxmlManufacturing instructions in xml format.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductModel_ProductModelIDProductModelIDAK_ProductModel_NameNameAK_ProductModel_rowguidrowguidTable: ProductModelIllustrationCross-reference table mapping product models and illustrations.ColumnsNameData TypeDescriptionProductModelIDintPrimary key. Foreign key to ProductModel.ProductModelID.IllustrationIDintPrimary key. Foreign key to Illustration.IllustrationID.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductModelIllustration_ProductModelID_IllustrationIDProductModelID, IllustrationIDTable: ProductModelProductDescriptionCultureCross-reference table mapping product descriptions and the language the description is written in.ColumnsNameData TypeDescriptionProductModelIDintPrimary key. Foreign key to ProductModel.ProductModelID.ProductDescriptionIDintPrimary key. Foreign key to ProductDescription.ProductDescriptionID.CultureIDnchar(6)Culture identification number. Foreign key to Culture.CultureID.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureIDProductModelID, ProductDescriptionID, CultureIDTable: ProductPhotoProduct images.ColumnsNameData TypeDescriptionProductPhotoIDintPrimary key for ProductPhoto records.ThumbNailPhotovarbinary(MAX)Small image of the product.ThumbnailPhotoFileNamenvarchar(50)Small image file name.LargePhotovarbinary(MAX)Large image of the product.LargePhotoFileNamenvarchar(50)Large image file name.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductPhoto_ProductPhotoIDProductPhotoIDTable: ProductProductPhotoCross-reference table mapping products and product photos.ColumnsNameData TypeDescriptionProductIDintProduct identification number. Foreign key to Product.ProductID.ProductPhotoIDintProduct photo identification number. Foreign key to ProductPhoto.ProductPhotoID.Primarybit0 = Photo is not the principal image. 1 = Photo is the principal image.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductProductPhoto_ProductID_ProductPhotoIDProductID, ProductPhotoIDTable: ProductReviewCustomer reviews of products they have purchased.ColumnsNameData TypeDescriptionProductReviewIDintPrimary key for ProductReview records.ProductIDintProduct identification number. Foreign key to Product.ProductID.ReviewerNamenvarchar(50)Name of the reviewer.ReviewDatedatetimeDate review was submitted.EmailAddressnvarchar(50)Reviewer's e-mail address.RatingintProduct rating given by the reviewer. Scale is 1 to 5 with 5 as the highest mentsnvarchar(3850)Reviewer's commentsModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductReview_ProductReviewIDProductReviewIDTable: ProductSubcategoryProduct subcategories. See ProductCategory table.ColumnsNameData TypeDescriptionProductSubcategoryIDintPrimary key for ProductSubcategory records.ProductCategoryIDintProduct category identification number. Foreign key to ProductCategory.ProductCategoryID.Namenvarchar(50)Subcategory description.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductSubcategory_ProductSubcategoryIDProductSubcategoryIDAK_ProductSubcategory_NameNameAK_ProductSubcategory_rowguidrowguidTable: ScrapReasonManufacturing failure reasons lookup table.ColumnsNameData TypeDescriptionScrapReasonIDsmallintPrimary key for ScrapReason records.Namenvarchar(50)Failure description.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ScrapReason_ScrapReasonIDScrapReasonIDAK_ScrapReason_NameNameTable: TransactionHistoryRecord of each purchase order, sales order, or work order transaction year to date.ColumnsNameData TypeDescriptionTransactionIDintPrimary key for TransactionHistory records.ProductIDintProduct identification number. Foreign key to Product.ProductID.ReferenceOrderIDintPurchase order, sales order, or work order identification number.ReferenceOrderLineIDintLine number associated with the purchase order, sales order, or work order.TransactionDatedatetimeDate and time of the transaction.TransactionTypenchar(1)W = WorkOrder, S = SalesOrder, P = PurchaseOrderQuantityintProduct quantity.ActualCostmoneyProduct cost.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_TransactionHistory_TransactionIDTransactionIDTable: TransactionHistoryArchiveTransactions for previous years.ColumnsNameData TypeDescriptionTransactionIDintPrimary key for TransactionHistoryArchive records.ProductIDintProduct identification number. Foreign key to Product.ProductID.ReferenceOrderIDintPurchase order, sales order, or work order identification number.ReferenceOrderLineIDintLine number associated with the purchase order, sales order, or work order.TransactionDatedatetimeDate and time of the transaction.TransactionTypenchar(1)W = Work Order, S = Sales Order, P = Purchase OrderQuantityintProduct quantity.ActualCostmoneyProduct cost.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_TransactionHistoryArchive_TransactionIDTransactionIDTable: UnitMeasureUnit of measure lookup table.ColumnsNameData TypeDescriptionUnitMeasureCodenchar(3)Primary key.Namenvarchar(50)Unit of measure description.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_UnitMeasure_UnitMeasureCodeUnitMeasureCodeAK_UnitMeasure_NameNameTable: WorkOrderManufacturing work orders.ColumnsNameData TypeDescriptionWorkOrderIDintPrimary key for WorkOrder records.ProductIDintProduct identification number. Foreign key to Product.ProductID.OrderQtyintProduct quantity to build.StockedQtyintQuantity built and put in inventory.ScrappedQtysmallintQuantity that failed inspection.StartDatedatetimeWork order start date.EndDatedatetimeWork order end date.DueDatedatetimeWork order due date.ScrapReasonIDsmallintReason for inspection failure.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_WorkOrder_WorkOrderIDWorkOrderIDTable: WorkOrderRoutingWork order details.ColumnsNameData TypeDescriptionWorkOrderIDintPrimary key. Foreign key to WorkOrder.WorkOrderID.ProductIDintPrimary key. Foreign key to Product.ProductID.OperationSequencesmallintPrimary key. Indicates the manufacturing process sequence.LocationIDsmallintManufacturing location where the part is processed. Foreign key to Location.LocationID.ScheduledStartDatedatetimePlanned manufacturing start date.ScheduledEndDatedatetimePlanned manufacturing end date.ActualStartDatedatetimeActual start date.ActualEndDatedatetimeActual end date.ActualResourceHrsdecimal(9, 4)Number of manufacturing hours used.PlannedCostmoneyEstimated manufacturing cost.ActualCostmoneyActual manufacturing cost.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequenceWorkOrderID, ProductID, OperationSequenceViewsView: vProductAndDescriptionProduct names and descriptions. Product descriptions are provided in multiple languages.ColumnsNameData TypeDescriptionProductIDintNamenvarchar(50)ProductModelnvarchar(50)CultureIDnchar(6)Descriptionnvarchar(400)View: vProductModelCatalogDescriptionDisplays the content from each element in the xml column CatalogDescription for each product in the Production.ProductModel table that has catalog data.ColumnsNameData TypeDescriptionProductModelIDintNamenvarchar(50)Summarynvarchar(MAX)Manufacturernvarchar(MAX)Copyrightnvarchar(30)ProductURLnvarchar(256)WarrantyPeriodnvarchar(256)WarrantyDescriptionnvarchar(256)NoOfYearsnvarchar(256)MaintenanceDescriptionnvarchar(256)Wheelnvarchar(256)Saddlenvarchar(256)Pedalnvarchar(256)BikeFramenvarchar(MAX)Cranksetnvarchar(256)PictureAnglenvarchar(256)PictureSizenvarchar(256)ProductPhotoIDnvarchar(256)Materialnvarchar(256)Colornvarchar(256)ProductLinenvarchar(256)Stylenvarchar(256)RiderExperiencenvarchar(1024)rowguiduniqueidentifierModifiedDatedatetimeView: vProductModelInstructionsDisplays the content from each element in the xml column Instructions for each product in the Production.ProductModel table that has manufacturing instructions.ColumnsNameData TypeDescriptionProductModelIDintNamenvarchar(50)Instructionsnvarchar(MAX)LocationIDintSetupHoursdecimal(9, 4)MachineHoursdecimal(9, 4)LaborHoursdecimal(9, 4)LotSizeintStepnvarchar(1024)rowguiduniqueidentifierModifiedDatedatetimeProceduresProcedure: uspGetBillOfMaterialsStored procedure using a recursive query to return a multi-level bill of material for the specified ProductID.Input/OutputNameData TypeDescriptionStartProductIDint CheckDatedatetime Procedure: uspGetWhereUsedProductIDStored procedure using a recursive query to return all components or assemblies that directly or indirectly use the specified ProductID.Input/OutputNameData TypeDescriptionStartProductIDint CheckDatedatetime FunctionsFunction: ufnGetProductDealerPriceScalar function returning the dealer price for a given product on a particular order date.Input/OutputNameData TypeDescriptionReturnsmoney ProductIDint OrderDatedatetime Function: ufnGetProductListPriceScalar function returning the list price for a given product on a particular order date.Input/OutputNameData TypeDescriptionReturnsmoney ProductIDint OrderDatedatetime Function: ufnGetProductStandardCostScalar function returning the standard cost for a given product on a particular order date.Input/OutputNameData TypeDescriptionReturnsmoney ProductIDint OrderDatedatetime Function: ufnGetStockScalar function returning the quantity of inventory in LocationID 6 (Miscellaneous Storage)for a specified ProductID.Input/OutputNameData TypeDescriptionReturnsint ProductIDint PurchasingTablesTable: ProductVendorCross-reference table mapping vendors with the products they supply.ColumnsNameData TypeDescriptionProductIDintPrimary key. Foreign key to Product.ProductID.BusinessEntityIDintPrimary key. Foreign key to Vendor.BusinessEntityID.AverageLeadTimeintThe average span of time (in days) between placing an order with the vendor and receiving the purchased product.StandardPricemoneyThe vendor's usual selling price.LastReceiptCostmoneyThe selling price when last purchased.LastReceiptDatedatetimeDate the product was last received by the vendor.MinOrderQtyintThe maximum quantity that should be ordered.MaxOrderQtyintThe minimum quantity that should be ordered.OnOrderQtyintThe quantity currently on order.UnitMeasureCodenchar(3)The product's unit of measure.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ProductVendor_ProductID_BusinessEntityIDProductID, BusinessEntityIDTable: PurchaseOrderDetailIndividual products associated with a specific purchase order. See PurchaseOrderHeader.ColumnsNameData TypeDescriptionPurchaseOrderIDintPrimary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID.PurchaseOrderDetailIDintPrimary key. One line number per purchased product.DueDatedatetimeDate the product is expected to be received.OrderQtysmallintQuantity ordered.ProductIDintProduct identification number. Foreign key to Product.ProductID.UnitPricemoneyVendor's selling price of a single product.LineTotalmoneyPer product subtotal. Computed as OrderQty * UnitPrice.ReceivedQtydecimal(8, 2)Quantity actually received from the vendor.RejectedQtydecimal(8, 2)Quantity rejected during inspection.StockedQtydecimal(9, 2)Quantity accepted into inventory. Computed as ReceivedQty - RejectedQty.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_PurchaseOrderDetail_PurchaseOrderID_PurchaseOrderDetailIDPurchaseOrderID, PurchaseOrderDetailIDTable: PurchaseOrderHeaderGeneral purchase order information. See PurchaseOrderDetail.ColumnsNameData TypeDescriptionPurchaseOrderIDintPrimary key.RevisionNumbertinyintIncremental number to track changes to the purchase order over time.StatustinyintOrder current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = CompleteEmployeeIDintEmployee who created the purchase order. Foreign key to Employee.BusinessEntityID.VendorIDintVendor with whom the purchase order is placed. Foreign key to Vendor.BusinessEntityID.ShipMethodIDintShipping method. Foreign key to ShipMethod.ShipMethodID.OrderDatedatetimePurchase order creation date.ShipDatedatetimeEstimated shipment date from the vendor.SubTotalmoneyPurchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.TaxAmtmoneyTax amount.FreightmoneyShipping cost.TotalDuemoneyTotal due to vendor. Computed as Subtotal + TaxAmt + Freight.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_PurchaseOrderHeader_PurchaseOrderIDPurchaseOrderIDTable: ShipMethodShipping company lookup table.ColumnsNameData TypeDescriptionShipMethodIDintPrimary key for ShipMethod records.Namenvarchar(50)Shipping company name.ShipBasemoneyMinimum shipping charge.ShipRatemoneyShipping charge per pound.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ShipMethod_ShipMethodIDShipMethodIDAK_ShipMethod_NameNameAK_ShipMethod_rowguidrowguidTable: VendorCompanies from whom Adventure Works Cycles purchases parts or other goods.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key for Vendor records. Foreign key to BusinessEntity.BusinessEntityIDAccountNumbernvarchar(15)Vendor account (identification) number.Namenvarchar(50)Company name.CreditRatingtinyint1 = Superior, 2 = Excellent, 3 = Above average, 4 = Average, 5 = Below averagePreferredVendorStatusbit0 = Do not use if another vendor is available. 1 = Preferred over other vendors supplying the same product.ActiveFlagbit0 = Vendor no longer used. 1 = Vendor is actively used.PurchasingWebServiceURLnvarchar(1024)Vendor URL.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Vendor_BusinessEntityIDBusinessEntityIDAK_Vendor_AccountNumberAccountNumberViewsView: vVendorWithAddressesVendor (company) names and addresses .ColumnsNameData TypeDescriptionBusinessEntityIDintNamenvarchar(50)AddressTypenvarchar(50)AddressLine1nvarchar(60)AddressLine2nvarchar(60)Citynvarchar(30)StateProvinceNamenvarchar(50)PostalCodenvarchar(15)CountryRegionNamenvarchar(50)View: vVendorWithContactsVendor (company) names and the names of vendor employees to contact.ColumnsNameData TypeDescriptionBusinessEntityIDintNamenvarchar(50)ContactTypenvarchar(50)Titlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)PhoneNumbernvarchar(25)PhoneNumberTypenvarchar(50)EmailAddressnvarchar(50)EmailPromotionintFunctionsFunction: ufnGetPurchaseOrderStatusTextScalar function returning the text representation of the Status column in the PurchaseOrderHeader table.Input/OutputNameData TypeDescriptionReturnsnvarchar(15)Statustinyint SalesTablesTable: CountryRegionCurrencyCross-reference table mapping ISO currency codes to a country or region.ColumnsNameData TypeDescriptionCountryRegionCodenvarchar(3)ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode.CurrencyCodenchar(3)ISO standard currency code. Foreign key to Currency.CurrencyCode.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_CountryRegionCurrency_CountryRegionCode_CurrencyCodeCountryRegionCode, CurrencyCodeTable: CreditCardCustomer credit card information.ColumnsNameData TypeDescriptionCreditCardIDintPrimary key for CreditCard records.CardTypenvarchar(50)Credit card name.CardNumbernvarchar(25)Credit card number.ExpMonthtinyintCredit card expiration month.ExpYearsmallintCredit card expiration year.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_CreditCard_CreditCardIDCreditCardIDAK_CreditCard_CardNumberCardNumberTable: CurrencyLookup table containing standard ISO currencies.ColumnsNameData TypeDescriptionCurrencyCodenchar(3)The ISO code for the Currency.Namenvarchar(50)Currency name.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Currency_CurrencyCodeCurrencyCodeAK_Currency_NameNameTable: CurrencyRateCurrency exchange rates.ColumnsNameData TypeDescriptionCurrencyRateIDintPrimary key for CurrencyRate records.CurrencyRateDatedatetimeDate and time the exchange rate was obtained.FromCurrencyCodenchar(3)Exchange rate was converted from this currency code.ToCurrencyCodenchar(3)Exchange rate was converted to this currency code.AverageRatemoneyAverage exchange rate for the day.EndOfDayRatemoneyFinal exchange rate for the day.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_CurrencyRate_CurrencyRateIDCurrencyRateIDAK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCodeCurrencyRateDate, FromCurrencyCode, ToCurrencyCodeTable: CustomerCurrent customer information. Also see the Person and Store tables.ColumnsNameData TypeDescriptionCustomerIDintPrimary key.PersonIDintForeign key to Person.BusinessEntityIDStoreIDintForeign key to Store.BusinessEntityIDTerritoryIDintID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID.AccountNumbervarchar(10)Unique number identifying the customer assigned by the accounting system.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Customer_CustomerIDCustomerIDAK_Customer_AccountNumberAccountNumberAK_Customer_rowguidrowguidTable: PersonCreditCardCross-reference table mapping people to their credit card information in the CreditCard table. ColumnsNameData TypeDescriptionBusinessEntityIDintBusiness entity identification number. Foreign key to Person.BusinessEntityID.CreditCardIDintCredit card identification number. Foreign key to CreditCard.CreditCardID.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_PersonCreditCard_BusinessEntityID_CreditCardIDBusinessEntityID, CreditCardIDTable: SalesOrderDetailIndividual products associated with a specific sales order. See SalesOrderHeader.ColumnsNameData TypeDescriptionSalesOrderIDintPrimary key. Foreign key to SalesOrderHeader.SalesOrderID.SalesOrderDetailIDintPrimary key. One incremental unique number per product sold.CarrierTrackingNumbernvarchar(25)Shipment tracking number supplied by the shipper.OrderQtysmallintQuantity ordered per product.ProductIDintProduct sold to customer. Foreign key to Product.ProductID.SpecialOfferIDintPromotional code. Foreign key to SpecialOffer.SpecialOfferID.UnitPricemoneySelling price of a single product.UnitPriceDiscountmoneyDiscount amount.LineTotalnumeric(38, 6)Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesOrderDetail_SalesOrderID_SalesOrderDetailIDSalesOrderID, SalesOrderDetailIDAK_SalesOrderDetail_rowguidrowguidTable: SalesOrderHeaderGeneral sales order information.ColumnsNameData TypeDescriptionSalesOrderIDintPrimary key.RevisionNumbertinyintIncremental number to track changes to the sales order over time.OrderDatedatetimeDates the sales order was created.DueDatedatetimeDate the order is due to the customer.ShipDatedatetimeDate the order was shipped to the customer.StatustinyintOrder current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = CancelledOnlineOrderFlagbit0 = Order placed by sales person. 1 = Order placed online by customer.SalesOrderNumbernvarchar(25)Unique sales order identification number.PurchaseOrderNumbernvarchar(25)Customer purchase order number reference. AccountNumbernvarchar(15)Financial accounting number reference.CustomerIDintCustomer identification number. Foreign key to Customer.BusinessEntityID.SalesPersonIDintSales person who created the sales order. Foreign key to SalesPerson.BusinessEntityID.TerritoryIDintTerritory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID.BillToAddressIDintCustomer billing address. Foreign key to Address.AddressID.ShipToAddressIDintCustomer shipping address. Foreign key to Address.AddressID.ShipMethodIDintShipping method. Foreign key to ShipMethod.ShipMethodID.CreditCardIDintCredit card identification number. Foreign key to CreditCard.CreditCardID.CreditCardApprovalCodevarchar(15)Approval code provided by the credit card company.CurrencyRateIDintCurrency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID.SubTotalmoneySales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID.TaxAmtmoneyTax amount.FreightmoneyShipping cost.TotalDuemoneyTotal due from customer. Computed as Subtotal + TaxAmt + mentnvarchar(128)Sales representative comments.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesOrderHeader_SalesOrderIDSalesOrderIDAK_SalesOrderHeader_rowguidrowguidAK_SalesOrderHeader_SalesOrderNumberSalesOrderNumberTable: SalesOrderHeaderSalesReasonCross-reference table mapping sales orders to sales reason codes.ColumnsNameData TypeDescriptionSalesOrderIDintPrimary key. Foreign key to SalesOrderHeader.SalesOrderID.SalesReasonIDintPrimary key. Foreign key to SalesReason.SalesReasonID.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonIDSalesOrderID, SalesReasonIDTable: SalesPersonSales representative current information.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key for SalesPerson records. Foreign key to Employee.BusinessEntityIDTerritoryIDintTerritory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.SalesQuotamoneyProjected yearly sales.BonusmoneyBonus due if quota is missionPctsmallmoneyCommision percent received per sale.SalesYTDmoneySales total year to date.SalesLastYearmoneySales total of previous year.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesPerson_BusinessEntityIDBusinessEntityIDAK_SalesPerson_rowguidrowguidTable: SalesPersonQuotaHistorySales performance tracking.ColumnsNameData TypeDescriptionBusinessEntityIDintSales person identification number. Foreign key to SalesPerson.BusinessEntityID.QuotaDatedatetimeSales quota date.SalesQuotamoneySales quota amount.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDateBusinessEntityID, QuotaDateAK_SalesPersonQuotaHistory_rowguidrowguidTable: SalesReasonLookup table of customer purchase reasons.ColumnsNameData TypeDescriptionSalesReasonIDintPrimary key for SalesReason records.Namenvarchar(50)Sales reason description.ReasonTypenvarchar(50)Category the sales reason belongs to.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesReason_SalesReasonIDSalesReasonIDTable: SalesTaxRateTax rate lookup table.ColumnsNameData TypeDescriptionSalesTaxRateIDintPrimary key for SalesTaxRate records.StateProvinceIDintState, province, or country/region the sales tax applies to.TaxTypetinyint1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions.TaxRatesmallmoneyTax rate amount.Namenvarchar(50)Tax rate description.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesTaxRate_SalesTaxRateIDSalesTaxRateIDAK_SalesTaxRate_rowguidrowguidAK_SalesTaxRate_StateProvinceID_TaxTypeStateProvinceID, TaxTypeTable: SalesTerritorySales territory lookup table.ColumnsNameData TypeDescriptionTerritoryIDintPrimary key for SalesTerritory records.Namenvarchar(50)Sales territory descriptionCountryRegionCodenvarchar(3)ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. Groupnvarchar(50)Geographic area to which the sales territory belong.SalesYTDmoneySales in the territory year to date.SalesLastYearmoneySales in the territory the previous year.CostYTDmoneyBusiness costs in the territory year to date.CostLastYearmoneyBusiness costs in the territory the previous year.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesTerritory_TerritoryIDTerritoryIDAK_SalesTerritory_NameNameAK_SalesTerritory_rowguidrowguidTable: SalesTerritoryHistorySales representative transfers to other sales territories.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key. The sales rep. Foreign key to SalesPerson.BusinessEntityID.TerritoryIDintPrimary key. Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.StartDatedatetimePrimary key. Date the sales representive started work in the territory.EndDatedatetimeDate the sales representative left work in the territory.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SalesTerritoryHistory_BusinessEntityID_StartDate_TerritoryIDBusinessEntityID, StartDate, TerritoryIDAK_SalesTerritoryHistory_rowguidrowguidTable: ShoppingCartItemContains online customer orders until the order is submitted or cancelled.ColumnsNameData TypeDescriptionShoppingCartItemIDintPrimary key for ShoppingCartItem records.ShoppingCartIDnvarchar(50)Shopping cart identification number.QuantityintProduct quantity ordered.ProductIDintProduct ordered. Foreign key to Product.ProductID.DateCreateddatetimeDate the time the record was created.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_ShoppingCartItem_ShoppingCartItemIDShoppingCartItemIDTable: SpecialOfferSale discounts lookup table.ColumnsNameData TypeDescriptionSpecialOfferIDintPrimary key for SpecialOffer records.Descriptionnvarchar(255)Discount description.DiscountPctsmallmoneyDiscount precentage.Typenvarchar(50)Discount type category.Categorynvarchar(50)Group the discount applies to such as Reseller or Customer.StartDatedatetimeDiscount start date.EndDatedatetimeDiscount end date.MinQtyintMinimum discount percent allowed.MaxQtyintMaximum discount percent allowed.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SpecialOffer_SpecialOfferIDSpecialOfferIDAK_SpecialOffer_rowguidrowguidTable: SpecialOfferProductCross-reference table mapping products to special offer discounts.ColumnsNameData TypeDescriptionSpecialOfferIDintPrimary key for SpecialOfferProduct records.ProductIDintProduct identification number. Foreign key to Product.ProductID.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_SpecialOfferProduct_SpecialOfferID_ProductIDSpecialOfferID, ProductIDAK_SpecialOfferProduct_rowguidrowguidTable: StoreCustomers (resellers) of Adventure Works products.ColumnsNameData TypeDescriptionBusinessEntityIDintPrimary key. Foreign key to Customer.BusinessEntityID.Namenvarchar(50)Name of the store.SalesPersonIDintID of the sales person assigned to the customer. Foreign key to SalesPerson.BusinessEntityID.DemographicsxmlDemographic informationg about the store such as the number of employees, annual sales and store type.rowguiduniqueidentifierROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.ModifiedDatedatetimeDate and time the record was last updated.Unique keysNameColumnsDescriptionPK_Store_BusinessEntityIDBusinessEntityIDAK_Store_rowguidrowguidViewsView: vIndividualCustomerIndividual customers (names and addresses) that purchase Adventure Works Cycles products online.ColumnsNameData TypeDescriptionBusinessEntityIDintTitlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)PhoneNumbernvarchar(25)PhoneNumberTypenvarchar(50)EmailAddressnvarchar(50)EmailPromotionintAddressTypenvarchar(50)AddressLine1nvarchar(60)AddressLine2nvarchar(60)Citynvarchar(30)StateProvinceNamenvarchar(50)PostalCodenvarchar(15)CountryRegionNamenvarchar(50)DemographicsxmlView: vPersonDemographicsDisplays the content from each element in the xml column Demographics for each customer in the Person.Person table.ColumnsNameData TypeDescriptionBusinessEntityIDintTotalPurchaseYTDmoneyDateFirstPurchasedatetimeBirthDatedatetimeMaritalStatusnvarchar(1)YearlyIncomenvarchar(30)Gendernvarchar(1)TotalChildrenintNumberChildrenAtHomeintEducationnvarchar(30)Occupationnvarchar(30)HomeOwnerFlagbitNumberCarsOwnedintView: vSalesPersonSales representiatives (names and addresses) and their sales-related information.ColumnsNameData TypeDescriptionBusinessEntityIDintTitlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)JobTitlenvarchar(50)PhoneNumbernvarchar(25)PhoneNumberTypenvarchar(50)EmailAddressnvarchar(50)EmailPromotionintAddressLine1nvarchar(60)AddressLine2nvarchar(60)Citynvarchar(30)StateProvinceNamenvarchar(50)PostalCodenvarchar(15)CountryRegionNamenvarchar(50)TerritoryNamenvarchar(50)TerritoryGroupnvarchar(50)SalesQuotamoneySalesYTDmoneySalesLastYearmoneyView: vSalesPersonSalesByFiscalYearsUses PIVOT to return aggregated sales information for each sales representative.ColumnsNameData TypeDescriptionSalesPersonIDintFullNamenvarchar(152)JobTitlenvarchar(50)SalesTerritorynvarchar(50)2002money2003money2004moneyView: vStoreWithAddressesStores (including store addresses) that sell Adventure Works Cycles products to consumers.ColumnsNameData TypeDescriptionBusinessEntityIDintNamenvarchar(50)AddressTypenvarchar(50)AddressLine1nvarchar(60)AddressLine2nvarchar(60)Citynvarchar(30)StateProvinceNamenvarchar(50)PostalCodenvarchar(15)CountryRegionNamenvarchar(50)View: vStoreWithContactsStores (including store contacts) that sell Adventure Works Cycles products to consumers.ColumnsNameData TypeDescriptionBusinessEntityIDintNamenvarchar(50)ContactTypenvarchar(50)Titlenvarchar(8)FirstNamenvarchar(50)MiddleNamenvarchar(50)LastNamenvarchar(50)Suffixnvarchar(10)PhoneNumbernvarchar(25)PhoneNumberTypenvarchar(50)EmailAddressnvarchar(50)EmailPromotionintView: vStoreWithDemographicsStores (including demographics) that sell Adventure Works Cycles products to consumers.ColumnsNameData TypeDescriptionBusinessEntityIDintNamenvarchar(50)AnnualSalesmoneyAnnualRevenuemoneyBankNamenvarchar(50)BusinessTypenvarchar(5)YearOpenedintSpecialtynvarchar(50)SquareFeetintBrandsnvarchar(30)Internetnvarchar(30)NumberEmployeesintFunctionsFunction: ufnGetSalesOrderStatusTextScalar function returning the text representation of the Status column in the SalesOrderHeader table.Input/OutputNameData TypeDescriptionReturnsnvarchar(15)Statustinyint ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download