Results 1 to 2 of 2

Thread: Foreign Key Importance

  1. #1
    Join Date
    Jul 2008
    Posts
    1

    Lightbulb Foreign Key Importance

    We don't have foreign keys (FK) in our database.
    I think FK's are very important to enforce data integrity and also it's very easy to understand data flow. But one of our developer argues we can maintain data integrity through java code, without FK's it's easy to merge/migrate data (TRUNCATE works without FK's).
    My point is we should fix migration script otherwise we end up several with several orphan records, also some time there could be bugs in Java code. Can any DBA or design expert advice me what
    are other benefits of FK's (coding time, performance, indexes...etc).
    Thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Data integrity is the most important one, as you never know someday somebody wants to load data without using the front end using batch program and if it fails to check proper references then all your data become corrupted.

Posting Permissions

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