In the relational database world, we would tend to store unique pieces of data uniquely (e.g., in a single table, for example). However, now, with object stores (e.g., Firebase) it seems like storing the same piece of data in multiple places might be the best-practice? Is this true?

For example, I want to have users store contact data. But each contact can only belong to one user (i.e., each unique email address can only have been referred by one and only one user. Subsequent attempts to submit a previously referred email will be rejected). Therefore, it seems I will need to store individual email addresses in at least two places. One in a master list, to be checked against for each email submission. And each email in that list should index who the referring user was. And, again, each email address should also be stored in a list under each referring user.

Is this redundant type of storage of data in object stores considered best-practice and necessary in the object datastore world?

  • Why don't you just check the user table for duplicate email addresses? You can't index a field on an object store? That's damned inconvenient. Commented Oct 27, 2016 at 3:21

1 Answer 1


Object stores have a very specific use, usually high-performance with big data. They are not a replacement for relational databases. Rather, they fulfill a different need.

Consequently, many of the guarantees that you get with relational databases for free, you don't get with object stores. One of the most important of these is JOINS. Joins are typically done by hand in object stores (you have to write code that loops through records), so anything that requires a join will be more inconvenient in an object store.

All that said, your assertion (that object stores demand duplication of data) is probably false. As long as you're willing to do the joins yourself, you ought to be able to model relationships in an object store the same way you would in a relational database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.