Table Design Question

D

Debris

Hello,

This is more of a design / philosophy question than anything. Let me start
with an example:

Let's say I have a table of data about Suppliers, and it stores the
suppliers' name (primary key), address, city, state, etc. Let's say I also
keep track of the color of the supplier's delivery trucks. (Hey, it's just
an example.) Would you just add a field to the end of the supplier table,
or create a new table with basically two fields, the supplier ID and the
color?

I guess what I'm asking is, let's say I have a table with a primary key and
ten other fields. While all of the fields somehow relate to / describe the
primary key, that tenth field has nothing to do with the other nine. Would
you keep all of these fields in the same table?

Thanks, D
 
G

Guest

Normal form states that all of the fields in a table relate to the key and
only the key. They do not need to relate to each other. If an attribute of
key can have only one value (in your example, all of the supplier's trucks
are the same color), then there is no reason to put that in a separate table.
That would be a 1:1 relation, which is used in special cases, usually when
some attributes apply to a subset of an entity. Example - bibliographic
citations from books and periodicals. The latter need issue data, the former
do not.
 
D

Debris

Thanks for the help. You answered my question much more succinctly than I
asked it.

BTW, I didn't mean to piggyback on someone else's question... It wasn't
until I posted my message that I realized someone else had already titled
their message "Table Design Question..."

D
 

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

Similar Threads


Top