E
esn
I have a database of vegetation data for a series of geographic points
that contains multiple tables based on different categories of data,
such as "trees," "stumps," "saplings," etc. I have set it up so that
the tables are all related to one "plot description" table, which
contains a few general characteristics for each point for each year.
My problem is that when I try to query the data stored in multiple
tables I get cartesian results when I don't want them.
For example, if I try to design a query to tell me how many trees are
in a particular plot, all is well. I can use the count function and
return the correct number of trees. But if I try to include the
number of stumps as well I get a cartesian effect, wherein the totals
are multiplied by each other at each site. This is clearly not what
I'm looking for.
I've tried changing the properties of the joins between tables and had
no success, in fact it only caused more problems by excluding sites
completely where the count in one or the other table was zero. I've
also tried creating direct joins between the trees and stumps tables
in addition to the relationships they each have with the "plot
description" table, but then the query won't run. The "unique
records" and "unique values" properties don't seem to help either.
As an added complication, my goal is to create a database that's easy
for someone without a solid background in Access to use. I know I
could get the correct query results by using subqueryies, but if the
people using the database have to write several subqueries to get some
basic statistics from the data they won't be happy.
So my question is this: is there a better way for me to organize this
database so that data from multiple tables can be queried at once
without cartesian results? Or is there something I'm overlooking when
writing these queries that will avoid this problem?
that contains multiple tables based on different categories of data,
such as "trees," "stumps," "saplings," etc. I have set it up so that
the tables are all related to one "plot description" table, which
contains a few general characteristics for each point for each year.
My problem is that when I try to query the data stored in multiple
tables I get cartesian results when I don't want them.
For example, if I try to design a query to tell me how many trees are
in a particular plot, all is well. I can use the count function and
return the correct number of trees. But if I try to include the
number of stumps as well I get a cartesian effect, wherein the totals
are multiplied by each other at each site. This is clearly not what
I'm looking for.
I've tried changing the properties of the joins between tables and had
no success, in fact it only caused more problems by excluding sites
completely where the count in one or the other table was zero. I've
also tried creating direct joins between the trees and stumps tables
in addition to the relationships they each have with the "plot
description" table, but then the query won't run. The "unique
records" and "unique values" properties don't seem to help either.
As an added complication, my goal is to create a database that's easy
for someone without a solid background in Access to use. I know I
could get the correct query results by using subqueryies, but if the
people using the database have to write several subqueries to get some
basic statistics from the data they won't be happy.
So my question is this: is there a better way for me to organize this
database so that data from multiple tables can be queried at once
without cartesian results? Or is there something I'm overlooking when
writing these queries that will avoid this problem?