I'm not 100% sure I understand the situation, but it sounds to me like
you're on the way to re-inventing the Entity Attribute Value DB pattern,
which is wikipedia and there's a CakePHP example here
http://bakery.cakephp.org/articles/abalonepaul/2011/10/11/eav_behavior
As you realized,
You could consider storing your measurement data in a single column in the
measurements table as a JSON string. Thus the logic would be very simple as
you only need to convert to and from JSON. The downside is you won't be
able to easily query against values in the measurement data. Anything
Anyone?
On Monday, June 25, 2012 10:12:43 AM UTC+2, Poyan Nabati wrote:
I have a question regarding more the design of the back-end rather than
specifically how to implement it.
I'm creating a life tracker of sorts. The purpose is to have a single
application to help you keep track of
By model, I assume you mean table. Then I think it is nice to have two
table and have a foreign key to relate them. Also you can have many columns
in the second table so that it could address most of the data.
But yes, if you feel there will be many many columns then you may have more
table with
I have a question regarding more the design of the back-end rather than
specifically how to implement it.
I'm creating a life tracker of sorts. The purpose is to have a single
application to help you keep track of things that are important to you long
term.
I want to be able to track a