I'm using Mnesia with Erlang, but this question applies to any key-value db like couchdb, etc.
I'm trying to break free of the RDBMS thought process, but I can't wrap my head around how to efficiently implement this kind of schema.
Say I have a User record, and he has many SubItemA records, which has many SubItem B records, so:
User
-SubItem A
--SubItem B
...
I need to run queries on SubItem B. Is it efficient to do it when it's this nested? Should I just normalize it so it will be quicker?
I have heard of some people using data duplication so the data is both nested and separate, is this ridiculous or is this actually useful in some cases?