November 19, 2024 at 2:02 am
Background:
I have two tables. Tests and Grades. For each Tests record there are many Grades; one for each student. The Grades table has a field called: StudentsGrade. Each time a Tests record is inserted into the database, an associated Grades record is inserted into the database, one for each student where the value of StudentsGrade is set to null.
Question:
My app has to list all of the Tests that the teacher hasn't finished grading. This query happens quite a bit. I have two ways of doing this:
Normally I would always go with option number one. This is my first phone app. I was told that on phone apps that I need to minimize trips to the database as well as database joins where ever possible. Adding the flag into the Tests table does this by eliminating a join with the Grades table.
I am curious if option number 2 is a better option for a phone app than option number one.
Thanks
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply