With only some basic knowledge of nursery operations, I can only guess that
there are some pretty significant differences between your pesticides,
fertilizers, and irrigation.
Yes, they could all be a type of application, in which case you would do
something like this:
application
[application_id] PK
[app_apply_type_id] FK table apply_type
[app_amount]
apply_type
[apply_type_id] PK
[at_desc] (fertilizer, pesticide, irrigation)
section
[section_id] PK
[sec_description]
application_section_link
[as_application_id] FK
[as_section_id] FK
That way, they apply_type is easily linked into queries.
My guess is, however, that there are significant important differences
between fertilizers, pesticides, and irrigation, and that they are different
enough that you want to capture more than just that they are types of
applications. You could do this, to create a hierarchal table structure, if
they share several inherited characteristics from application, and have only
a few characteristics of their own:
application
[application_id] PK
[app_amount]
pesticide
[application_id] FK table application, 1 to 1 relation
[pst_lethalness]
fertilizer
[application_id] FK table application, 1 to 1 relation
[frt_is_liquid]
irrigation
[application_id] FK table application, 1 to 1 relation
[irr_duration]
section
[section_id] PK
[sec_description]
application_section_link
[as_application_id] FK
[as_section_id] FK
Your queries then JOIN section
JOIN application_section
JOIN application
JOIN (specified table)
which looks complex, but is very easy in query designer.
Of course you could also do it the other way, if fertilizers, pesticides,
and irrigation have little in common, and the first two have so many
potential characteristics, that any benefit of being in a hierarchal
structure would be minimal compared to the hassle. So ...
fertilizer
[fertilizer_id] PK
[frt_amount]
[frt_brand]
[frt_water_mix]
pesticide
[pesticide_id] PK
[pst_amount]
[pst_brand]
[pst_list_o_pests]
irrigation
[irrigation_id] PK
[irr_amount]
section
[section_id] PK
[sec_description]
fertilizer_section_link
[fs_fertilizer_id] FK
[fs_section_id] FK
pesticide_section_link
[ps_pesticide_id] FK
[ps_section_id] FK
irrigation_section_link
[is_irrigation_id] FK
[is_section_id] FK
Your queries are simpler:
JOIN section
JOIN irrigation_section
JOIN irrigation
But you've increased the tables, and possibly lost a valuable ability to
query all amount fields at once without a UNION query.
Ask yourself,
Are these 3 colors of the same make and model car?
Are these 3 models of cars?
or
Are these 3 objects that all just happen to move?

Signature
Darryl Kerkeslager
> Firstly, regarding the multiple tables. In the nursery, there is spray
> applications, fertiliser applications and irrigation application. Each
[quoted text clipped - 29 lines]
>
> Reg
Regnab - 17 Nov 2006 05:34 GMT
Thanks again Darryl,
The car example is a good way of thinking about it. Fertilising,
Spraying and Irrigating are different operations which have different
fields and different dependent tables related to them. What I was
thinking about it that they all have a "tblApplicationSection"
associated with them (a nursery is divided into a number of different
sections or areas)- the different sections where the one application
(spray, fertiliser, irrigation) has occured. I have a "tblSection" with
section details, and tblApplicationSection links the two.
I think I might go with the seperate tables because it'll be a lot
cleaner as far as queries are concerned. Being able to search them
together is not really required.
Thanks again for your quick response,
Cheers
Reg