[development] Referential integrity -- finally?

Gerhard Killesreiter gerhard at killesreiter.de
Sat Jan 20 00:35:45 UTC 2007


Dries Buytaert wrote:
> Hello world,
> 
> Fact: Drupal 6 will finally drop support for MySQL 3.x.

Can we please drop 4.0 while we are at it?

http://drupal.org/node/105855


> The good news is that we can _finally_ start caring about referential 
> integrity.  As of MySQL 4, you can define foreign keys, and even though 
> they don't actually work with MyISAM tables they would work with InnoDB 
> tables.  Plus, the PostgreSQL community would love us for it.  To make a 
> long story short: more DBAs and/or business critical websites would take 
> us seriously.

Sounds like a good idea.

> In other words: I'd happily accept patches that add foreign keys to 
> Drupal tables.  It woud not be perfect as we can't use cascading 
> deletes, for example.  Nevertheless, it would be a great step in the 
> right direction -- assuming we can make it all work in a SQL-compliant 
> way without leaving MyISAM users in the cold.

This sounds as if we'd still need to check the integrity in the code, 
too. The main effort would probably to add foreign keys to the install 
functions and to check that we do inserts and deletes in the right order.

A nice fringe benefit from this would be that we finally could 
automatically make plots from our db schemes as most programs doing this 
require foreign keys to work properly.

People interested in other database work can contact me for a list of 
slow queries. 8-)

Cheers,
	Gerhard


More information about the development mailing list