D
DougW via AccessMonster.com
I am working my way through my first Access project in many years.
I could use some advice on how to proceed.
The database is set up to track ordered items. We have a pre-defined set of
all possible components we might order (this in a table called Components).
There is another table of PurchaseOrders (basically just a list of unique PO
numbers we have issued).
These entries in these two tables were used to populate a very large table
called OrderedItems.
The OrderedItems table has a record for each individual Component ordered
along with the PO it was ordered on.
All these tables and supporting forms are now in place and reasonably
functional.
Now I need to collect OrderedItems into Assemblies. An assembly will be a
unique identifiable physical collection of parts(OrderedItems) that will be
assembled together and delivered to a customer. There will be a finite set
of permutations of components defining a particular Assembly. I am
considering adding another table called Configurations. A Configuration
would be the "recipe" that dictates which Component types, and what quantity,
will go together.
For example, Configuration #1 might consist of (1) piece of Component (type)
#15, (2) piece of Component #18, and (1) piece of Component #20.
Configuration #2 might consist of (2) pieces of Component #7 and (1) piece of
Component #12. A given Configuration will be the basis for many Assemblies.
Note that I will not always have the same total number of parts (components)
for the different Configurations. Here is where I am getting hazy. Should I
structure my Configuration table with some arbitrary maximum number of
defined components in mind?
Example A: Here is how I might structure the Configuration table for a
maximum of (4) unique components:
ConfigIndex (primary key)
CompAType
CompAQty
CompBType
CompBQty
CompCType
CompCQty
CompDType
CompDQty
I guess this might work if I am allowed to leave some of the fields blank in
some cases (?)
My other option might be to structure my Configuration Table as follows:
Example B:
ConfigIndex (primary key)
ConfigType
CompType
CompQty
-- where I define ConfigType (an integer) in a separate small table. In
this case the records would have less fields, there would be no blank fields,
but I would have more records. I might have 3 records in a row defining
ConfigType #1, then the next 4 records defining ConfigType #2.
Once I have the Configuration table set up, I would like to be able to use it
to populate my Assembly table. Assembly #1 might use Configuration #17. I
would like to use the Configuration table to control a form and query which
would allow me to select only the required (and available) Components from my
OrderedItems table. I have an "Assembly" field in my OrderedItems table
which will link each physical item in OrderedItems to a particular Assembly
index.
Again, the Configuration table could be thought of as the total list of
"recipes".
The Assemblies table will describe physical unique assemblies that bring
together collections of Ordered Items.
I hope this was not too rambling and it makes some sense.
I would appreciate any comments or ideas on how I should handle the
"Configurations" (using Example A, Example B, or some other method). At this
point Example A seems like the prudent way to go, to me...
Thanks in advance for your suggestions!
- Doug
I could use some advice on how to proceed.
The database is set up to track ordered items. We have a pre-defined set of
all possible components we might order (this in a table called Components).
There is another table of PurchaseOrders (basically just a list of unique PO
numbers we have issued).
These entries in these two tables were used to populate a very large table
called OrderedItems.
The OrderedItems table has a record for each individual Component ordered
along with the PO it was ordered on.
All these tables and supporting forms are now in place and reasonably
functional.
Now I need to collect OrderedItems into Assemblies. An assembly will be a
unique identifiable physical collection of parts(OrderedItems) that will be
assembled together and delivered to a customer. There will be a finite set
of permutations of components defining a particular Assembly. I am
considering adding another table called Configurations. A Configuration
would be the "recipe" that dictates which Component types, and what quantity,
will go together.
For example, Configuration #1 might consist of (1) piece of Component (type)
#15, (2) piece of Component #18, and (1) piece of Component #20.
Configuration #2 might consist of (2) pieces of Component #7 and (1) piece of
Component #12. A given Configuration will be the basis for many Assemblies.
Note that I will not always have the same total number of parts (components)
for the different Configurations. Here is where I am getting hazy. Should I
structure my Configuration table with some arbitrary maximum number of
defined components in mind?
Example A: Here is how I might structure the Configuration table for a
maximum of (4) unique components:
ConfigIndex (primary key)
CompAType
CompAQty
CompBType
CompBQty
CompCType
CompCQty
CompDType
CompDQty
I guess this might work if I am allowed to leave some of the fields blank in
some cases (?)
My other option might be to structure my Configuration Table as follows:
Example B:
ConfigIndex (primary key)
ConfigType
CompType
CompQty
-- where I define ConfigType (an integer) in a separate small table. In
this case the records would have less fields, there would be no blank fields,
but I would have more records. I might have 3 records in a row defining
ConfigType #1, then the next 4 records defining ConfigType #2.
Once I have the Configuration table set up, I would like to be able to use it
to populate my Assembly table. Assembly #1 might use Configuration #17. I
would like to use the Configuration table to control a form and query which
would allow me to select only the required (and available) Components from my
OrderedItems table. I have an "Assembly" field in my OrderedItems table
which will link each physical item in OrderedItems to a particular Assembly
index.
Again, the Configuration table could be thought of as the total list of
"recipes".
The Assemblies table will describe physical unique assemblies that bring
together collections of Ordered Items.
I hope this was not too rambling and it makes some sense.
I would appreciate any comments or ideas on how I should handle the
"Configurations" (using Example A, Example B, or some other method). At this
point Example A seems like the prudent way to go, to me...
Thanks in advance for your suggestions!
- Doug