optimization - Need help in creating a student database -


i'm creating project/web portal college database have store students attendance percentage , grades in various subjects. currently, have designed database follows. need know whether method of storing data.

master table:

id | roll_number | department | year_of_study 

table adding attendance percentage each student:

id | roll_number(foreign key) | attendance_for_period1 | attendance_for_period2  

table adding subjects:

id | subject_name  1   | computer programming  2   | data structures  3   | professional ethics  .    .  . 

table adding grades each student in various subjects:

id | roll_number(foreign key) | marks_in_period1 | marks_in_period2  1  | 412811104092             | a,b,a,b,c,d      | b,c,a,a,d,f 

in marks_in_period1 column, comma separates grades each subject (i.e) have inserted marks 6 subjects. database correct or need optimisation?

you should (almost) never store multiple pieces of data in single field. not make hard search inside, have parse data every time read/serialize every time write.

take @ answer.


Comments