I have a rather fundamental/naive question.
If I have 2 tables that are related i.e. one has a foreign key of the other.
I.e. Table A
has 1-N
relationship with Table B
and Table B
therefore has an extra column which for the id of corresponding
record in Table A
as foreign key.
If I delete an entry in Table A
will this delete automatically delete the corresponding entry in Table B
(which has the deleted idx as foreign key) or
do I have to delete it programmatically?
Does this depend on the database or how the tables are created? I am not clear on this.