Can I link and use databases in Defold?

Hi Guys,

I’m going to begin work on a game for my A-Level project and have been taking into consideration Defold.
I was just wondering, is it easy to link and use databases with Defold. If so what would be the best way of going about this.

Many thanks.

1 Like

what is your use case, why do you need database, could you please elaborate?
Depending of your needs; you can use remote database and access it through http request(using API), or maybe simple json read/write might be enough or you can use sqlite (Sqlite native-extension)

Yep. You can use databases with Defold quite easily. If you look at all the available Lua bindings to databases, its highly likely you can use them in Defold to operate them.
As @selimanac noted I made one for Sqlite, but you could easily have a Postgress or MSSQL DB interface using something like:

I havent used this, but since it is luajit based, it should integrate quite well. Let me know what DB you are interested in and I’ll pass on some tips on how to add it as an extension or use it directly.

3 Likes

Hi, where can I find your one for sqlite as this is what I was interested in. Thanks again for all the help.

It’s linked in the second post:

1 Like