I'm developing an application using PHP / SQL Server that needs to store information on graduates from tons of different academic programs, along with information on how many were employed after graduating... This will then be queried by users, who will want to compare one program to another, so they will need to be able to generate custom tables showing the outcomes for students. Tables will be something like this:
Program Salary after 1 Year Salary after 2 Years Etc...
Engineering Lots Even more!
Philosophy Nothing Are you kidding me?
So, here's the question: should I store individual values for these data points in the database, or should I just store the raw HTML for the table row?
In other words, do I store this:
ProgramID Salary1 Salary2 Etc...
1 Lots Even More!
2 Nothing Are you kidding me?
Or do I store this:
ProgramID RowHTML
1 <td>Lots</td><td>Even More!</td>...
2 <td>Nothing</td><td>Are you kidding me?</td>
I can see arguments for both approaches... my gut tells me that storing the raw HTML will be faster - it will eliminate GOBS of PHP processing. But I'm open to other interpretations.