Foreign Keys

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-03-2007
albert
 
Posts: n/a
Default Foreign Keys

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0