RE: [SQL] How to represent a tree-structure in a relational database

2000-12-13 Thread Stuart Statman
s this table structure (I don't know if he's giving it > out, but he said it wasn't very difficult). We've done a similar thing for Java. It was ridiculously easy to create a TreeModel wrapped around this data. Almost too easy; it made me feel dirty. Stuart Statman Directo

RE: [SQL] How to represent a tree-structure in a relational database

2000-12-13 Thread Stuart Statman
y b is a subcategory of subcategory c, where I'm not sure your model will preserve or guarantee that. (Does that sentence deserve a prize?) In general, if you know that you will need to periodically alter a table to add columns, you should come up with a different model that doesn't r

RE: [SQL] How to represent a tree-structure in a relational database

2000-12-13 Thread Stuart Statman
ion, I guess. The problem with this method is if you need to insert a category, or move a category. You'll need to re-id a bunch of categories, and bubble those changes out to every table that refers to this table. Stuart Statman Director of Software Development Slam Media, Inc. BEGIN:VCARD