Editing Production.BillOfMaterials (table)

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|- valign="top"
+
|-
 
| '''Table
 
| '''Table
 
| Production.BillOfMaterials
 
| Production.BillOfMaterials
|- valign="top"
+
|-
| '''Description
 
| Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.
 
 
|}
 
|}
  
=== Columns ===
+
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 17: Line 15:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''PK
 
+
| '''Index
|- valign="top"
+
 +
|-
 
| BillOfMaterialsID
 
| BillOfMaterialsID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for BillOfMaterials records.
+
| PK_BillOfMaterials_BillOfMaterialsID
|- valign="top"
+
|
 +
|-
 
| ProductAssemblyID
 
| ProductAssemblyID
 
| int
 
| int
 
| null
 
| null
 
|  
 
|  
| Parent product identification number. Foreign key to Product.ProductID.
+
|  
|- valign="top"
+
| AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 +
|-
 
| ComponentID
 
| ComponentID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Component identification number. Foreign key to Product.ProductID.
+
|  
|- valign="top"
+
| AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 +
|-
 
| StartDate
 
| StartDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date the component started being used in the assembly item.
+
|  
|- valign="top"
+
| AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 +
|-
 
| EndDate
 
| EndDate
 
| datetime
 
| datetime
 
| null
 
| null
 
|  
 
|  
| Date the component stopped being used in the assembly item.
+
|  
|- valign="top"
+
|
 +
|-
 
| UnitMeasureCode
 
| UnitMeasureCode
 
| nchar(3)
 
| nchar(3)
 
| not null
 
| not null
 
|  
 
|  
| Standard code identifying the unit of measure for the quantity.
+
|  
|- valign="top"
+
| IX_BillOfMaterials_UnitMeasureCode
 +
|-
 
| BOMLevel
 
| BOMLevel
 
| smallint
 
| smallint
 
| not null
 
| not null
 
|  
 
|  
| Indicates the depth the component is from its parent (AssemblyID).
+
|  
|- valign="top"
+
|
 +
|-
 
| PerAssemblyQty
 
| PerAssemblyQty
 
| decimal(8, 2)
 
| decimal(8, 2)
 
| not null
 
| not null
 
| ((1.00))
 
| ((1.00))
| Quantity of the component needed to create the assembly.
+
|  
|- valign="top"
+
|
 +
|-
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time the record was last updated.
 
|}
 
 
=== Primary Key ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Primary Key
 
| '''Columns
 
|- valign="top"
 
| PK_BillOfMaterials_BillOfMaterialsID
 
| BillOfMaterialsID
 
|}
 
 
=== Indexes ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Index
 
| '''Type
 
| '''Columns
 
 
|- valign="top"
 
| AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 
| Unique
 
| ProductAssemblyID, ComponentID, StartDate
 
|- valign="top"
 
| IX_BillOfMaterials_UnitMeasureCode
 
 
|  
 
|  
| UnitMeasureCode
+
|  
 
|}
 
|}
  
=== Check Constraints ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Check Constraint
 
| '''Expression
 
| '''Description
 
  
|- valign="top"
 
| 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)
 
|- valign="top"
 
| CK_BillOfMaterials_EndDate
 
| ([EndDate]>[StartDate] OR [EndDate] IS NULL)
 
| Check constraint EndDate] > [StartDate] OR [EndDate] IS NULL
 
|- valign="top"
 
| CK_BillOfMaterials_PerAssemblyQty
 
| ([PerAssemblyQty]>=(1.00))
 
| Check constraint [PerAssemblyQty] >= (1.00)
 
|- valign="top"
 
| CK_BillOfMaterials_ProductAssemblyID
 
| ([ProductAssemblyID]<>[ComponentID])
 
| Check constraint [ProductAssemblyID] <> [ComponentID]
 
|}
 
  
=== Foreign Keys ===
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 133: Line 90:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
 
+
|- valign="top"
+
|-
 
| [[Production.Product_(table)|Production.Product]]
 
| [[Production.Product_(table)|Production.Product]]
 
| ComponentID
 
| ComponentID
 
| ProductID
 
| ProductID
|- valign="top"
+
|-
 
| [[Production.Product_(table)|Production.Product]]
 
| [[Production.Product_(table)|Production.Product]]
 
| ProductAssemblyID
 
| ProductAssemblyID
 
| ProductID
 
| ProductID
|- valign="top"
+
|-
 
| [[Production.UnitMeasure_(table)|Production.UnitMeasure]]
 
| [[Production.UnitMeasure_(table)|Production.UnitMeasure]]
 
| UnitMeasureCode
 
| UnitMeasureCode
 
| UnitMeasureCode
 
| UnitMeasureCode
 
|}
 
|}
 
=== References ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Dependency Type
 
| '''Object Type
 
| '''Referenced Object
 
 
|- valign="top"
 
| Schema
 
| Schema
 
| [[Production_(schema)|Production]]
 
 
|}
 
 
=== Dependencies ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Reference Type
 
| '''Object Type
 
| '''Referencing Object
 
 
|- valign="top"
 
| Select
 
| Procedure
 
| [[dbo.uspGetBillOfMaterials_(procedure)|dbo.uspGetBillOfMaterials]]
 
 
|- valign="top"
 
| Select
 
| Procedure
 
| [[dbo.uspGetWhereUsedProductID_(procedure)|dbo.uspGetWhereUsedProductID]]
 
 
|}
 
 
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 188: Line 110:
 
| '''Table
 
| '''Table
 
| Production.BillOfMaterials
 
| Production.BillOfMaterials
|- valign="top"
+
|-
 +
 
 
| '''Description
 
| '''Description
 
| Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.
 
| Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.
 
|-
 
|-
 +
 
|}
 
|}
  
Line 208: Line 132:
 
| not null
 
| not null
 
|  
 
|  
| Primary key for BillOfMaterials records.<br />PK_BillOfMaterials_BillOfMaterialsID
+
| Primary key for BillOfMaterials records.PK_BillOfMaterials_BillOfMaterialsID
 
|- valign="top"
 
|- valign="top"
 
| ProductAssemblyID
 
| ProductAssemblyID
Line 214: Line 138:
 
| null
 
| null
 
|  
 
|  
| Parent product identification number. Foreign key to Product.ProductID.<br />AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
+
| Parent product identification number. Foreign key to Product.ProductID.AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 
|- valign="top"
 
|- valign="top"
 
| ComponentID
 
| ComponentID
Line 220: Line 144:
 
| not null
 
| not null
 
|  
 
|  
| Component identification number. Foreign key to Product.ProductID.<br />AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
+
| Component identification number. Foreign key to Product.ProductID.AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 
|- valign="top"
 
|- valign="top"
 
| StartDate
 
| StartDate
Line 226: Line 150:
 
| not null
 
| not null
 
| (GETDATE())
 
| (GETDATE())
| Date the component started being used in the assembly item.<br />AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
+
| Date the component started being used in the assembly item.AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
 
|- valign="top"
 
|- valign="top"
 
| EndDate
 
| EndDate
Line 232: Line 156:
 
| null
 
| null
 
|  
 
|  
| Date the component stopped being used in the assembly item.<br />
+
| Date the component stopped being used in the assembly item.
 
|- valign="top"
 
|- valign="top"
 
| UnitMeasureCode
 
| UnitMeasureCode
Line 238: Line 162:
 
| not null
 
| not null
 
|  
 
|  
| Standard code identifying the unit of measure for the quantity.<br />IX_BillOfMaterials_UnitMeasureCode
+
| Standard code identifying the unit of measure for the quantity.IX_BillOfMaterials_UnitMeasureCode
 
|- valign="top"
 
|- valign="top"
 
| BOMLevel
 
| BOMLevel
Line 244: Line 168:
 
| not null
 
| not null
 
|  
 
|  
| Indicates the depth the component is from its parent (AssemblyID).<br />
+
| Indicates the depth the component is from its parent (AssemblyID).
 
|- valign="top"
 
|- valign="top"
 
| PerAssemblyQty
 
| PerAssemblyQty
Line 250: Line 174:
 
| not null
 
| not null
 
| (1.00)
 
| (1.00)
| Quantity of the component needed to create the assembly.<br />
+
| Quantity of the component needed to create the assembly.
 
|- valign="top"
 
|- valign="top"
 
| ModifiedDate
 
| ModifiedDate
Line 256: Line 180:
 
| not null
 
| not null
 
| (GETDATE())
 
| (GETDATE())
| Date and time the record was last updated.<br />
+
| Date and time the record was last updated.
 
|}
 
|}
  
Line 284: Line 208:
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
| '''Dependency Type
+
| '''Referencing Object
 
| '''Object Type
 
| '''Object Type
| '''Referenced Object
 
 
|-
 
| Schema
 
| Schema
 
| [[Production_(schema)|Production]]
 
 
|}
 
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
 
| '''Reference Type
 
| '''Reference Type
| '''Object Type
+
| '''Referencing Object
 
 
 
 
|-
 
|-
 +
| [[dbo.uspGetBillOfMaterials_(procedure)|dbo.uspGetBillOfMaterials]]
 +
| Procedure
 
| Select
 
| Select
 +
|-
 +
| [[dbo.uspGetWhereUsedProductID_(procedure)|dbo.uspGetWhereUsedProductID]]
 
| Procedure
 
| Procedure
| [[dbo.uspGetBillOfMaterials_(procedure)|dbo.uspGetBillOfMaterials]]
 
 
|-
 
 
| Select
 
| Select
| Procedure
 
| [[dbo.uspGetWhereUsedProductID_(procedure)|dbo.uspGetWhereUsedProductID]]
 
 
 
|}
 
|}

Please note that all contributions to dbscript Online Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)