I want a temporary data storage where I can store student information grouped by number of students in a class. As using an RDMS is not an option so for now I have decided in favor of storing it as an XML. In a structure similar to this.
<ListOfStudents>
<ClassSet noOfStudents="1">
<Student first="asf" last="asf">
<Student first="asf" last="asf">
...
</ClassSet>
<ClassSet noOfStudents="2">
<Student first="asf" last="asf">
<Student first="asf" last="asf">
...
</ClassSet>
<ClassSet noOfStudents="3">
<Student first="asf" last="asf">
<Student first="asf" last="asf">
...
</ClassSet>
<ClassSet noOfStudents="4">
<Student first="asf" last="asf">
<Student first="asf" last="asf">
...
</ClassSet>
<ClassSet noOfStudents="5">
<Student first="asf" last="asf">
<Student first="asf" last="asf">
...
</ClassSet>
…
…
<ClassSet noOfStudents="50065">
<Student first="asf" last="asf">
<Student first="asf" last="asf">
...
</ClassSet>
</ListOfStudents>
The basic purpose is to be able to retrieve all students of a class with specified no of students. For e.g. querying all students of class with noOfStudents
equal to 93.
First will I be able to retrieve/filter XML nodes like this i.e. by specifying an attribute value, will the whole XML will be parsed and searched everytime?
How efficient solution is it? Keep in mind the number of
<ClassSet>
nodes can reach up to 1000 or more and each having hundreds of students.if not very efficient, what other options I can have while the limitation of not being able to use a RDMS or any embedded database in place?