How do I create a database that can display multiple levels of sub-assemblies?
I'm trying to allow the customer to create these assemblies and easily access them.
Currently I have a part table that has the following fields:
Part_Id, Assembly. (There are other fields, but they aren't important to this)
Part_Id - Unique field to identify part (auto-increment)
Assembly - YES/NO to identify if this part is in fact an assembly made up of other parts.
I then have an assembly_part table that identifies parts in an assembly. It has Part_Id, Assembly, and Assembly_Part_Id.
Part_Id - Unique field to identify part (auto-increment)
Assembly - YES/NO to identify if this part is in fact an assembly made up of other parts.
Assembly_Part_Id - The Part_Id of the assembly that this part is a member of.
A set can then be created that has a one to many link between the Part_id of the "Part table" and the "Assembly_Part" table. This works great for showing one level of assemblies in a part list, but if I have multiple/indeterminant levels of sub-assemblies, I have no good way of allowing the user to see all the parts of the sub-assemblies.
Are there any suggestions of a better way to handle this, or a way to make this method display multiple sub-assemblies?
Thanks for the help. If this is a question that should be addressed elsewhere, let me know.
Tony
I'm trying to allow the customer to create these assemblies and easily access them.
Currently I have a part table that has the following fields:
Part_Id, Assembly. (There are other fields, but they aren't important to this)
Part_Id - Unique field to identify part (auto-increment)
Assembly - YES/NO to identify if this part is in fact an assembly made up of other parts.
I then have an assembly_part table that identifies parts in an assembly. It has Part_Id, Assembly, and Assembly_Part_Id.
Part_Id - Unique field to identify part (auto-increment)
Assembly - YES/NO to identify if this part is in fact an assembly made up of other parts.
Assembly_Part_Id - The Part_Id of the assembly that this part is a member of.
A set can then be created that has a one to many link between the Part_id of the "Part table" and the "Assembly_Part" table. This works great for showing one level of assemblies in a part list, but if I have multiple/indeterminant levels of sub-assemblies, I have no good way of allowing the user to see all the parts of the sub-assemblies.
Are there any suggestions of a better way to handle this, or a way to make this method display multiple sub-assemblies?
Thanks for the help. If this is a question that should be addressed elsewhere, let me know.
Tony
Comment