回複:database design question:

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?

請您先登陸,再發跟帖!