joining two tables

T

Tyler

I have two tables TBL_Lookup_Features and TBL_Main

TBL_Lookup_Features contains three columns (unique ID, Feature_Name,
Feature_Concern)

TBL_Main contains 10 fields (Feature_01 to Feature_10) as well as
other non related fields

The user selects a feature from a list in the Feature_01 to 10 fields.

My problem is that i need to join these tables so that when i create
the report I can output the Feature_Concern that is related to the
Feature selected.

Im not exactly how to do this, i know that the 10 field listings are
the not the best method of doing this. Does anyone have any
suggestions on what i should be naming the fields and how i can join
the tables?
 
M

mscertified

Your table design is not normalized since you have repeating groups in your
Main table. I strongly suggest you put the features 1 thru 10 in a separate
table linked to your Main table.

-Dorian
 
J

Jason Lepack

You have a many-to-many relationship and your design is not
normalised. You should have a thrid table that links these two.

Example (Similar to yours, and mentioned a day or two ago)

tbl_car:
car_id
car_vin
etc.

tbl_features:
feature_id
feature_name
feature_desc

tbl_car_features_link:
car_id
feature_id

With this link table, a car can have any number of features. Then
querying with this you can look up features by car, or cars by
feature.

Cheers,
Jason Lepack
 

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