FIREBASE DATABASES

Definition of a database

The rough definition of database is the following : “It is a collection of information that is organized so that it can be easily accessed, managed and updated. Computer databases typically contain aggregations of data records or files, containing information about sales transactions or interactions with specific customers.”

Furthermore, when talking about database more specifically, they say that : “In a relational database, digital information about a specific customer is organized into rows, columns and tables which are indexed to make it easier to find relevant information through SQL or NoSQL queries. In contrast, a graph database uses nodes and edges to define relationships between data entries and queries require a special semantic search syntax.  As of this writing, SPARQL is the only semantic query language that is approved by the World Wide Web Consortium (W3C).”

Therefore, when speaking about jobs and database, it is confirmed that : “Typically, the database manager provides users with the ability to control read/write access, specify report generation and analyze usage. Some databases offer ACID (atomicity, consistency, isolation and durability) compliance to guarantee that data is consistent and that transactions are complete.”

Source

Firebase: Definition & History

As we are getting to the main topic, it is primordial to understand what is a Firebase.
It is described as :
“a mobile and web application development platform developed by Firebase, Inc. in 2011, then acquired by Google in 2014. As of October 2018, the Firebase platform has 18 products, which are used by 1.5 million apps.” Firebase was initially created and launched in April 2014, significantly « Firebase is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. When you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive updates with the newest data.”

In this example, the different capabilities of Firebase are presented as followed :
In addition, Firebase introduce a lot of functionalities, ideas and notions, which make it very useful and interesting. A real time base permits all users to react together at the same time, which permit to make projects and storages evolve very quickly, users helping each other and giving their opinion as well. https://firebase.google.com/docs/database Source

Taking the exemple of a website called “Shoppping” that could have a function to make a shopping list but then pick up the list later on on Firebase. When adding products, they will be added online and to the list.

Here as the following steps in order to be able to make it work. When going on “Database” and “Rules”, we need to modify them as followed :

Then, the main objective is to implement and include Firebase into the App. When making the list, the goal is to implement the name of the products (the list) from Firebase directly. Adding a new element is made thanks to “addItem” and take the list with “getItems” . To do so, we need to open “controllers.js” and add directly the following code.

The following task consists in adding “shopping.html” to show the shopping list and a button to add some articles whenever we want to.

Following those steps, it is possible to add and keep products into the storage Firebase.

NOW YOU ARE ALL SET UP !