Re: Database Foreign key constraints vs Application Maintained Constraints

  • From: Thomas Day <tomdaytwo@xxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 22 Apr 2009 10:42:42 -0400

Oracle will use the fks for star transformations if you have that enabled.

Having the business rules in the database makes the data application
independent.  People can use the tool of their choice and access is not
limited to the single applicataion.  This adds value to the database.

Developers hate foreign keys because they can't just cram data into the
persistent store (database) and get on with unit testing.  With fks the
developers have to understand the data and develop error handling routines
for when bad data is entered.

If the business rules change, is it easier to change a fk in the database or
to re-code and re-release the application?

Other related posts: