Quantcast
Channel: Question and Answer » data-integrity
Viewing all articles
Browse latest Browse all 10

Understanding how relationship sides works

$
0
0

So, I have this relations on my tables (see image) and I need to understand some things. I’ll enumerate what I understand and what I need from yours is to say if I’m right or not and in case I’m not give me the good answer.

If general_orders_id is FK on natural_person and legal_person tables if I set onUpdate and onDelete to CASCADE what this mean?

1- When I delete a general_orders the cascade will delete all the records on natural_person and legal_person tables?

2- When I delete a natural_person what happen with the general_orders that points to that person?

In order to maintain a good table structure, data consistency and integrity, what are you’re suggestions regarding this topic?

enter image description here


Viewing all articles
Browse latest Browse all 10

Trending Articles