Some words on storage - the problem with a list

Before venturing deeper into Firebase, let's first explain why we are talking about lists in the first place. In a relational database, we would be using SQL, tables, and normal forms to define our database. This is not the case with a Firebase database, as it is made of a JSON structure, looking something like this:

{
"person": {
"age": 11,
"name": "Charlie",
"address": "First Street, Little Town"
},
"orders": {
"someKeyHash": {
"orderDate": "2010-01-01",
"total": 114
},
"someOtherKeyHash": {
"orderDate": "2010-02-28"
}
}

Notice how the orders collection in a relational database would be an orders table with a lot of rows. Here, it seems to be an object; why is that?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset