Page 1 of 1

Using a DB

Posted: Sun Nov 13, 2016 09:35
by LouisDB
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 :)

Re: Using a DB

Posted: Wed Nov 16, 2016 18:10
by LouisDB
Any ideas?

Re: Using a DB

Posted: Wed Nov 16, 2016 18:39
by Byakuren
Why not just use an SQL DBMS since you're already comfortable with it?

Re: Using a DB

Posted: Thu Nov 17, 2016 11:43
by LouisDB

Re: Using a DB

Posted: Thu Nov 17, 2016 12:57
by rubenwardy
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")

Re: Using a DB

Posted: Thu Nov 17, 2016 19:33
by LouisDB
Noted. Thanks

Re: Using a DB

Posted: Fri Nov 18, 2016 17:51
by Xudo
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.

Re: Using a DB

Posted: Fri Nov 18, 2016 21:26
by LouisDB
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?

Re: Using a DB

Posted: Sat Nov 19, 2016 12:49
by Xudo
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.

Re: Using a DB

Posted: Sat Nov 19, 2016 14:18
by LouisDB
Using sql is not a problem and I need to be able to access the DB with php.