Using a DB

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

Using a DB

by LouisDB » Sun Nov 13, 2016 09:35

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 » Wed Nov 16, 2016 18:10

Any ideas?
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Using a DB

by Byakuren » Wed Nov 16, 2016 18:39

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 » Thu Nov 17, 2016 11:43

 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Using a DB

by rubenwardy » Thu Nov 17, 2016 12:57

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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")
 

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

Re: Using a DB

by LouisDB » Thu Nov 17, 2016 19:33

Noted. Thanks
 

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

Re: Using a DB

by Xudo » Fri Nov 18, 2016 17:51

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 » Fri Nov 18, 2016 21:26

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: 20
Joined: Wed Nov 09, 2016 16:43
GitHub: xudojnikomsk
In-game: Xudo

Re: Using a DB

by Xudo » Sat Nov 19, 2016 12:49

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 » Sat Nov 19, 2016 14:18

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


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 6 guests

cron