[thelist] Proper DB Table Design...

Joshua Olson joshua at waetech.com
Mon Sep 13 07:48:04 CDT 2004

> -----Original Message-----
> From: Travis
> Sent: Sunday, September 12, 2004 7:39 PM
> I also would like to have the ability to sort documents and categories in
> whatever arbitrary order I choose. The simplest way I can think of to do
> this is to add an additional 'sortorder' column to each table,
> and order the records numerically, so the new tables would look
> something like this...


Placing a sortorder field in the categories and documents tables is not a
bad design.  You will also find additional benefit if the sortorder column
in the categories table represents the category's order within the ENTIRE
hierarchical structure, not just within the siblings.  I'll leave it to you
to realize why.

Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list