Tuesday, 27 August 2013

Storing Relational "Type" or "Category" Data in Firebase Without the Need to Update Multiple Locations

Storing Relational "Type" or "Category" Data in Firebase Without the Need
to Update Multiple Locations

I am trying to get a good grasp of how to structure relational data in
Firebase. I understand that the data model is very different, but I have a
long history with relational databases. Today, I am trying to solve a
simple problem.
In MySQL, I have a Node table and a NodeType table:
Node Table
Node Id
Node Name
Type Id
Node Type Table
Type Id
Type Name
Type Metadata
My problem is that I want to store a certain set of metadata for each Node
Type, but I only want to store that in one place. I want to be able to
change the metadata for Node Type A, and have it automatically apply to
all Nodes that belong to that type.
What is the best way to structure this in Firebase?

No comments:

Post a Comment