ScrewTurn Wiki

Edit

wikibot

TableProduction.ProductCostHistory
DescriptionChanges in the cost of a product over time.

Edit

Columns

ColumnData TypeNullableDefaultDescription
ProductIDintnot null Product identification number. Foreign key to Product.ProductID
StartDatedatetimenot null Product cost start date.
EndDatedatetimenull Product cost end date.
StandardCostmoneynot null Standard cost of the product.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_ProductCostHistory_ProductID_StartDateProductID, StartDate

Edit

Check Constraints

Check ConstraintExpressionDescription
CK_ProductCostHistory_EndDate(EndDate>=StartDate OR EndDate IS NULL)Check constraint EndDate >= StartDate OR EndDate IS NULL
CK_ProductCostHistory_StandardCost(StandardCost>=(0.00))Check constraint StandardCost >= (0.00)

Edit

Foreign Keys

RelationColumnReferenced Column
Production.ProductProductIDProductID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Edit

Dependencies

Reference TypeObject TypeReferencing Object
SelectFunctiondbo.ufnGetProductStandardCost

Edit

automatically generated

TableProduction.ProductCostHistory
DescriptionChanges in the cost of a product over time.

ColumnData TypeNullableDefaultDescription / PK / Index
ProductIDintnot null Product identification number. Foreign key to Product.ProductID
PK_ProductCostHistory_ProductID_StartDate
StartDatedatetimenot null Product cost start date.
PK_ProductCostHistory_ProductID_StartDate
EndDatedatetimenull Product cost end date.
StandardCostmoneynot null Standard cost of the product.
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Production.ProductProductIDProductID

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Reference TypeObject TypeReferencing Object
SelectFunctiondbo.ufnGetProductStandardCost

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.