[erlang-questions] Mnesia normalized field lookup

Szepes Tamás tamas@REDACTED
Sun Jan 27 19:00:51 CET 2013


All,

I have couple of Mnesia tables where the records has some long text fields
with relatively little variation in content (like institute_name which can
be 128 characters long, but in a typical installation there is no more than
20 different values). About 1/3 of my fields are similar and I cannot
determine all possible values in advance to make atoms for them (data from a
new institute can come any time after installation, and the database needs
to be self contained for archiving purposes).
As I need to handle ~10^8 records I’d like to normalize these fields to
spare storage space. However it blows my code if I have to do 3-6 joins in
every lookup operation, not to mention the inserts.
Is there any elegant way of handling this situation?

Thanks in advance,
Tamas




More information about the erlang-questions mailing list