My question is: should a physical one to one realtionship exist in my design...and should the tblFormulations table exist at all....
I have a small access database to store information for a food technologist in a company. Every now and then, the food technie is given a project (idea) to develop for a client. The project consists of creating a number of samples until the client either terminates the project or one of the samples is accepted and put into production (product). Both products and samples have a number of ingredients (called a formulation). A sample must have exactly one formulation but each sample can be made into more than one product (different sizes). Therefore , there is a 1:1 on Samples and Formulation - which could be absorbed into one table.
However, historical product information may/will be imported into the db, therefore many projects with formulations will not be associated with a sample (or a project). Secondly, samples are involved in other relationships that do not apply to products.
At the moment I have a somewhat strange design (non-relevant field obmitted):
[tt]
tblSamples:
-FormulationID (PK)
-ProjectID
tblFormulations:
-FormulationID (PK)
tblFormulationItems:
-IngredName (CK)
-FormulationID (CK)
tblProducts:
-ProductCode
-FormulationID
[/tt]
Or, should I store the Formulation Items (ingredients) for products and Samples in separate tables. If I do this, then it will be possible to match up a Product to a Sample which has a different mix of ingredients(!).
Any thoughts on how I should relate samples to projects (and their associated formulation).
I'm not sure if by brain is still on the same planet...
Cheers,
Dan
I have a small access database to store information for a food technologist in a company. Every now and then, the food technie is given a project (idea) to develop for a client. The project consists of creating a number of samples until the client either terminates the project or one of the samples is accepted and put into production (product). Both products and samples have a number of ingredients (called a formulation). A sample must have exactly one formulation but each sample can be made into more than one product (different sizes). Therefore , there is a 1:1 on Samples and Formulation - which could be absorbed into one table.
However, historical product information may/will be imported into the db, therefore many projects with formulations will not be associated with a sample (or a project). Secondly, samples are involved in other relationships that do not apply to products.
At the moment I have a somewhat strange design (non-relevant field obmitted):
[tt]
tblSamples:
-FormulationID (PK)
-ProjectID
tblFormulations:
-FormulationID (PK)
tblFormulationItems:
-IngredName (CK)
-FormulationID (CK)
tblProducts:
-ProductCode
-FormulationID
[/tt]
Or, should I store the Formulation Items (ingredients) for products and Samples in separate tables. If I do this, then it will be possible to match up a Product to a Sample which has a different mix of ingredients(!).
Any thoughts on how I should relate samples to projects (and their associated formulation).
I'm not sure if by brain is still on the same planet...
Cheers,
Dan