This is a discussion on Foreign Keys within the MySQL Database forums, part of the Database Forums category; Hi, I'm busy writing a query engine for a customer. Basically they want to select the tables, fields and ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I'm busy writing a query engine for a customer. Basically they want to select the tables, fields and then change the order they are displayed in and I build the query, query the database and everyone is happy. What they don't understand is relationships. They are running a MySQL 5.0.27-community database and are now upgrading to MySQL 5.0.45-community. All the tables are MyISAM tables. I was thinking I have to options here: 1) Describe foreign keys as part of the table definition After reading through the documentation it seems that this has no point as I can't figure out how I would retrieve that information from the tables. 2) Create another lookup table where the foreign keys are described This seems like the best option but also means that every time additional tables are added or changes to existing tables are made this table would need to be updated as well. Any additional ideas / recommendations would be appreciated. Thanks in advance, Albert |