[erlang-questions] Minimum number of attributes in an mnesia table

Ben Hood <>
Thu Jul 31 00:37:46 CEST 2008


On Wed, Jul 30, 2008 at 11:31 PM, Sargun Dhillon <> wrote:
> It is a key-store database. One key, multiple values....

That's a fair call, I just would imagined mnesia would provide some
syntactic sugar to fill out the value in the key-value pair with some
kind of dummy value.

Then again, the reason why I am using mnesia just to maintain a tree
index could be questioned.

The reason why I'm doing this is for easy maintenance in a clustered scenario.

Maybe their are other ways to acheive the same goal?

>>
>> This seems like a very stupid question, but why do you need to have a
>> minimum of two fields in table definition?
>>
>> For example, if you try to create the following table
>>
>> mnesia:create_table(binding,[{type,ordered_set},{attributes, [b]}]),
>>
>> it returns
>>
>> {aborted,{bad_type,binding,{attributes,[b]}}}
>>
>> The apparent solution is to add a dummy field to the table definition.
>>
>> Thx,
>>
>> Ben
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>



More information about the erlang-questions mailing list