TCARPENTER
Programmer
I'm stumped. I have been working on a database to track a product assembly. The problem is this: Product can consist of an Assembly (or Assemblies), which can contain a sub-assembly (or more), which can contain components. However, Product can contain just components, just sub-assemblies, or just assemblies. I thought I was alright with just 4 tables:
Product_Table
Product_Recnum
Product_Desc
Assembly_Recnum
SubAssembly_Recnum
Component_Recnum
Assembly_Table
Assembly_Recnum
Assembly_Desc
SubAssembly_Table
SubAssembly_Recnum
SubAssembly_Desc
Component_Table
Component_Recnum
Component_Desc
All seemed well - created the relationships, forms etc., until a user mentioned sometimes entering the data was becoming tedious as some assemblies contain 25 components with different sub-assemblies (not containing components)...
you get the idea.
My question is this; should my tables include Foreign Keys for each possible configuration (in other words should SubAssembly contain a Foreign Key for components, then should Assembly contain a Foreign Key for Components and SubAssembly?) After looking at the tables I realized I haven't really associated say, the components to sub-assemblies, or the components to an assembly etc. I have read more than a few articles on Heirarchy tables - is this a good case for one? Although, after reading the articles, I'm not convinced I understand how to apply the concepts to an Access database - or do I need to just do something fancier with my forms?
Any advice would be greatly appreciated.
Product_Table
Product_Recnum
Product_Desc
Assembly_Recnum
SubAssembly_Recnum
Component_Recnum
Assembly_Table
Assembly_Recnum
Assembly_Desc
SubAssembly_Table
SubAssembly_Recnum
SubAssembly_Desc
Component_Table
Component_Recnum
Component_Desc
All seemed well - created the relationships, forms etc., until a user mentioned sometimes entering the data was becoming tedious as some assemblies contain 25 components with different sub-assemblies (not containing components)...
you get the idea.
My question is this; should my tables include Foreign Keys for each possible configuration (in other words should SubAssembly contain a Foreign Key for components, then should Assembly contain a Foreign Key for Components and SubAssembly?) After looking at the tables I realized I haven't really associated say, the components to sub-assemblies, or the components to an assembly etc. I have read more than a few articles on Heirarchy tables - is this a good case for one? Although, after reading the articles, I'm not convinced I understand how to apply the concepts to an Access database - or do I need to just do something fancier with my forms?
Any advice would be greatly appreciated.