How does mmorpg store the data?

I want to use the SQL database in my server.exe.

Say 1000 users online. And the players will change their data when they play. And the server must register these updates.

But how ?

I think there are two ways:

1) The server will save in RAM at runtime and the server will write data (update) to the SQL database from the RAM. But if the electricity is cut off or the server stops, the updates will not be saved. Of course, I do not want to lose the updates.

2) The server will save the updates to the database at runtime. but what will happen to the speed? I've thought of a method. I will show you below with an image. Can I have enough speed for 1000 players online with this method?
enter the description of the image here