Is it a good idea to use JSON as a database?

0

I'm doing a mobile app project. Using Python and Kivy. My project has three main classes to be saved in a database (it's an application for ticket sales): Tickets, Events and Users.

Searching, I have seen that JSON at the beginning is quite easy to work with, and it is recommended in the Kivy documentation as one of the usual methods of data permanence.

But I had some doubts (which I, unfortunately, could not heal in simple searches or documentation). The main one: is it feasible to keep JSON as my database? Whereas the app can grow in numbers.

Should I make a JSON file for each class? (one for users, one for tickets and one for events)

That's it. If you have any reading recommendations that can remedy these doubts, I thank you very much. I'm starting with the 3 technologies, this should justify simple doubts.

Thanks in advance for your attention.

    
asked by anonymous 23.08.2018 / 00:45

2 answers

1

Complementing the Alex Ayub :

If your database is relational (that is, each dataset is a table with fixed columns) then you can use SQLite ( import sqlite3 as lite ). However, if you intend to keep this application (and base) on an AWS-type serser (and are concerned with scalability, compliance, and general adm) you should use AWS RDS (in that case you will need to use MySQL or another server solution such as SQL Server or Maria DB, etc. but not SQLite).

    
23.08.2018 / 05:40
1

JSON is a format, for example:

Cliente = {
  Nome: 'Fulano',
  Sobrenome: 'teste',
  Idade: 36
}

This is an example of json , it is a format, which is now standard for working with the communication between FrontEnd and BackEnd(Apis) , the pattern of sending and receiving data between the parties most of the time, even more with the restful das API's pattern. As said above is a format, today there are NOSQL databases that work almost instantly with JSON , because they work with the same document pattern, for example MongoDB . But if you want to write to a database, just put JSON in the pattern you want and the database you chose to understand, then save the data.

    
23.08.2018 / 01:22