table with filtering results from multiple collections or datasets

I am building a student evaluation system. The teachers login and I have a page with a form for each class. the teacher selects the student and fills out the evaluation and submits it to a collection for that class. parents can have multiple students in multiple classes. I currently have a collection for each class evaluation form. there are 14 classes. is there a way to filter all 14 collections in a single table? or is my approach incorrect? do I need to query each collection and combine and filter the results? how would I do this?

Hello? Anyone?

you can use the code below to combine multiple collection queries into 1 set of results

Alex, you asked if your approach is incorrect. Most people experienced in relational database setups would have a very different approach. You can probably get yours to work with combined queries, but I’m assuming that you will want to be able to query by a certain parent, teacher, or student. Think that through to make sure you can do that with the result set of the combined query.

The relational database purist approach would have you creating evaluations, class, teacher, parent, and student collections. There would not be a collection for each class, but keys that refer back to the class, teacher, parent, and student collections from an evaluations collection. In other words, evaluations would be the large collection in your database, and the other collections would essentially be lookup tables.

I don’t have enough information about your data requirements to be any more specific. If this sounds too complex, then don’t get bogged down it. I mention this alternative only because you wondered if you have the correct approach.