回複: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?