ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Looking for lightweight, simple, portable/integrated database for Go

<< < (2/3) > >>

Ath:
A NoSql Variant could be MongoDB. It can be used by many programming Languages.
-KodeZwerg (August 31, 2018, 06:00 AM)
--- End quote ---
Hm, but it doesn't quite match the OP's requirements of being lightweight, simple and portable, AFAICS.

Shades:
Besides all of the above, MongoDB is intended more for document management.  The strength of NoSQL databases lies also in their ability to have nodes (read: separate computers) for reading/storing data at speed. All of that does not indicate that it even can (or should) be used as "portable" solution.

SQL Lite is indeed a good option. MySQL has a lot of free tools to manage that database. Even web-based it that tickles your fancy. There is a tool called: XAMPP which you can use in a portable sense to create a full blown web development environment. there is a tool in it that allows you to start/stop each individual section of that environment separately (Apache, MySQL, PHP and Python). So you could only start the database from it and you could use the command line to create databases and users. Or use the included PHPMyAdmin web interface (which requires you to enable Apache only for as long as you need it to). And if manually starting MySQL sounds like a bit of a drag, the start/stop tool also allows you to enable it as a self starting service too.

XAMPP is an archive of about 75MByte (7-zip) to download and if you extract it in a root folder (for example:  C:\xampp) than you don't need to do anything to make MySQL work. If you don't want to use the root folder, there is an executable batch script in that archive that shows you the steps to reconfigure it for any desirable storage location.

If your tool becomes popular you might want the extra features of a more mature database, which can be easily implemented on (cloud-based) web servers as well. In that case MySQL is a decent bet. Quite a feature set, smallish resource footprint, a lot of free (web-based) management tools and lots of code examples on how to work with it programmatically in whatever language.

Deozaan:
I decided to give SQLite a try with Go, but all my Googling seems to suggest I should use https://github.com/mattn/go-sqlite3 to interface with SQLite, but I can't get that project to build. It requires GCC, which I can't find anywhere without it being bundled with a billion other development tools. And after installing a few different development packages (mingw, msys, windows-build)

After working on it for a couple of hours I'm ready to consider alternative ideas. I was hoping I could find something that would just be "drop in" for myself as a developer, and also "just work" invisibly behind the scenes for the end-user.

I've just discovered Bolt DB while pausing from writing this post to look further into the issues I was having with go-sqlite3, and it seems to be fairly drop in and simple. I'll give that a try and see how it works.

KodeZwerg:
A NoSql Variant could be MongoDB. It can be used by many programming Languages.
-KodeZwerg (August 31, 2018, 06:00 AM)
--- End quote ---
Hm, but it doesn't quite match the OP's requirements of being lightweight, simple and portable, AFAICS.
-Ath (August 31, 2018, 06:10 AM)
--- End quote ---
In one of my applications i've included a few lines php, more not needed to interact with mDB, MongoDB works over Cloud, how much more portabilty exists? Anyway, OP goes SQLite, so thread is done i guess  :D

Best wishes! (i did not wanted to tell that sql is bad, no misunderstanding please, i just wanted to give another option a slight chance of being known.)

Ath:
Thank you @KodeZwerg for your nosql alternative, but the biggest objection to me is one of the main features of MongoDB: It's in the cloud. That means that my data is not really my data... and not really portable, as it requires an internet connection.

@Deozaan: As with any project, you have to choose the right tools for the job. If the combo Go/SQLite isn't working as expected/desired, it most likely isn't meant to be. You might need other tools...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version