Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed database design advice for a school grading system
    primarykey
    data
    text
    <p>I am working for a K-12 school and I am developing a gradebook system. The existing gradebook system that we use which I also developed is based on Excel with VBA. It's always a nightmare for me to consolidate 400+ Excel workbooks every end of term. During the summer break, I'm planning to put all data in a database for easy management and stuff.</p> <p>My problem is this:</p> <p>For a computation-intensive application like a gradebook, is it good to store the computations in a table field or is it better to ONLY store the raw data and do the computations only on the frontend?</p> <p>The way the Excel gradebook system works is like this...</p> <ul> <li>Teacher records each score for each assessment of each student in the form of score / highest possible score. (e.g. <em>Quiz 1 = 5/10, Homework 1 = 20/25, etc.</em>)</li> <li>The scores will be calculated as percentages and summarized per component. "Component" means Quiz, Homework, etc. So there will be something like "<em>Quizzes Average = 90%, Homework Average = 80%, etc.</em>"</li> <li>Different subjects will have different final grade breakdown like "<em>Science = 50% Quizzes + 50% Homeworks, Math = 60% Quizzes + 40% Homeworks</em>". </li> <li>Then, the general average grade of each student is computed by getting the average of all subjects.</li> </ul> <p>Everything above is very easy to make in a spreadsheet but I don't know how to implement it in a database.</p> <p>As of the moment, I'm thinking something like having a table where all assessments are recorded like this:</p> <pre><code>tbl_scores id student_id term_id subject_id component_id assessment_id raw_score highest_possible_score #not sure about this cause this can be implied from assessment_id </code></pre> <p>Would it be useful to store the computations (percentage for each score entry, component average, subject average, general average, etc. in the database) and use stored procedures and triggers to update them when a new score comes in?</p> <p>Or, is it better to just store the raw scores and calculate everything ONLY on the frontend? Will this option be faster than the first one knowing that the SELECT queries here will really be more complex due to subqueries?</p> <p>By the way, I'm planning to use PostgreSQL for this.</p> <p>Thanks in advance for any advice.</p> <p>DashMug</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload