Saturday 25 December 2021

 Bill of material desing.

AdventureWorks database contain a production.billofmaterials table.

This is used to store a hierarchy of ingredients that together form a product. Take a bike for example: it consists of many parts. Some parts are themselves consisting of parts. The part that has subparts is an assembly, while the leaves parts (without any children/sub parts) are called components in the table. Bike1 consists of say a body1 and wheels1, the wheels consist of tube1, tyre1 and rays1. The 1 here to indicate the type/id.

The same wheels1 can be used with bike2, which say consists of body1 and wheels1. 

The table mentioned stores the wheels1 tree (tube1, tyre1 and rays1) twice. Once under the bike1 and another under bike2 (duplication of bom records). This approach has got pros and cons: it duplicates data and tree maintenance and updating. Another approach is to store wheels1 tree and then refer to its root once from the tree of bike1 and another time from the bike2 tree.


No comments:

Post a Comment