AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.SalesPerson
Description:Sales representative current information.
Primary Keys:SalesPersonID
FieldTypeDefaultsNulls?Comments
SalesPersonIDintNoneNoPrimary key for SalesPerson records.
TerritoryIDintNoneYesTerritory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
SalesQuotamoneyNoneYesProjected yearly sales.
Bonusmoney((0.00))NoBonus due if quota is met.
CommissionPctsmallmoney((0.00))NoCommision percent received per sale.
SalesYTDmoney((0.00))NoSales total year to date.
SalesLastYearmoney((0.00))NoSales total of previous year.
rowguiduniqueidentifier(newid())NoROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_SalesPerson_SalesPersonIDYesYesSalesPersonID
AK_SalesPerson_rowguidNoYesrowguid

Check ConstraintText
CK_SalesPerson_SalesQuota([SalesQuota]>(0.00))
CK_SalesPerson_Bonus([Bonus]>=(0.00))
CK_SalesPerson_CommissionPct([CommissionPct]>=(0.00))
CK_SalesPerson_SalesYTD([SalesYTD]>=(0.00))
CK_SalesPerson_SalesLastYear([SalesLastYear]>=(0.00))

Internal Foreign Key ConstraintAffected FieldSource Table
FK_SalesPerson_Employee_SalesPersonIDSalesPersonIDHumanResources.Employee
FK_SalesPerson_SalesTerritory_TerritoryIDTerritoryIDSales.SalesTerritory

Primary Key as Foreign Key ConstraintAffected TableAffected Field
FK_SalesOrderHeader_SalesPerson_SalesPersonIDSales.SalesOrderHeaderSalesPersonID
FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonIDSales.SalesPersonQuotaHistorySalesPersonID
FK_SalesTerritoryHistory_SalesPerson_SalesPersonIDSales.SalesTerritoryHistorySalesPersonID
FK_Store_SalesPerson_SalesPersonIDSales.StoreSalesPersonID

No triggers