Re: How to store/manage tags?

From: J.O. Aho <user_at_example.net>
Date: Sun, 14 Jul 2019 12:41:21 +0200
Message-ID: <gp0f6hF7m6iU1_at_mid.individual.net>


On 14/07/2019 10.44, ^Bart wrote:
>> This don't work on all types of storage engines like MyISAM and you
>> will also get the issue of accidental deletion of everything. I
>> wouldn't use it myself, as I do like the nice error you get with you
>> try to delete something that has a foreign key restriction.
>
> I'll use innodb engine so I think I will not have this issue...

Accidental deletion will be an issue with innodb, if you by mistake decide to delete a restaurant row, you will delete everything, but if you don't use cascade, then you will be notified that there are rows in other tables that depends on it, which often lessens the risk.

I hope you really don't name the columns to FK_id_restaurant but id_restaurant when you create the table.

-- 

  //Aho
Received on Sun Jul 14 2019 - 12:41:21 CEST

Original text of this message