SQL noob question: can SQL effectively handle a 2D matrix?
I'm an SQL noob, but I'm a decent C/C++ programmer. I have an idea for a large scale gradebook system, and I'm wondering if SQL has what I need to efficiently implement the following structure:
--Types--
Student: {ID, Name, etc}
Assignment: {ID, Description, Points possible, etc}
Grade: {value:int}
--Content--
Student students[student_count]
Assignment assignments[assignment_count]
Grade grades[student_count /*rows*/ ][assignment_count /*columns*/ ]
This structure could be pictured by having the students listed on the left axis, and the assignments listed on the top axis, and all the grades as entries on a spreadsheet in the body. The interesting part is that the grades are a 2D matrix. Students and/or assignments will need to be able to be dynamically inserted and deleted (imagine editing a spreadsheet).
The other interesting part is that the system will need to be usable on a large scale (imagine, instead of a class of 20 with 15 assignments, a community college with 55 campuses across the nation, 100 courses offered per campus, and 20-1000 students per class). It should be possible to add an assignment to a course that is fragmented into different classes with the same assignments.
As well, it should be possible to access the gradebook with multiple frontends (e.g. one in Qt, one in GTK, one in terminal, etc) if these are written, and it would be nice if the system could support a simple mode in which the grades are simply written to a file (ideal for a typical high school teacher in a school without a Linux server).
My question is: would MySQL be ideal for this sort of setup, or would another SQL system or another database setup be better?
|