in reply to Re^3: How to interpolate sql-output
in thread How to interpolate sql-output
Let's say that I have table ppl, which includes running id, activity boolean and timestamp defaulting to now.
Then I have another table (=ppl_data) where is also id as serial (only for easier manipulation), ppl_id, key and value and usually timestamp.
I can put anything to that ppl_data-table without altering db-schema, cause it is in key-value-pair.
Cause I use only inserts and fetching only newest data with that key, there is nice history of changes.
Reason to this is, that customer is able to add different fields if needed.
Ofc there is also datatype for that field, so sanity-check and casting is easier.
If needed one can vacuum old data from that ppl_data, if it affects to db-server, but usually there is enough power.
As log as that db-server isn't virtual-server where disk-latency might cause slowing downs eventually.
And when there is also way to do different queries, one can alter or even add features without code-changes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to interpolate sql-output
by chacham (Prior) on Jan 15, 2015 at 00:25 UTC | |
by Seq (Novice) on Jan 15, 2015 at 01:17 UTC | |
by chacham (Prior) on Jan 15, 2015 at 02:39 UTC | |
by Seq (Novice) on Jan 15, 2015 at 03:39 UTC | |
by chacham (Prior) on Jan 15, 2015 at 15:06 UTC |