Answer the question
In order to leave comments, you need to log in
How to store data in a web application?
I am writing my web application in React and Laravel, studying them along the way, and at some point I realized that I don’t know any other ways to store information other than MySQL, JSON and XML. At the moment, part of the data is stored in JSON format in the MySQL database. You have to extract large JSON arrays and process them using PHP. Since the data is requested very often during the session, it is necessary to store it in Redis in order not to constantly load MySQL.
The data, if I may say so, is "standardized", that is, it is stored according to certain rules, depending on the type field, for example:
[
{
"type": "simple",
"header": "Text header",
"content": "Text content"
},
{
"type": "complex",
"header": "Text header",
"content": [
"Content 1",
"Content 2"
],
"add": [
"String 1",
"String 2",
"String 3",
"String 4"
]
}
]
Answer the question
In order to leave comments, you need to log in
Easier to understand most likely sqlite. But when you work with a muscle after it, you understand what an inconvenient format it is.
And it is better to transfer from blobs to normal base fields + links. So in some cases you can get part of the data without additional requests (well, not the whole bunch, as most likely now). Yes, and editing is more convenient in the final plan. You do CRUD \ use a ready-made solution, or you simply move values with your hands.
The database is not fundamental, it is important to understand the principles of construction.
Google:
SQL Basics Database
Normal Forms
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question