V
V
Virass2022-04-15 16:49:37
Web development
Virass, 2022-04-15 16:49:37

Where is the best place to store an array of objects? json or db?

It is necessary to implement a log of acceptance and delivery of electric scooters from mobile phones. There are about 1000 electric scooters for couriers and basic monitoring of the use of these scooters is needed. I thought of writing a small front with a form that would pull some kind of json with an array of objects, in which these scooters would be, well, to save the history of the use of scooters by couriers, I thought to google how to write changes to this json with a node.

But is it worth using json for this task, or is it better to learn how to write all this into a full-fledged database? Well, if the database, then which one to choose?

No security is needed here, the data will be anonymized, just an array of objects with numeric values, booleans and several strings.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2022-04-15
@rPman

Multiple simultaneous access to data - the choice is definitely limited to databases with transaction support (there are exceptions, but it's better not to think about them), since there is sql in the tags, then probably it is understood as a database? then yes, it’s better to use sql, 99% of the problems are solved there or tools are provided to solve them, and most importantly, this is the right approach to development
; personally, I would not recommend a beginner to work with nosql databases like mongodb, although they support transactions, only an experienced one can use them correctly a person who understands what's what

M
Mercury13, 2022-04-15
@Mercury13

Storage is better in a DB. Anyone, even SqLite, even MyISAM, you don’t have any reason to look for the Most Fashionable DBMS®.
JSON can also be used as an intermediate data transfer mechanism, if you so desire. It all depends on your skills as a web developer. Since my web knowledge is fifteen years out of date, I would first do pure PHP + non-AJAX, and then I would think.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question