Dec 15, 2021
Yea... Looks like you do not understand properly for what we are using the database :)
Storing the data in the database it is not only about speed. It is about safety at least.
In your approach you raises the problem about the time which we spend for connection but even saving everything in RAM will work only with selecting :)
Cause you still need to create this connection for committing into the database.
Also, What is the mechanism of updating the data in RAM ?)
How can I be sure that data is fresh, let's say in case our database could be changed ont only via the application?