[erlang-questions] Ets and Postgres
Dragan Zubac
zubac@REDACTED
Tue Dec 4 14:34:26 CET 2007
Hello
Postgres table for example:
article user price where_to_ship
-----------------------------------------------------
ball petar 4 London
shoe petar 5 New York
ball jane 4 New York
shoe jane 5 Paris
.
.
.
Table guarantee that article+user is unique. The idea is to split this
table and insert data into ets for price and where_to_ship lookup. What
about to split data in the following way:
key = article_user,value = price_where_to_ship
and insert that data combination into ets table ? So if user Petar wants
to buy ball for example,we'll make lookup for key='ball_petar',will get
back value='4_London',parse the value to get price='4' and
where_to_ship='London' ?
Or to make some additional ets tables and make some kind of relations
between them to achieve uniqueness ?
Anybody had some similar experiences ?
Sincerely
Dragan
More information about the erlang-questions
mailing list