ok guys, i have to change the database design because it was decided to add more values for each classroom! and i really need your help to design it, i am not expert to use the partitioning or other expert stuff, i believe scriptcase can do it, in an easy way?i just want to know how to start from the beginning again

Here is my full scenario, in brief

1- i have the paper form/report which I could made as electronic, easy, a classroom that can be submitted anytime by teacher to school administration ? example:

? Classroom: (1 to 15) e.g. 6

? Total students: XX (fixed number) e.g. 20

? Available students: xx (variable) e.g. 15

?

? Absent students: automatic simple calculation (total ? available) e.g. 5

?

? Students took permissions: xx (variable, part of the absent number) e.g. 3

? Student without permissions: simple calculation (absent ? took permissions) e.g. 2

?

? Date of this update: date - automatic

? Time of this update: time ? automatic

2- Updates for each classroom vary, may be done one per day, maybe 4 times per hour… (i know it doesn’t make sense, but please bear with me)

3- The school administration do rely on the latest report update from each classroom teacher, hence, they will look at the latest report that submitted by each teacher…

Example:

[TABLE]

[TR]

[TD]Class no

[/TD]

[TD]total

[/TD]

[TD]available

[/TD]

[TD]absent

[/TD]

[TD]With permission

[/TD]

[TD]Without permission

[/TD]

[TD]date

[/TD]

[TD]time

[/TD]

[/TR]

[TR]

[TD]6

[/TD]

[TD]20

[/TD]

[TD]15

[/TD]

[TD]5

[/TD]

[TD]3

[/TD]

[TD]2

[/TD]

[TD]28/5

[/TD]

[TD]11:11

[/TD]

[/TR]

[TR]

[TD]6

[/TD]

[TD]20

[/TD]

[TD]14

[/TD]

[TD]6

[/TD]

[TD]4

[/TD]

[TD]2

[/TD]

[TD]28/5

[/TD]

[TD]12:00

[/TD]

[/TR]

[TR]

[TD]6

[/TD]

[TD]20

[/TD]

[TD]11

[/TD]

[TD]9

[/TD]

[TD]5

[/TD]

[TD]4

[/TD]

[TD]28/5

[/TD]

[TD]13:00

[/TD]

[/TR]

[TR]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[/TR]

[TR]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[TD]

[/TD]

[/TR]

[/TABLE]

So, what I?ve done is to select the data, FROM classroom_6 ORDER BY id DESC LIMIT 1" that works fine in display.php (away from scriptcase) ? now administration can see classroom_6 from display6.php and will give them only the latest update?

4- i have 15 classrooms

5- the data should be kept anyway in the database for statistics part later on that will use sc to have for each classroom how many students were available per day ( I will take the average per day if more than one update was done in that classroom?)

6- I?ve done this for the whole 15 classrooms and all is fine, you can view the latest update from each classroom? and I can get statistics using sc?.

Need now is to have them all as a table to display only latest update from each classroom update?.

Example:

[TABLE]

[TR]

[TD]Class no

[/TD]

[TD]total

[/TD]

[TD]available

[/TD]

[TD]absent

[/TD]

[TD]With permission

[/TD]

[TD]Without permission

[/TD]

[TD]date

[/TD]

[TD]time

[/TD]

[/TR]

[TR]

[TD]1

[/TD]

[TD]20

[/TD]

[TD]10

[/TD]

[TD]5

[/TD]

[TD]3

[/TD]

[TD]2

[/TD]

[TD]27/5/2014

[/TD]

[TD]11:11

[/TD]

[/TR]

[TR]

[TD]2

[/TD]

[TD]25

[/TD]

[TD]14

[/TD]

[TD]6

[/TD]

[TD]4

[/TD]

[TD]2

[/TD]

[TD]27/5/2014

[/TD]

[TD]12:00

[/TD]

[/TR]

[TR]

[TD]3

[/TD]

[TD]20

[/TD]

[TD]11

[/TD]

[TD]9

[/TD]

[TD]5

[/TD]

[TD]4

[/TD]

[TD]27/5/2014

[/TD]

[TD]13:20

[/TD]

[/TR]

[TR]

[TD]4

[/TD]

[TD]15

[/TD]

[TD]9

[/TD]

[TD]3

[/TD]

[TD]1

[/TD]

[TD]2

[/TD]

[TD]27/5/2014

[/TD]

[TD]11:00

[/TD]

[/TR]

[TR]

[TD]5

[/TD]

[TD]22

[/TD]

[TD]20

[/TD]

[TD]2

[/TD]

[TD]1

[/TD]

[TD]1

[/TD]

[TD]27/5/2014

[/TD]

[TD]12:00

[/TD]

[/TR]

[TR]

[TD]6

[/TD]

[TD]20

[/TD]

[TD]12

[/TD]

[TD]8

[/TD]

[TD]5

[/TD]

[TD]3

[/TD]

[TD]27/5/2014

[/TD]

[TD]13:13

[/TD]

[/TR]

[TR]

[TD]7

[/TD]

[TD]34

[/TD]

[TD]31

[/TD]

[TD]3

[/TD]

[TD]2

[/TD]

[TD]1

[/TD]

[TD]27/5/2014

[/TD]

[TD]14:10

[/TD]

[/TR]

[TR]

[TD]8

[/TD]

[TD]21

[/TD]

[TD]20

[/TD]

[TD]1

[/TD]

[TD]0

[/TD]

[TD]1

[/TD]

[TD]28/5/2014

[/TD]

[TD]12:10

[/TD]

[/TR]

[TR]

[TD]9

[/TD]

[TD]16

[/TD]

[TD]14

[/TD]

[TD]2

[/TD]

[TD]2

[/TD]

[TD]0

[/TD]

[TD]28/5/2014

[/TD]

[TD]13:44

[/TD]

[/TR]

[TR]

[TD]10

[/TD]

[TD]11

[/TD]

[TD]10

[/TD]

[TD]1

[/TD]

[TD]1

[/TD]

[TD]0

[/TD]

[TD]28/5/2014

[/TD]

[TD]8:60

[/TD]

[/TR]

[TR]

[TD]11

[/TD]

[TD]15

[/TD]

[TD]11

[/TD]

[TD]4

[/TD]

[TD]0

[/TD]

[TD]4

[/TD]

[TD]28/5/2014

[/TD]

[TD]11:00

[/TD]

[/TR]

[TR]

[TD]12

[/TD]

[TD]22

[/TD]

[TD]19

[/TD]

[TD]3

[/TD]

[TD]1

[/TD]

[TD]2

[/TD]

[TD]28/5/2014

[/TD]

[TD]12:12

[/TD]

[/TR]

[TR]

[TD]13

[/TD]

[TD]17

[/TD]

[TD]14

[/TD]

[TD]3

[/TD]

[TD]2

[/TD]

[TD]1

[/TD]

[TD]28/5/2014

[/TD]

[TD]13:19

[/TD]

[/TR]

[TR]

[TD]14

[/TD]

[TD]31

[/TD]

[TD]27

[/TD]

[TD]4

[/TD]

[TD]3

[/TD]

[TD]1

[/TD]

[TD]28/5/2014

[/TD]

[TD]12:11

[/TD]

[/TR]

[TR]

[TD]15

[/TD]

[TD]11

[/TD]

[TD]7

[/TD]

[TD]4

[/TD]

[TD]2

[/TD]

[TD]2

[/TD]

[TD]28/5/2014

[/TD]

[TD]11:15

[/TD]

[/TR]

[/TABLE]

So, do you think we can go with this db structure to achieve this? Or I have to do a complete change?

Please again, I am sure you will give me strong ideas, but be sure that my experience is not that much so if there will be partitioning or ?key? and this things, then I will be lost

Any help or idea (with details) is highly appreciated

Mike