[development] One-to-one tables considered harmful

Earnie Boyd earnie at users.sourceforge.net
Mon Jun 4 14:48:21 UTC 2007


Quoting Dries Buytaert <dries.buytaert at gmail.com>:

>
> Five core modules directly query the node_comment_statistics table.   
> In my view of the world, comments are first class citizens in Drupal. 
>  We should optimize how they interact with nodes. In other words, I  
> agree that it makes sense to merge the node_comment_statistics table  
> into the node table (assuming it does improve performance). It would  
> also help eliminate bugs.
>

I have been reading the posts and wondering what is so different about 
a comment.  A comment is nothing more than content very much similar to 
a node.  As content it has a specialized content type which at the 
moment isn't visible to the administrator.  So, I think to myself that 
perhaps a comment should be treated as a node and the comment table is 
nothing more than a one to many relationship mapper.  I'll give this 
some more thought toward D-7 I can see this idea as enhancing many 
modules.

Earnie


More information about the development mailing list