Book Image

Data Oriented Development with Angularjs

Book Image

Data Oriented Development with Angularjs

Overview of this book

Table of Contents (17 chapters)
Data-oriented Development with AngularJS
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Structuring data


Every application involves data, so for talking about how to structure data, let's choose a simple problem domain. I'll assume that you are staying in an apartment, and this apartment is part of a bigger apartment complex. The management of the complex has to maintain a lot of information about the complex, such as how many buildings there are in the complex, how many apartments there are in each building, and who the owners and tenants of these apartments are. Then, it has to keep track of the number of vehicles that each owner/tenant has. Keeping this problem space in mind, let's see how we can store and fetch data from Firebase.

Since Firebase is a NoSQL store, which doesn't have SQL-like querying capabilities, we need to pay upfront attention to the structure of data, how the data will be read back later, and how to make this process of reading as easy as possible. NoSQL stores operate on one underlying principle, which is—disk space is cheap, but the user's time is not...