MajP
You've got your good things, and you've got mine.
- Local time
- Yesterday, 22:43
- Joined
- May 21, 2018
- Messages
- 9,998
In that demo I had a list of generic parts
tblParts tblParts
I then Create a BOM.
tblBOMs tblBOMs
Now I add the items to a BOM. By placing them in assemblies/sub-assemblies
tblBOM_Items tblBOM_Items
Every Part has a FK relating it to a specific BOM. Every Part has an FK relating to a single Parent assembly/sub-assembly.
So generic Part 9 has a Parent of Part 260 in BOM 1. Generic Part 9 is also a component at the top level of the BOM. So part 9 can be part of many assemblies/sub-assemblies within different BOMs. But specific Item 274 can only have one parent assembly.
Now what is probably missing is relations already established in the Parts table creating sub assemblies. It would be unrealistic each time to have to build each subassembly by adding all the child parts. Instead you would pick an assembly/subassembly from the Parts table to add to the BOM and it would pull in all child records. So there is a self referencing parts reference table and a self referencing BOM data table.
tblParts tblParts
| PartID | PartNumber | PartName | PartSerial | PartCategory |
|---|---|---|---|---|
28 | 82476 | Stage Final | 826877 | |
31 | 826233 | Stage Final | Assembly | |
29 | 824762 | Stage 5 Assembly | Assembly | |
13 | 825514 | PBA | ||
30 | 818222 | New Part | ||
26 | 825037 | Manifold | ||
8 | 816539 | IAP | ||
1 | 824771 | DI | ||
18 | 812082 | 82 Part | ||
20 | 812081 | 81 Part |
tblBOMs tblBOMs
| BOM_ID | BOM_Name | BOM_Date | BOM_Description |
|---|---|---|---|
1 | BOM Demo 1 (824761) | 3/27/2023 | |
2 | BOM Demo 2 | 3/28/2023 | This is another demo BOM wit Stage Final 826233 |
tblBOM_Items tblBOM_Items
| BOM_Item_ID | PartID_FK | ParentPart_ID_FK | BOM_ID_FK |
|---|---|---|---|
260 | 28 | | 1 |
261 | 30 | | 1 |
262 | 26 | | 1 |
263 | 31 | | 1 |
264 | 9 | 260 | 1 |
265 | 5 | 263 | 1 |
266 | 19 | 263 | 1 |
267 | 12 | 262 | 1 |
268 | 9 | | 1 |
269 | 11 | 265 | 1 |
270 | 5 | 267 | 1 |
271 | 23 | 270 | 1 |
272 | 19 | 261 | 1 |
273 | 7 | 272 | 1 |
274 | 20 | | 1 |
275 | 20 | | 1 |
So generic Part 9 has a Parent of Part 260 in BOM 1. Generic Part 9 is also a component at the top level of the BOM. So part 9 can be part of many assemblies/sub-assemblies within different BOMs. But specific Item 274 can only have one parent assembly.
Now what is probably missing is relations already established in the Parts table creating sub assemblies. It would be unrealistic each time to have to build each subassembly by adding all the child parts. Instead you would pick an assembly/subassembly from the Parts table to add to the BOM and it would pull in all child records. So there is a self referencing parts reference table and a self referencing BOM data table.