Proper Table(s) Layout

Q

QB

I have created a couple of Dbs which the table structure seemed to simply
fall into place, it was just logical in my head.

That said, I am working on a new db and for some reason I am doubting myself
and wanted a second opinion.

The db is basically a contract db to input all the info, and there is a lot
of info, for each contract. Where I am 'lost' is the fact that the contracts
are broken into categories: clients, components,engineering, warantee... For
all of the components (with the exception of clients) there are a number of
fields but only 1 entry per contract.

Basically my question is, should I be rolling out one huge table with all of
the data or should I be creating a project table and then multiple category
table with a 1-to-1 relationship? My gut is telling me to go with a single
table, but at the same time I have never needed to create such a big table
and it feels wrong!

Thank you for your enlightenment on the subject.

QB
 
D

Dorian

I would read up on the rules for database normalization.
If your different types of contract have substantially different data
requirements, I'd put anything common in one table and anything specific to
that type of contract in a separate table.
However, to an extent it depends on how the data will be accessed and used
and also the volume of the data.
If you went with one table and then later needed to add a new type of
contract, it could be a hassle whereas if you had separate tables it would be
easier.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
P

PieterLinden via AccessMonster.com

QB said:
I have created a couple of Dbs which the table structure seemed to simply
fall into place, it was just logical in my head.

That said, I am working on a new db and for some reason I am doubting myself
and wanted a second opinion.

The db is basically a contract db to input all the info, and there is a lot
of info, for each contract. Where I am 'lost' is the fact that the contracts
are broken into categories: clients, components,engineering, warantee... For
all of the components (with the exception of clients) there are a number of
fields but only 1 entry per contract.

Basically my question is, should I be rolling out one huge table with all of
the data or should I be creating a project table and then multiple category
table with a 1-to-1 relationship? My gut is telling me to go with a single
table, but at the same time I have never needed to create such a big table
and it feels wrong!

Definitely one main table and several 1-1 tables. Basically, this is
subclassing. There's an article on Access Web that explains how to do it...
http://www.mvps.org/access/tables/tbl0013.htm
 
J

Jeff Boyce

I'm with Dorian ...

Any time you build a "large" (i.e., wide) table, you risk having to maintain
it (i.e., fix it), and any related queries, forms, reports, code, etc.

Even though it means more work now, normalizing your data structure at the
beginning makes for less work ongoing. Pay now or pay later!

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top