Jump to content

Best Practices Ruling


This topic is 5428 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Need some thought on relationships:

Situation #1:

I have two tables -- I have a pull down menu on the parent table Called "Table1"and information on "Table2".

Do I join by:

Table1::Name -- Table2::Name

Pros: Easy to do -- Works well when I add a listing it shows up in the pull down list

Cons: When I change the names on table2 it does not change the name on table1

Do I join by:

Table1::recordID -- Table2::Rel_RecordID

Pros: Also easy to do.

Cons: Makes multiple entry's of the same name?

Is there another way?

Thank you

Edited by Guest
Link to comment
Share on other sites

Using a field that contains meaningful data (e.g. a person's name) as a key field is a database Worst Practice.

There is no con to joining tables by unique ID: it is simply How It's Done. If you're having difficulty in achieving a particular result it's probably that you need to rethink your design. You haven't given us much to go on here but my guess is that you may have a many-to-many relationship, which typically requires a join table.

PS: Record ID has a meaning that is distinct from Unique ID/primary key field.

Get(RecordID)

Link to comment
Share on other sites

  • 3 weeks later...

This topic is 5428 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.