[erlang-questions] Mnesia and autogenerated ids

Luke Galea galeal@REDACTED
Thu Aug 7 20:44:50 CEST 2008


Hi all,

I'm trying to get my head around mnesia. It seems great so far, but
I'm struggling with the lack of autogenerated ids to have one table
refer to another. I'm on board with having less normalized data
requiring fewer tables and thus fewer references.. But when a
reference is required, is there no "easy" way to reference another
table without using a natural key (like "user_name", etc)?

I see that I could have a gen_server that serves up ids.. but is there
a better way to do this? It seems an unnecessary bit of complexity to
support if everyone ultimately needs to do this.

Thanks in advance

Luke Galea
http://www.ideaforge.org




More information about the erlang-questions mailing list