[wp-hackers] Grab a seat. On Delaying 2.2, separating tables
Knut-Olav Hoven
hovenko at linpro.no
Sun Apr 15 12:28:39 GMT 2007
On Sunday 15 April 2007 08:05:30 Robert Deaton wrote:
> I believe that we should take the time now, before a release of
> WordPress is made with these database schema changes, to fix the
> issue. I think that the categories table needs to be resplit into a
> link categories table, a post categories table, and a tag table, each
> set up to handle their own specific job instead of throwing them
> together with legacy fields. Let's have a look at the categories
> table.
+1
I agree. The categories table is getting bloated with columns only needed
depending on the context (tag, category, link). This not only makes the table
large, but harder to maintain and a pain to handle in the mysql console.
> 24 type tinyint NOT NULL default '1',
> ^^ a bitfield, instead of an enum? brilliant.
Enums are mysql specific and would make it harder to port WordPress to another
database in some rare future.
But you are partially right pointing at this column as an issue. It is
impossible to see what this field does by just lookin at the database schema.
It is clearly some sort of filtering, but that's that.
On Sunday 15 April 2007 08:30:12 Jamie Talbot wrote:
> The issues with the structure now in use were debated strongly on trac[1],
> but unfortunately Matt went and committed the changes anyway, without ever
> really addressing them. Comments from ryan[2] and rob1n[3] seem to suggest
> they also have their doubts. In fact, I haven't seen one comment from
> anyone who is in favour of this monolithic design. It seems like a
> unilateral decision, the main argument for which was "We already have API
> that we can reuse" - never mind the huge amount of changes that have since
> had to be made anyway. With the addition of the bitfield, we now have
> another horrendous hack to go along with 'link_count > 0'.
It looks like this decission was made in a hurry just to make the schedule. If
the API can not easily be altered to use multiple tables it is probably not a
very good API at all.
There are some similarities between post_categories, link_categories and tags,
but not more than it is between anything else in WordPress: common ID, name,
nicename and description/content.
Then maybe tags should be rescheduled to 2.3.
--
Knut-Olav Hoven
Systemutvikler mob: +47 986 71 700
Linpro AS http://www.linpro.no/
More information about the wp-hackers
mailing list