Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1604 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

relations in a simple mysql databse

Thread title: relations in a simple mysql databse
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
01-12-2005, 11:33 AM
#1
derek lapp is offline derek lapp
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
 
Posts: 2,246
iTrader: 0 / 0%
 

derek lapp is on a distinguished road

  Old  relations in a simple mysql databse

i've been going through setting up a databse for my website, and i've run into a few things that don't make much sense; they're very impractical.

say i was setting up a projects databse and it looked like so
Code:
Table Name: projects
project_id | project_name | client_name |

Table Name: clients
client_id | client_name | etc
so my intention is to print out this information. say a client changes it's name, or merges or for some reason i'm to alter the client_name field.

i initally thought to use foreign keys to establish a good relationship between the two tables, so it would be like 'including' client_name from the clients table. i started reading about how only the InnoDB table type supports foreign keys, and the blurb i read said InnoDB is the "industrial strength" databse, so it seems really impartical to break out the maximum databse only to make this one simple relation.

since reading that, it seemed the only way yo create the relation was through something like manual entry. so client_1 is "john doe inc" so, ro the other table, i'd select 1 for his is from the drop down, and that name would be put into the project table. but say "john doe' changes the name, i'd have to go edit both tables . . . which really isn't a relationship at all.

all my googling and searching other forums hasn't helped the situation. i've only found isuues when using the foreign key on InnoDB, instructions on how to use it with InnoDB, or something that didn't make any sense to me.

so, how does one create a stable relationship between two tables through a regular MyISAM databse? forgien keys was my only idea and switching to innoDB seems very impractical, since it says it's not supported by default. after searchin through the index for relationships i was able to read that using them is a good idea and ie encouraged, but nothig more (educational writing at its finest). it said something about keys, and after looking up keys, it was just as useless.

little help? i've been lloking at this for the last three hours, and i've found nothing.

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed