Unix Technical Forum

Foreign Keys

This is a discussion on Foreign Keys within the MySQL forums, part of the Database Server Software category; --> Hi, I'm busy writing a query engine for a customer. Basically they want to select the tables, fields and ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:21 AM
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:02 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com