I am using Postgres 9.3.
I have to store range data like <250ドルK, 250ドルK-4ドルM,
etc which we will display in a dropdown.
now I am making a table for all possible options that can be configured from an admin interface.
Should I take separate column for min,max,currency_type(dollar,euro) and a column to store K,M etc or there is a better way to do that ?
2 Answers 2
Guessing you will be needing ranges for different kinds of dropdowns;
enter image description here
If these are intended to be all-encompassing ranges that all values must fall within, I'd just store either the maximum or minimum value of the range in a single column.
ID | Amount
-----------
1 | 0
2 | 250000
3 | 500000
4 |1000000
5 |2000000
You can calculate the actual ranges on the fly from this.
range
data type have here?