tags:

views:

43

answers:

1

I am constructing a database System using Mysql, this will be an application of about 20 tables. The system contains information on farmers, we work with organic certification and need to record a lot of info for that.

In my system, there are related parent-child tables for farmers, producing years and fields/areas - it's a simple representation of the real world in which farmers farm crops on their fields.

I now need to add several status flags for each one of these levels: a farmer can be certified, or his field can be, or the specific year can be; each of these flags has several states and can occur a number of times.

The obvious solution to this would be to add a child table to every one of these tables, and define the states there.

What I wonder if there is an easier way to do this to avoid getting to many tables? Where/how would be best practise to keep that data?

+1  A: 

What about an indicator on every table that contains data that may or may not be certified? It's easier than adding new tables.

Or, if "certification" is actually a combination of several pieces/fields of data, then have a single "certification" table, and the other tables can reference it through a foreign key (something like "certification_id", which is the key of the "certification" table).

FrustratedWithFormsDesigner