Mnesia data partitioning question

Ulf Wiger etxuwig@REDACTED
Wed Apr 17 12:11:37 CEST 2002


On Tue, 16 Apr 2002, Chris Pressey wrote:

>Although I don't really expect a concrete answer to this one, I
>thought it might be interesting to share opinions on the
>subject...
>
>Mnesia lacks the concept of a 'secondary key' - that is, using
>more than one field to uniquely identify a record.  So, is it,
>generally speaking, wiser to model a many-to-many relationship
>in Mnesia as:
>
>- a 'set' table with a compound key, or
>- a 'bag' table with an index on a second field?

I would go for a 'set' table with a compound key.

I wonder if you've looked at the support for relational
constraints in the 'rdbms' contrib? It offers support for things
like cascading delete and "insertion constraints" (e.g. the
secondary key must identify an existing record in a given table.)
If you find it lacking in certain respects, I'd be happy to hear
what you feel would need to be added/changed.

/Uffe




More information about the erlang-questions mailing list