Hi! i need to do a sort of tests/evaluations (based on multiple-choice questions) that have a large number of records in the BD
The basic structure is:
Code:
Topics
->idTopic (int)
->Topic (string)
Questions
->idQuestion (int)
->Question (string)
->idTopic (int)
Answers
->idAnswer (int)
->Answer (string)
->valid (bool)
->idQuestion (int)
Imagine a one-to-many relationship between Topics-Questions and the same between Questions-Answers.
And i need to obtain a specified number of random Questions for each Topic, let`s say having 100 questions in the BD, display only 5 for each Topic, so each test will be diferent for each logged in user (ASP.NET) and each test is guaranteed to have 5 question of each topic. it's possible using NHibernate - HQL or somethig?
Thanks!!
Antares[/code]