Mnesia and uniqueness on two keys

Joel Reymont <>
Tue Jul 12 17:53:03 CEST 2005

I have a record defined like this:

-record(tick_data, {
       ticks % tuple

I create the table like this:

                   {disc_copies, Nodes},
                   {index, [date]},
                   {type, set},
                   {attributes, record_info(fields, tick_data)}

My intent is to have a table where multiple records with the same  
symbol but different dates can coexist. Will the above work or do I  
need to create a bag table?

In other words, does Mnesia expect uniqueness on each keys or do both  
keys work as a composite?

     Thanks, Joel


More information about the erlang-questions mailing list