M
M
maxpup2020-03-10 15:20:46
Database
maxpup, 2020-03-10 15:20:46

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"  
    ]
  }
]


I would like to be able to conveniently edit the data (the user can only read the data), since all of them are stored according to certain rules, and contain only primitive values ​​(numbers, strings in arrays and objects). Just compare, choose according to certain rules, and so on ...

Perhaps there are some books, courses, video tutorials dedicated specifically to databases and information storage methods? I know there are many other databases out there. I would like to know in which case it is worth choosing one of them

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Arseny, 2020-03-10
Matytsyn @ArsenyMatytsyn

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.

T
ThunderCat, 2020-03-10
@ThunderCat

The database is not fundamental, it is important to understand the principles of construction.
Google:
SQL Basics Database
Normal Forms

N
Nadim Zakirov, 2020-03-10
@zkrvndm

I was once recommended Eloquent ORM, probably it will suit you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question