[wp-hackers] Taxonomy Schema Proposal

Jennifer Hodgdon yahgrp at poplarware.com
Mon Apr 16 18:14:52 GMT 2007


Ryan Boren wrote:

> // terms contains the actual
> categories/tags/terms/classifiers/whatevers.  It stores only ID, name,
> and slug.
> CREATE TABLE $wpdb->terms (
> term_id bigint(20) NOT NULL auto_increment,
> term_name varchar(55) NOT NULL default '',
> term_slug varchar(200) NOT NULL default '',
> PRIMARY KEY  (term_ID),
> KEY term_slug (term_slug)
> );

Can I suggest making the term_name field (or whatever it will be 
called) either wider or a TEXT field? Multi-lingual plugins need more 
space than 55 characters for category names and tags (they have to 
store 2 or more versions of the text, plus some kind of tags 
specifying languages). 200 characters is sufficient for most people 
using multi-lingual plugins I think (see also 
http://trac.wordpress.org/ticket/3729, reported by another user).

For comparison, link names are VARCHAR(255), and post titles are TEXT 
(unlimited). I am not certain which is better VARCHAR or TEXT in terms 
of database efficiency, in the case where (for most users) the actual 
text is probably about 20-40 characters... will let the DB optimizers 
weigh in on that one.

     Jennifer


More information about the wp-hackers mailing list