[development] Why do we avoid auto-incrementing db columns?

Larry Garfield larry at garfieldtech.com
Wed Apr 25 19:08:05 UTC 2007


On Wed, 25 Apr 2007 09:58:48 -0700, Mike Cantelon <m_cantelon at straight.com> wrote:
> Mark Fredrickson wrote:
>> theming and IO on top of that. E.g. CCK would be a great candidate for
>> going to the db layer.
> Putting more logic into the DB layer requires that more logic be ported
> to each database version with each version having to be maintained. By
> having logic such as CCK use Drupal's database API this extra work is
> avoided.
> 
> Mike Cantelon

As long as Drupal supports MySQL MyISAM tables, we have to treat the database as a glorified card catalog since that's what MyISAM tables are.  Relying on triggers, referential integrity, foreign keys, cascade-on-delete, and so on and so on would be great if we were actually using a database that supported them.  As long as MyISAM is supported, and since a *lot* of shared hosts don't offer anything else we will have to keep doing so for a long time to come, the database is simply a data sink.

(And before anyone thinks I'm suggesting we drop MyISAM support, I am not saying anything of the sort. <g>)

--Larry Garfield



More information about the development mailing list