Managing Foreign Keys

Posted by jwzk on Stack Overflow See other posts from Stack Overflow or by jwzk
Published on 2010-04-05T15:38:01Z Indexed on 2010/04/05 15:53 UTC
Read the original article Hit count: 315

Filed under:
|
|

So I have a database with a few tables.

The first table contains the user ID, first name and last name.

The second table contains the user ID, interest ID, and interest rating.

There is another table that has all of the interest ID's.

For every interest ID (even when new ones are added), I need to make sure that each user has an entry for that interest ID (even if its blank, or has defaults).

Will foreign keys help with this scenario? or will I need to use PHP to update each and every record when I add a new key?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql