Violating 1st normal form, is it okay for my purpose?
- by Nick
So I'm making a running log, and I have the workouts stored as entries in a table. For each workout, the user can add intervals (which consist of a time and a distance), so I have an array like this:
[workout] =>
[description] =>
[comments] =>
...
[intervals] =>
[0] =>
[distance] => 200m
[time] => 32
[1] =>
[distance] => 400m
[time] => 65
...
I'm really tempted to throw the "intervals" array into serialize() or json_encode() and put it in an "intervals" field in my table, however this violates the principles of good database design (which, incidentally, I know hardly anything about).
Is there any disadvantage to doing this? I never plan on querying my table based on the contents of "intervals". Creating a separate table just for intervals seems like a lot of unnecessary complexity, so if anyone with more experience has had a situation like this, what route did you take and how did it work out?