回复:database design question:

来源: 2004-10-25 07:57:59 [旧帖] [给我悄悄话] 本文已被阅读:

Maybe this will work for you (?):

In your table X, for example, you have these fields:

ID ParentID Name Description

select * from X where parentID is null
will select all top level records

then you can do a query to select * from X where parentID=? with ? being the value of the ID from the first query

you can store indefinitive levels of records in one table, and you just have to do a recursion query in your application.

Make sense?