Jump to content


MySQL relational tables

  • Please log in to reply
1 reply to this topic

#1 quinton

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 12 November 2003 - 10:43 AM


Wanna know how does mySQL handle relational tables?
From what i know it is dependent on the user to specify the \"relation\" in the SQL query statement. If, so that\'s not really a relational databse is it?

Basically, I\'m wondering if I hv 2 tables, users and messages. And if I delete away a user, will his/her coresponding messages be deleted in the message table as well since it\'s suppose to maintain referential intergrity? If so, how does mySQL identify the messages to delete if the \"user_id\" specified in mesasges caould be any other name? I\'m not sure if any1 is getting me.. I use to work with Access, so I\'m more familiar with that then mySQL... hope sm1 can shed sm light on this issue for me...


#2 sirmanson

  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationTucson, AZ USA

Posted 13 November 2003 - 06:42 PM

MySQL does support referential integrity and cascading deletes/updates etc as you asked. It only supports it for certain table types, so be careful of that. If you would like to read more about it visit http://www.mysql.com...reign_Keys.html

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users