On Fri, Nov 30, 2001 at 07:25:13PM +0100, Emiliano wrote:
> Vincent Stoessel wrote:
> 
> > And this makes me wonder, does midgard plan to use the new features
> > of mysql (innodb) that allow for foreign key restrains  and transactions
> > on tables?
> 
> I'd say that as soon as they're commonplace enough, definately. It would
> make Midgard a whole lot simpler and robust internally.
I don't see any reason for enforcing foreign keys because of this quote
from MySQL documentation:

http://www.mysql.com/doc/A/N/ANSI_diff_Foreign_Keys.html
"
 In the near future we will extend the FOREIGN KEY implementation so that
 the information will be saved in the table specification file and may be
 retrieved by mysqldump  and ODBC. At a later stage we will implement the
 foreign key constraints for applications that can't easily be coded to
 avoid them.

 Do keep in mind that foreign keys are often misused, which can cause
 severe problems. Even when used properly, it is not a magic solution for
 the referential integrity problem, although it does make things easier in
 some cases.

 Some advantages of foreign key enforcement:

     * Assuming proper design of the relations, foreign key constraints
       will make it more difficult for a programmer to introduce an
       inconsistency into the database.
     * Using cascading updates and deletes can simplify the client
       code.
     * Properly designed foreign key rules aid in documenting
       relations between tables.

 Disadvantages:
     * Mistakes, that are easy to make in designing key
       relations, can cause severe problems, for example,
       circular rules, or the wrong combination of cascading
       deletes.
     * A properly written application will make sure
       internally that it is not violating referential
       integrity constraints before proceding with a
       query. Thus, additionaly checks on the database
       level will only slow down performance for such
       application.
     * It is not uncommon for a DBA to make such a
       complex topology of relations that it becomes
       very difficult, and in some cases impossible to
       backup or restore individual tables.
"
                         
-- 
/ Alexander Bokovoy
$ cat /proc/identity >~/.signature
  `Senior software developer and analyst for SaM-Solutions Ltd.`
---
Nov 21 20:58:58 alconost kernel: VFS: Busy inodes after unmount. 
                    Self-destruct in 5 seconds.  Have a nice day...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to