FYI, since it looks like you’re using some kind of relational db modeling tool — document databases aren’t like relational databases, and in particular it’s often a bad idea to fully normalize your data. So I don’t recommend designing your database as though it were relational.
One common design: if you have a one-to-many relationship where the ‘many’ records are small, it often makes sense to store them inline in an array. For example, store phone numbers as an array of strings (or dictionaries containing strings) in the contact/customer document, instead of making a separate document for each phone number. Also note that in a fully distributed system you don’t have transactions, rather it’s more “eventual consistency”. So there can be moments where one document has been updated but not another that it relates to, making the data inconsistent. You need to be flexible about handling this, or if the data must always be consistent, store it in a single document (since docs are updated atomically.) —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/DFC38FBF-D542-4714-84F2-AF1AFCE9C83F%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
