S
S
sbh2020-05-10 15:19:41
MySQL
sbh, 2020-05-10 15:19:41

What is the meaning of relationships between tables?

There are 2 tables:
1) Title of the movie
2) Its category

Does it make sense to create links between the tables?
If I want to rename the category, the record will be updated everywhere without a link, if I delete the movie, then the link for deleting the category will not be useful to me either. category remains when movies are deleted.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bkosun, 2020-05-10
@bkosun

Relationships are needed to ensure the integrity of the database. Integrity ensures the plausibility of information by rejecting obviously impossible values.
For example, due to restrictions, you will not be able to associate a movie with a category that does not exist in the database (wrong ID)

Database integrity is the correspondence of the information available in the database to its internal logic, structure and all explicitly specified rules.

https://en.wikipedia.org/wiki/%D0%A6%D0%B5%D0%BB%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question