Database usage

User avatar
neko259
Member
 
Posts: 801
Joined: Sun Jun 19, 2011 06:51

Database usage

by neko259 » Tue Oct 31, 2017 10:17

Suddenly I decided to run a minetest server after a years I stopped it. Meanwhile I've seen that minetest supports putting player data to the database. I've looked into the DB and now I'm very curious about how it works.
As I can see, minetest uses an sqlite database like it is still plain files. Advantage of the database is relations, and here instead of using e.g. a table for blocks that is referenced by the inventory table, we have text-based column with the same block names all over again. Same with player names, and I assume the world database works that way too. This means, the database engine needs to compress and optimize these tons of redundant text data all over again every time they are changed, and this is a huge disadvantage. Why is this made in such way? It is relatively simple to fix.
Also, it puzzles me why the databases are separate. One DB for players, one for rollback, one for world. Why can't I have one sqlite or postgres database for everything and have one file and one connection?
 

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 1 guest