View Full Version : Redundant Foreign Keys?


jsanders
07-08-2005, 10:01 AM
More on the lot materials management program.

I have a series of related table:

Builder
Subdivision
Lot Number
Lot Option
Lot Materials Details

The [Lot Materials Details] table is populated by appending data from the [House Type Details] table tree as follows:

Builder
House Type
Elevation
Options Per Elevation
House Type Materials Details

The filtered Option Table in both branches determine which [House Type Materials Details] records get appended to the [Lot Materials Details] table.

The question is:
Is there any advantage, other than simpler queries later on, to adding the primary key from the [House Type Materials Details] table to the [Lot Materials Details] table.

It’s redundant because the [Lot Options Table] contains the [Options Per Elevation] primary key.

Any thoughts?

KenHigg
07-08-2005, 10:09 AM
Would it be possible to post your entire tables structure? I sense there are some normalization issues...

jsanders
07-11-2005, 04:11 AM
Hey Ken,
Thanks for answering.
You’re absolutely right it is a normalization problem.
Actually I had forgotten that I posed this question.
Once you have a foreign key connecting different branch of data it should be all you need.
So the answer to my own question is no. there is no advantage. And your suggestion that it was a normalization problem got the gears in my head going.

MOST IMPORTANT POINT IN THIS ENTIRE THREAD

If at all possible; the table that contains the two (2) Foreign Keys should be at the very end of the branches.

Because later when it becomes important to compare data from one branch to another, the more discrete (more detail) the finer the resolution.

Typically the details tables would contain the 2nd Foreign Key.