V
V
vetsmen2019-08-11 20:51:56
PostgreSQL
vetsmen, 2019-08-11 20:51:56

How to organize the storage of such data?

There are (almost) the same data, except for their peculiarities:
1) "Item Name 1 | Magic" : price
2) "Item Name 1 | Electron" : price
3) "Item Name 1 | Favorite" : price
4) "Item Name 2 | Magic" : price
5) "Item Name 2 | Electron" : price
6) "Item Name 2 | Favorite" : price
...
And each item has its own price.
The question arose - how best to store such data, so that later you can make a selection, operating on their price?
The way it is now - the option suits, but is it possible to somehow optimize this better in terms of storage in Postgres?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Derepko, 2019-08-11
@vetsmen

items:
id | name | type | price

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question