Text book stuff is somwhat useless?
In the university, one is taught about linking tables using a primary key and
a foreign key as means establishing relationships. However, in real life, I was told that this is not the case and relations are enforced by triggers and procedures
and such. Is it true?. Please give weblinks where one can learn real no-nonsense
stuff about databases.
whoever told u that relationships are enforced by triggers and procedures INSTEAD of foreign keys doesn't know what they are talking about.
relationships are enforced by foreign keys.
the only situation where a trigger should be used to enforce referential integrity is when you want to key a table to another table that lives in a different database -- in which case foreign keys aren't valid. note though that triggers adds some overhead.
procedures cannot enforce referential integrity.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)