ScrewTurn Wiki

Edit

wikibot

TableProduction.BillOfMaterials
DescriptionItems required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.

Edit

Columns

ColumnData TypeNullableDefaultDescription
BillOfMaterialsIDintnot null Primary key for BillOfMaterials records.
ProductAssemblyIDintnull Parent product identification number. Foreign key to Product.ProductID.
ComponentIDintnot null Component identification number. Foreign key to Product.ProductID.
StartDatedatetimenot null(getdate())Date the component started being used in the assembly item.
EndDatedatetimenull Date the component stopped being used in the assembly item.
UnitMeasureCodenchar(3)not null Standard code identifying the unit of measure for the quantity.
BOMLevelsmallintnot null Indicates the depth the component is from its parent (AssemblyID).
PerAssemblyQtydecimal(8, 2)not null((1.00))Quantity of the component needed to create the assembly.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_BillOfMaterials_BillOfMaterialsIDBillOfMaterialsID

Edit

Indexes

IndexTypeColumns
AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDateUniqueProductAssemblyID, ComponentID, StartDate
IX_BillOfMaterials_UnitMeasureCode UnitMeasureCode

Edit

Check Constraints

Check ConstraintExpressionDescription
CK_BillOfMaterials_BOMLevel(ProductAssemblyID IS NULL AND BOMLevel=(0) AND PerAssemblyQty=(1.00) OR ProductAssemblyID IS NOT NULL AND BOMLevel>=(1))Check constraint ProductAssemblyID IS NULL AND BOMLevel = (0) AND PerAssemblyQty = (1) OR ProductAssemblyID IS NOT NULL AND BOMLevel >= (1)
CK_BillOfMaterials_EndDate(EndDate>StartDate OR EndDate IS NULL)Check constraint EndDate] > StartDate OR EndDate IS NULL
CK_BillOfMaterials_PerAssemblyQty(PerAssemblyQty>=(1.00))Check constraint PerAssemblyQty >= (1.00)
CK_BillOfMaterials_ProductAssemblyID(ProductAssemblyID<>ComponentID)Check constraint ProductAssemblyID <> ComponentID

Edit

Foreign Keys

RelationColumnReferenced Column
Production.ProductComponentIDProductID
Production.ProductProductAssemblyIDProductID
Production.UnitMeasureUnitMeasureCodeUnitMeasureCode

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Edit

Dependencies

Reference TypeObject TypeReferencing Object
SelectProceduredbo.uspGetBillOfMaterials
SelectProceduredbo.uspGetWhereUsedProductID

Edit

automatically generated

TableProduction.BillOfMaterials
DescriptionItems required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.

ColumnData TypeNullableDefaultDescription / PK / Index
BillOfMaterialsIDintnot null Primary key for BillOfMaterials records.
PK_BillOfMaterials_BillOfMaterialsID
ProductAssemblyIDintnull Parent product identification number. Foreign key to Product.ProductID.
AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
ComponentIDintnot null Component identification number. Foreign key to Product.ProductID.
AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
StartDatedatetimenot null(GETDATE())Date the component started being used in the assembly item.
AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
EndDatedatetimenull Date the component stopped being used in the assembly item.
UnitMeasureCodenchar(3)not null Standard code identifying the unit of measure for the quantity.
IX_BillOfMaterials_UnitMeasureCode
BOMLevelsmallintnot null Indicates the depth the component is from its parent (AssemblyID).
PerAssemblyQtydecimal(8, 2)not null(1.00)Quantity of the component needed to create the assembly.
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Production.ProductComponentIDProductID
Production.ProductProductAssemblyIDProductID
Production.UnitMeasureUnitMeasureCodeUnitMeasureCode

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Reference TypeObject TypeReferencing Object
SelectProceduredbo.uspGetBillOfMaterials
SelectProceduredbo.uspGetWhereUsedProductID

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