MySQL Forums
Forum List  »  Microsoft Access

Need advice in porting a Access database
Posted by: Eric S
Date: February 21, 2011 04:26AM

I am moving a database from MS Access to MySQL. The original database has a number of auto increment fields for primary keys. There are also foreign keys in other tables that reference the primary keys as the "one" side of their "one-to-many" relationships.

If I create the new database with auto increment for these primary keys, then I cannot INSERT the values from the old tables. This is a problem because of the dependent tables that reference these primary key values as foreign their keys.

On the other hand, if I don't use auto increment for the PK's of the new tables, it makes it hard to insert new rows later (since I then have the problem of determining unique values for the PK's before insertion).

Any advice? What is the best way for me to structure the new tables? In particular, would it be okay to have my foreign keys reference fields other than the primary keys?

Thanks,
Eric

Options: ReplyQuote


Subject
Views
Written By
Posted
Need advice in porting a Access database
2745
February 21, 2011 04:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.