News for hackers. Stuff that matters.
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by smt88 on Sunday October 18, 2015 @02:52AM (#10407441)
What's the use-case for this over, say, SQLite?
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by klibertp on Sunday October 18, 2015 @06:11AM (#10407750)
I think it's use-case is when your data is more structured than what Berkeley DB can handle but doesn't really fit neatly into tables. Not using SQL as a query language is a plus in some scenarios too, particularly if your data manipulation needs are a bit more complex and you don't have the room for importing and using a full ORM (which is a "Vietnam of Computer Science"[1] anyway).

[1] http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Compute...

Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by PythonicAlpha on Sunday October 18, 2015 @07:15AM (#10407884)
You don't need a full blown ORM here. A rather thin access layer would suffice, as much I can see from the API.

What I can see here, is that the data store is just a big JSON-file. So the implementation does not scale well (every save just writes the whole database and the database must be read in total to access any tiny bit of data). For any even medium sized application, it would be better to use a more sophisticated basis.

Maybe as configuration database -- but even for that, I guess there are already better choices in existence.

Edit: Upvoted the OPs post, because of the Vietnam-Link -- good read. Still, I would not throw RDBMSes totally out of the window. I think, we have learned a lot from them and in many, many cases they are just right. There are some cases of course, where object oriented schemes are more appropriate.

Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by klibertp on Sunday October 18, 2015 @07:25AM (#10407908)
> You don't need a full blown ORM here.

Precisely my point, you don't need an ORM with this LanderDB, but you'd need it with SQLite (unless you like using raw SQL, which is a fine preference too, of course).

> What I can see here, is that the data store is just a big JSON-file.

One possible use-case for this I recently discovered is storing bookmarks in Chrome (https://klibert.pl/output/jq_and_chrome_bookmarks.html).

I'm not saying LanderDB is the best option and as smt88 wrote there certainly are many alternatives. I'm just noting that LanderDB doesn't seem to occupy the same niche as SQLite.

EDIT: oh, and I'm in no way involved with LanderDB, I just saw it a couple minutes ago :)

Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by smt88 on Sunday October 18, 2015 @06:27AM (#10407788)
It sounds like you're describing an embeddable document store. There are options for that as well:

- UnQLite: http://charlesleifer.com/blog/python-bindings-for-unqlite-an...

- tinydb: https://pypi.python.org/pypi/tinydb/

- Blitz: https://github.com/adewes/blitzdb

Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by klibertp on Sunday October 18, 2015 @07:17AM (#10407888)
I didn't know about these, thanks.
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by biokoda on Sunday October 18, 2015 @06:23AM (#10407778)
Sqlite now supports JSON.
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by smt88 on Sunday October 18, 2015 @06:28AM (#10407790)
You still have to use SQL to query it though, right? JSON is just a data type option, to my knowledge.
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by biokoda on Sunday October 18, 2015 @07:07AM (#10407867)
When is it better to use something else?
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by smt88 on Sunday October 18, 2015 @11:42PM (#10410985)
Oh I personally have no problem with SQL. Another commenter was just saying you might want to use LanderDB when you don't want to use SQL.
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by max0563 on Sunday October 18, 2015 @03:55AM (#10407544)
It was mainly created for P2P systems that need to sync databases across clients. Being that data is stored in JSON it can be sent and received with relative ease.
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by _ZeD_ on Sunday October 18, 2015 @05:16AM (#10407665)
...duh... instead a sqlite file is so difficult to share?
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by togusa on Sunday October 18, 2015 @05:29AM (#10407683)
Why use sqlite when you can invent something new which has no concurrency semantics and eats up inodes?
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by amirouche on Sunday October 18, 2015 @07:16AM (#10407887)
sqlite is thread safe?
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by klibertp on Sunday October 18, 2015 @07:27AM (#10407913)
Yeah, I remember reading about it a couple of months (years?) ago and being very surprised and impressed. The details: https://sqlite.org/threadsafe.html
Re:Show HN: LanderDB – A Mini Flat File Database Engine for ... by smt88 on Sunday October 18, 2015 @05:56AM (#10407724)
SQLite databases are just as "easy" to send and receive. In fact, they can be compressed, which means they're even easier.