- I am trying to design a database for mark sheet data of a school having different types of exams of different levels or class.
- Is it possible to have single table where I can store data in string (array serialize PHP) and perform a search based on subjects easily (Maximum/Minimum/Average).
The table look something like this with bit variations-
Class 5
XXXXX ------ Math ----- Hindi ----- English
Amit -------- 10 ------- 20 ----------31
Alok -------- 10 ------- 20 ----------31
Class 8
XXXXX ------ Math ----- Hindi ----- English ---- Science
Amit -------- 10 ------- 20 ----------31 ----------20
Alok -------- 10 ------- 20 ----------31 ----------23
Using PHP's array serialize I will have marks data in string as
a:4:{s:4:"math";i:20;s:5:"hindi";i:30;s:7:"english";i:23;s:7:"science";i:10;}
Should I have separate table or can I have the condensed table so that database does not become too heavy with too many rows?
serialize
overJSON
... Although JSON is efficient too.