mnesia bags vs sets containing lists

Dave Challis dsc@REDACTED
Fri Mar 18 16:02:58 CET 2011


Assuming I wanted to store some simple data structures in mnesia, of the 
form:

{Key, [A, B, C, D, E, ...]}.

in which I don't care about the ordering of the list.

What would be the advantages/disadvantages of storing it using:

a) a table of type set, storing/retrieving the whole list at once, and 
operating on the list to get specific elements

b) a table of type bag, storing/retrieving individual values using mnesia

I'm just trying to get a feel for the differences in the above two 
implementations, rather than having any concrete use in mind.

Thanks,

-- 
Dave Challis
dsc@REDACTED


More information about the erlang-questions mailing list