You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Market Simulation (Part 24): Getting Started with SQL (VII).
What we are about to see should be used only if we are sure of what we are doing. Do not try to use it without first becoming familiar with the material from the previous sections. Otherwise, you will end up in a terrible situation with SQL. So now let us understand what this is about. Suppose there is a very complex database in terms of table structure. And this database uses a very specific relationship between these tables.
As we saw in the previous topic, if we try to delete a record based on its primary key, and this key is used in another table through a foreign key, we will not be able to delete the record until all existing references to that primary key have first been removed. The way to perform this task was described in the previous topic. When we have few tables, doing something like this is quite simple and clear, but if we have many tables, the situation becomes more complicated, since a DELETE command must be created for each table.
Author: Daniel Jose