www.webdeveloper.com
Results 1 to 2 of 2

Thread: Text book stuff is somwhat useless?

  1. #1
    Join Date
    Apr 2007
    Posts
    11

    Post Text book stuff is somwhat useless?

    Hello,
    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.

    Thank you.

  2. #2
    Join Date
    Feb 2003
    Posts
    2,745
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles