Sales representative current information.
Creation Date | 27/10/2017 14:33 |
File Group | PRIMARY |
Text File Group | |
System Object | ![]() |
Published for Replication | ![]() |
Rows | 17 |
Data Space Used | 8.00 KB |
Index Space Used | 24.00 KB |
Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
---|---|---|---|---|---|---|---|
![]() | BusinessEntityID | Primary key for SalesPerson records. Foreign key to Employee.BusinessEntityID | Integer | 4 | |||
TerritoryID | Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID. | Integer | 4 | ![]() | |||
SalesQuota | Projected yearly sales. | Currency | 8 | ![]() | |||
Bonus | Bonus due if quota is met. | Currency | 8 | ((0.00)) | |||
CommissionPct | Commision percent received per sale. | Currency | 8 | ((0.00)) | |||
SalesYTD | Sales total year to date. | Currency | 8 | ((0.00)) | |||
SalesLastYear | Sales total of previous year. | Currency | 8 | ((0.00)) | |||
rowguid | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | GUID | 16 | (newid()) | |||
ModifiedDate | Date and time the record was last updated. | DBTimeStamp | 4 | (getdate()) |
Index | Description | Primary | Unique |
---|---|---|---|
AK_SalesPerson_rowguid | Unique nonclustered index. Used to support replication samples. | ![]() | |
PK_SalesPerson_BusinessEntityID | Primary key (clustered) constraint | ![]() | ![]() |
Name | Description | Expression |
---|---|---|
CK_SalesPerson_Bonus | Check constraint [Bonus] >= (0.00) | ([Bonus]>=(0.00)) |
CK_SalesPerson_CommissionPct | Check constraint [CommissionPct] >= (0.00) | ([CommissionPct]>=(0.00)) |
CK_SalesPerson_SalesLastYear | Check constraint [SalesLastYear] >= (0.00) | ([SalesLastYear]>=(0.00)) |
CK_SalesPerson_SalesQuota | Check constraint [SalesQuota] > (0.00) | ([SalesQuota]>(0.00)) |
CK_SalesPerson_SalesYTD | Check constraint [SalesYTD] >= (0.00) | ([SalesYTD]>=(0.00)) |
Relationship | Description |
---|---|
FK_SalesPerson_Employee_BusinessEntityID | Foreign key constraint referencing Employee.EmployeeID. |
FK_SalesPerson_SalesTerritory_TerritoryID | Foreign key constraint referencing SalesTerritory.TerritoryID. |
Database Object | Object Type | Description | Dep Level | |
---|---|---|---|---|
![]() | Sales.Customer | Table | Current customer information. Also see the Person and Store tables. | 2 |
![]() | Sales.SalesOrderHeader | Table | General sales order information. | 1 |
![]() | Sales.SalesOrderHeaderSalesReason | Table | Cross-reference table mapping sales orders to sales reason codes. | 2 |
![]() | Sales.SalesPersonQuotaHistory | Table | Sales performance tracking. | 1 |
![]() | Sales.SalesTerritoryHistory | Table | Sales representative transfers to other sales territories. | 1 |
![]() | Sales.Store | Table | Customers (resellers) of Adventure Works products. | 1 |
![]() | dbo.ufnGetContactInformation | User Defined Function | Table value function returning the first name, last name, job title and contact type for a given contact. | 2 |
![]() | uSalesOrderHeader | Trigger | AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the SalesOrderHeader table.Updates the SalesYTD column in the SalesPerson and SalesTerritory tables. | 2 |
![]() | Sales.vIndividualCustomer | View | Individual customers (names and addresses) that purchase Adventure Works Cycles products online. | 3 |
![]() | Sales.vSalesPerson | View | Sales representiatives (names and addresses) and their sales-related information. | 1 |
![]() | Sales.vSalesPersonSalesByFiscalYears | View | Uses PIVOT to return aggregated sales information for each sales representative. | 1 |
![]() | Sales.vStoreWithAddresses | View | Stores (including store addresses) that sell Adventure Works Cycles products to consumers. | 2 |
![]() | Sales.vStoreWithContacts | View | Stores (including store contacts) that sell Adventure Works Cycles products to consumers. | 2 |
![]() | Sales.vStoreWithDemographics | View | Stores (including demographics) that sell Adventure Works Cycles products to consumers. | 2 |
Database Object | Object Type | Description | Dep Level | |
---|---|---|---|---|
![]() | Person.BusinessEntity | Table | Source of the ID that connects vendors, customers, and employees with address and contact information. | 3 |
![]() | Person.CountryRegion | Table | Lookup table containing the ISO standard codes for countries and regions. | 2 |
![]() | HumanResources.Employee | Table | Employee information such as salary, department, and title. | 1 |
![]() | dbo.Flag | User Defined Data Type | 2 | |
![]() | dbo.NameStyle | User Defined Data Type | 3 | |
![]() | Person.Person | Table | Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts. | 2 |
![]() | Sales.SalesTerritory | Table | Sales territory lookup table. | 1 |
|