Using a DB

Post Reply
User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Using a DB

by LouisDB » Post

Hi,

I'm gonna make a subgame that will be used for a (hopefully) big server on a Linux machine.
What type of database should I use to record persistent data ?
I want to be able to read it to display infos on a website and I don't care about portability since the server will run only on Linux.
I already know MySQL/MariaDB a bit.

Any suggestions ?
Thanks in advance :)

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Using a DB

by LouisDB » Post

Any ideas?

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Using a DB

by Byakuren » Post

Why not just use an SQL DBMS since you're already comfortable with it?
Every time a mod API is left undocumented, a koala dies.

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Using a DB

by LouisDB » Post


User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Using a DB

by rubenwardy » Post

tip: to require in mod security, you should use this code:

Code: Select all

local env = _G
if minetest.request_insecure_environment then
    env = assert(minetest.request_insecure_environment(), "Please add <modname> to trusted mods")
end
local luasql = env.require("luasql")
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Using a DB

by LouisDB » Post

Noted. Thanks

Xudo
Member
Posts: 162
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: Using a DB

by Xudo » Post

I think that best option to store minetest world is noSql database like cassandra.
You need fast insert and select of blocks of data and don't really need transaction handling and table relations.

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Using a DB

by LouisDB » Post

It's not to store the world. It's for mods persistent information. Especially teams and plots.
What's the point of saving the world in a DB?

Xudo
Member
Posts: 162
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: Using a DB

by Xudo » Post

In this case it is better to use anything simple for a quick start. If storing data in files is easier than compiling luasql, then use files. Minetest already provides you (de)serialization functions.

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Using a DB

by LouisDB » Post

Using sql is not a problem and I need to be able to access the DB with php.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest