Jump to content

Recommended Posts

Hi,

 

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

 

Thanks!!

Link to comment
https://forums.phpfreaks.com/topic/1348-mysql-relational-tables/
Share on other sites

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/doc/en/ANSI_diff_Fore...reign_Keys.html

Link to comment
https://forums.phpfreaks.com/topic/1348-mysql-relational-tables/#findComment-4480
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.