Jump to content

MySQL relational tables


quinton

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

Archived

This topic is now archived and is closed to further replies.

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