Tagged Questions
0
votes
1answer
50 views
Creating a partial unique constraint for MySQL
I have the same question as asked in a previous post: PostgreSQL multi-column unique constraint and NULL values. But the solution there is not applicable as I am using MySQL instead of PostgreSQL.
My ...
0
votes
1answer
88 views
How to set unique columns combination
see this table:
CREATE TABLE IF NOT EXISTS `default_messages_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message_id` int(11) NOT NULL,
`owner_user_id` int(11) NOT NULL,
`to_user_id` ...
3
votes
2answers
3k views
What to use, CASCADE DELETE rule or ON DELETE trigger for one to many constraint?
I would like to ask about how to handle this relationship. For better view I've tried to simplify and convert my situation into how I think StackOverflow question voting has (sorry if not :-)
I ...