Usually, games like this loads your character from DB when you login, and then game server handles character logic (i.e. character becomes real time object in game). When you logout (and probably periodically as well) your character is saved back to database.
Just like a singleplayer game is not saved to disk every frame, its same thing.
And modern database may handle a lot of data. For example, I work on ES database that has 160 000 000 records and ES can find record in <5s. While total number of players in WoW might seem a lot, databases can take much much more than that.
Latest Answers