0

i have the following tables: SUbjects table schema:(id,subject_code), and gradings_level table schema: (id,subject_id,grade,points,marks_range). this is for an examination results. A subject can have many grading levels in this form if marks are out of 100::

subject_id marks_range grade points
123        0-30        E     4
123        30-50       D     6
123        50-70       C     7
123        70-80       B     8
123        80-100      A     12

that kind of system for all subjects in the database.

my question is?

is it possible for me to store the marks_range in the database so it can be used for each subject or i have to put the logic in a php script

1
  • if marks range is only for reference purpose then as per my idea you can use range as a string and store in varchar datatype Commented Jan 11, 2015 at 8:01

1 Answer 1

1

Store the range in database, but the better variant is to store two int columns.

marks_range_begin | marks_range_end

It's nonsense to make changes in the application when you just want to change makrs range. It's a task for somebody who can manage that in CMS, so, technically, change the value(s) in the database.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.