Not all DBMSs support auto-increment type sequences, and of those that do there's a bunch of different implementations. For MySQL, you use auto-increment; for Oracle, it's CREATE SEQUENCE; etc.
There's probably other reasons too. Ummmm...... anyone? :-)
It's supported by the popular modern DBs, but most importantly, drupal is currently only supporting mySQL and pgSQL (both of which do have auto-increment) and as you mentioned, Oracle supports it too, if drupal support wants to expand there. If anything, we just need the proper database abstraction.
The advantages are many-fold.
First of all, we could get rid of locking the sequences table. It's a significant performance savings.
Secondly, by getting rid of locking, we can solve the drupal install problems with many hosting services that do not grant TABLE LOCK privileges to users.
Last but not least, for the flocks of people who find drupal really great and want to migrate to drupal, many of them are running into headaches and confusion because we don't use auto_increment. This post is a case in point. It's ironic that the attempt to be compatible by not using auto-increment actually led to the feeling that drupal is unconventional and incompatible.
As someone who has regularly ported large data sets from other sites into Drupal, I can tell you that whoever thinks autoincrement will help is probably only doing part of the job.
When you have multiple users, posts *and* comments, auto-incrementing tables are of no use at all. Quite the opposite in many cases.
If you want to move to Drupal and make all your old URLs not go 404, for example, you'll probably want to make use of the ability to give nodes arbitrary nids.
Maybe I'm not understanding something, but couldn't you import the original nid's, then set the autoincrement to continue where your previous site left off?
Even in the current system, you can't assign nid purely arbitrarily, or in any case, you need to make sure the sequence table reflects your last nid, otherwise you will run the risk of problems with duplicates.
Comments
Because it doesn't always exist
Not all DBMSs support auto-increment type sequences, and of those that do there's a bunch of different implementations. For MySQL, you use
auto-increment; for Oracle, it'sCREATE SEQUENCE; etc.There's probably other reasons too. Ummmm...... anyone? :-)
I'm for AUTO_INCREMENT
It's supported by the popular modern DBs, but most importantly, drupal is currently only supporting mySQL and pgSQL (both of which do have auto-increment) and as you mentioned, Oracle supports it too, if drupal support wants to expand there. If anything, we just need the proper database abstraction.
The advantages are many-fold.
First of all, we could get rid of locking the sequences table. It's a significant performance savings.
Secondly, by getting rid of locking, we can solve the drupal install problems with many hosting services that do not grant TABLE LOCK privileges to users.
Last but not least, for the flocks of people who find drupal really great and want to migrate to drupal, many of them are running into headaches and confusion because we don't use auto_increment. This post is a case in point. It's ironic that the attempt to be compatible by not using auto-increment actually led to the feeling that drupal is unconventional and incompatible.
I'm not
As someone who has regularly ported large data sets from other sites into Drupal, I can tell you that whoever thinks autoincrement will help is probably only doing part of the job.
When you have multiple users, posts *and* comments, auto-incrementing tables are of no use at all. Quite the opposite in many cases.
If you want to move to Drupal and make all your old URLs not go 404, for example, you'll probably want to make use of the ability to give nodes arbitrary nids.
nid assignment still possible, isn't it?
Maybe I'm not understanding something, but couldn't you import the original nid's, then set the autoincrement to continue where your previous site left off?
Even in the current system, you can't assign nid purely arbitrarily, or in any case, you need to make sure the sequence table reflects your last nid, otherwise you will run the risk of problems with duplicates.
PHPBB also avoids
PHPBB also avoids autoincrement.
It would be nice to know the official Drupal reason. Maybe it's in http://drupaldocs.org.
Marcel
http://www.MacMiniForums.com/
http://www.BlogNetworkForum.com