[development] One-to-one tables considered harmful

David Strauss david at fourkitchens.com
Mon Jun 4 06:19:42 UTC 2007


Earl Miles wrote:
> No, you misinterpreted mine. Drupal is modular. comment.module is a
> module. Now, it's a poor module -- it has some rather nasty integration
> with the rest of the site which, IMO, it should not. But it worries me
> that one of the solutions is to re-integrate rather than to make it
> properly modular.

The schema for Drupal core is not modular and never has been (at least
looking back to 4.7).

> So to me, instead of merging comment data into the node table, it sounds
> like the node_comment_statistics table needs to reflect other data that
> is being filtered in some way. IMO, this would be preferable. Doing it
> any other way might end up creating a requirement to have comment.module
> on (or make a site very, very useless if comment.module is off).

There is no debate here, no matter what theoretical model you prefer.
The database requires that all criteria for WHERE and ORDER BY exist in
the same table to achieve acceptable performance. That table is {node}.
The only way to realize the same performance goals without combining the
fields in {node} is to create another table that contains the same
fields, but just isn't called node. That would be pointless.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 186 bytes
Desc: OpenPGP digital signature
Url : http://lists.drupal.org/pipermail/development/attachments/20070604/9af63d2e/attachment.pgp 


More information about the development mailing list