Good evening, dear users. I am interested in such a question.
Let there be three tables. phones with id, model_id; models: id, name; features: id, model_id. phones.model_id = models.id , features.model_id = models.id . Where to write restrictions on models.id in both the phones and features tables or only in one? And if I write to phones ON DELETE CASCADE , in features ON DELETE RESTRICT , which of the things apply to the models.id field?