We are currently using PostgreSQL, now have to save some tables in a database. The tables are never updated once created, but may be filtered.
The tables are dynamic in nature, as there may be n
columns,
so a table would be:
|------|--------|--------|
| NAME | DATA 1 | DATA 2 |
|------|--------|--------|
another table would be:
|------|--------|--------|--------|--------|--------|
| NAME | DATA 1 | DATA 2 | DATA 3 | DATA 4 | DATA 5 |
|------|--------|--------|--------|--------|--------|
The data is not normalized because it hurts when dealing with n
rows as all rows are read all at once.
These are the solutions that I come up with,
- Save the table as JSON in a JSON Type or HStore pairs.
- Save the table as CSV data in a Text Field
What are the alternative methods to store the above data? Can NoSQL databases handle this data?