Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Best practices to implement an hierarchial structure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-07 : 08:31:58
Chetan writes "Hi Team,
I am involved in a project wherein the user is presented with a series of multiple choice questions. These questions are arranged in a particular hierarchy which is as follows:-


Examination
|_ Section
|_ Subject
|_Questions
This is just an example of one such hierarchial structure that can be followed. The basic unit is a question and there can be at the maximum of 5 levels of hierarchy above it.

My problem is how do I design the structure of the database (that contains these questions) so that I can incorporate varying levels of hierarchy above a question.

One obvious solution is to add fields in a database table that correspond to each hierarchial level. But any change in the hierarchy will necessitate addition and/or deletion of fields in the table. This is feel is not the right way for going about things.(This solution is not scalable)

So i'd like to know if there is a much more simple (read scalable) solution to this problem.

Bye team"
   

- Advertisement -