MLLretfA
The goal of this website is to explain to you what is a database and how it works thanks to the example of the Olympique Lyonnais team.
A database is a data structure that stores organized information. It is really useful when yu have too much information such as in a complex company. If you want to find the right information, you have to know where it is. That is why database are sometimes necessary. In this website, I will show you how to create a database and how to look for information thanks to the website Fireapp and the example of the 11 players of Olympique Lyonnais that played against Juventus Torino on the 26th of February 2020.
First, you have to create a Firebase account on Internet, then follow the steps to begin with a databas After the set up of the database, you will get this code hereunder:
>
You have to copy this code and paste it in the script.js file on Glitch. After this, you can create your database on the subject you want.
Here I did it on 11 players of Olympique Lyonnais and give for each of them the following data: name, age, nationality, their first year as a professional and the clubs they had played for in the past.
The 3 following pictures resume what were the information I give and how it is structured on Firebase.
After this, the interessant thing is that you can export this database with a json format thanks to a tool on Firebase.
You just have to click on the doted line and to click on "export format json". You will get the following document:
Finally, you just have to copy this file and to past it in the players.json file.
Now that everything is set up, you can asked on the script.js file whatever you want about this databse, for instance, hereunder I asked to display every players that are between 22 and 26 years old.
Moreover, you can change what you want to display like their nationality for instance thanks to the code.