Northwind Database (Document! X Sample)
AdventureWorks Database / Person Schema / Person.BusinessEntity Table
In This Topic
    Person.BusinessEntity Table
    In This Topic
    Description
    Source of the ID that connects vendors, customers, and employees with address and contact information.
    Properties
    Creation Date27/10/2017 14:33
    File GroupPRIMARY
    Text File Group
    System Object
    Published for Replication
    Rows20777
    Data Space Used768.00 KB
    Index Space Used568.00 KB
    Columns
     Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
    Primary Key Primary key for all customers, vendors, and employees.Integer4   
     ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.GUID16 
    (newid())
     
     Date and time the record was last updated.DBTimeStamp4 
    (getdate())
     
    Indexes
    IndexDescriptionPrimaryUnique
    Unique nonclustered index. Used to support replication samples. 
    Primary key (clustered) constraint
    Relationships
    RelationshipDescription
    Foreign key constraint referencing BusinessEntity.BusinessEntityID.
    Foreign key constraint referencing BusinessEntity.BusinessEntityID.
    Foreign key constraint referencing BusinessEntity.BusinessEntityID.
    Foreign key constraint referencing BusinessEntity.BusinessEntityID
    Foreign key constraint referencing BusinessEntity.BusinessEntityID
    Objects that depend on Person.BusinessEntity
     Database ObjectObject TypeDescriptionDep Level
    Person.BusinessEntityAddress tablePerson.BusinessEntityAddressTableCross-reference table mapping customers, vendors, and employees to their addresses.1
    Person.BusinessEntityContact tablePerson.BusinessEntityContactTableCross-reference table mapping stores, vendors, and employees to people1
    Sales.Customer tableSales.CustomerTableCurrent customer information. Also see the Person and Store tables.2
    dEmployee triggerdEmployeeTriggerINSTEAD OF DELETE trigger which keeps Employees from being deleted.2
    Production.Document tableProduction.DocumentTableProduct maintenance documents.1
    dVendor triggerdVendorTriggerINSTEAD OF DELETE trigger which keeps Vendors from being deleted.1
    Person.EmailAddress tablePerson.EmailAddressTableWhere to send a person email.1
    HumanResources.Employee tableHumanResources.EmployeeTableEmployee information such as salary, department, and title.3
    HumanResources.EmployeeDepartmentHistory tableHumanResources.EmployeeDepartmentHistoryTableEmployee department transfers.2
    HumanResources.EmployeePayHistory tableHumanResources.EmployeePayHistoryTableEmployee pay history.2
    iduSalesOrderDetail triggeriduSalesOrderDetailTriggerAFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column.3
    iuPerson triggeriuPersonTriggerAFTER 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.1
    HumanResources.JobCandidate tableHumanResources.JobCandidateTableRésumés submitted to Human Resources by job applicants.2
    Person.Password tablePerson.PasswordTableOne way hashed authentication information1
    Person.Person tablePerson.PersonTableHuman beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.4
    Sales.PersonCreditCard tableSales.PersonCreditCardTableCross-reference table mapping people to their credit card information in the CreditCard table. 1
    Person.PersonPhone tablePerson.PersonPhoneTableTelephone number and type of a person.1
    Production.ProductDocument tableProduction.ProductDocumentTableCross-reference table mapping products to related product documents.2
    Purchasing.ProductVendor tablePurchasing.ProductVendorTable

    Vendors are added to the table before any POs are processed.

    1
    Sales.SalesOrderDetail tableSales.SalesOrderDetailTableIndividual products associated with a specific sales order. See SalesOrderHeader.2
    Sales.SalesPerson tableSales.SalesPersonTableSales representative current information.2
    Sales.SalesPersonQuotaHistory tableSales.SalesPersonQuotaHistoryTableSales performance tracking.2
    Sales.SalesTerritoryHistory tableSales.SalesTerritoryHistoryTableSales representative transfers to other sales territories.1
    Sales.Store tableSales.StoreTableCustomers (resellers) of Adventure Works products.1
    dbo.ufnGetContactInformation functiondbo.ufnGetContactInformationUser Defined FunctionTable value function returning the first name, last name, job title and contact type for a given contact.1
    dbo.uspGetEmployeeManagers proceduredbo.uspGetEmployeeManagersStored ProcedureStored procedure using a recursive query to return the direct and indirect managers of the specified employee.1
    dbo.uspGetManagerEmployees proceduredbo.uspGetManagerEmployeesStored ProcedureStored procedure using a recursive query to return the direct and indirect employees of the specified manager.1
    dbo.uspSearchCandidateResumes proceduredbo.uspSearchCandidateResumesStored Procedure 3
    HumanResources.uspUpdateEmployeeHireInfo procedureHumanResources.uspUpdateEmployeeHireInfoStored ProcedureUpdates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters.2
    HumanResources.uspUpdateEmployeeLogin procedureHumanResources.uspUpdateEmployeeLoginStored ProcedureUpdates the Employee table with the values specified in the input parameters for the given BusinessEntityID.2
    HumanResources.uspUpdateEmployeePersonalInfo procedureHumanResources.uspUpdateEmployeePersonalInfoStored ProcedureUpdates the Employee table with the values specified in the input parameters for the given EmployeeID.2
    Person.vAdditionalContactInfo viewPerson.vAdditionalContactInfoViewDisplays the contact name and content from each element in the xml column AdditionalContactInfo for that person.1
    HumanResources.vEmployee viewHumanResources.vEmployeeViewEmployee names and addresses.2
    HumanResources.vEmployeeDepartment viewHumanResources.vEmployeeDepartmentViewReturns employee name, title, and current department.1
    HumanResources.vEmployeeDepartmentHistory viewHumanResources.vEmployeeDepartmentHistoryViewReturns employee name and current and previous departments.1
    Purchasing.Vendor tablePurchasing.VendorTableCompanies from whom Adventure Works Cycles purchases parts or other goods.1
    Sales.vIndividualCustomer viewSales.vIndividualCustomerViewIndividual customers (names and addresses) that purchase Adventure Works Cycles products online.2
    HumanResources.vJobCandidate viewHumanResources.vJobCandidateViewJob candidate names and resumes.3
    HumanResources.vJobCandidateEducation viewHumanResources.vJobCandidateEducationViewDisplays 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.3
    HumanResources.vJobCandidateEmployment viewHumanResources.vJobCandidateEmploymentViewDisplays 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.3
    Sales.vPersonDemographics viewSales.vPersonDemographicsViewDisplays the content from each element in the xml column Demographics for each customer in the Person.Person table.1
    Sales.vSalesPerson viewSales.vSalesPersonViewSales representiatives (names and addresses) and their sales-related information.1
    Sales.vSalesPersonSalesByFiscalYears viewSales.vSalesPersonSalesByFiscalYearsViewUses PIVOT to return aggregated sales information for each sales representative.3
    Sales.vStoreWithAddresses viewSales.vStoreWithAddressesViewStores (including store addresses) that sell Adventure Works Cycles products to consumers.1
    Sales.vStoreWithContacts viewSales.vStoreWithContactsViewStores (including store contacts) that sell Adventure Works Cycles products to consumers.1
    Sales.vStoreWithDemographics viewSales.vStoreWithDemographicsViewStores (including demographics) that sell Adventure Works Cycles products to consumers.1
    Purchasing.vVendorWithAddresses viewPurchasing.vVendorWithAddressesViewVendor (company) names and addresses .2
    Purchasing.vVendorWithContacts viewPurchasing.vVendorWithContactsViewVendor (company) names and the names of vendor employees to contact.1
    SQL
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    CREATE TABLE [Person].[BusinessEntity](
        [BusinessEntityID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
        [rowguid] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
        [ModifiedDate] [datetime] NOT NULL,
     CONSTRAINT [PK_BusinessEntity_BusinessEntityID] PRIMARY KEY CLUSTERED 
    (
        [BusinessEntityID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    
    ALTER TABLE [Person].[BusinessEntity] ADD  CONSTRAINT [DF_BusinessEntity_rowguid]  DEFAULT (newid()) FOR [rowguid]
    ALTER TABLE [Person].[BusinessEntity] ADD  CONSTRAINT [DF_BusinessEntity_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
    See Also