Live data from Hacker News

Show HN: Mongita is to MongoDB as SQLite is to SQL

github.com

71–80 of 95 posts

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#71
post #48
post #36

Earlier quoted context omitted.

Thanks for sharing your project. It’s probably not a good comparison. SQLite is in such high esteem and such a well developed high quality mature product. So the comparison is sort of inviting criticism that gets in the way of people appreciating what is good about your project.

I am astonished that this is this is the sentiment. I've always of SQLite as a small, self-contained implementation of a SQL DB server. And so the comparison makes perfect sense to me.

It’s not even remotely self contained though, so how is the comparison relevant?

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#72
post #33

Earlier quoted context omitted.

SQLite is a portable DBMS library that exposes a SQL language interface that is built and runs under every OS and language under the sun, for the most part. It is probably the single-most distributed library on the planet (in aggregate). And likely one of the most used libraries (top 10) on just about every given OS and platform/language. Mongita is only useful for Python developers.

I like sqlite and agree with your it should run everywhere to be compared. I question that it is the most distributed library on the planet. Is there something backing that up? It would be cool but very shocking.

> I question that it is the most distributed library on the planet. Is there something backing that up? It would be cool but very shocking.

I recall seeing that claim made ~2 years ago, with data to back it up. I think many people forget that it is shipped (or statically compiled into an application that is shipped) on every android device (handset, TVs, etc), every Linux installation, every Windows installation and every OSX installation.

I do not know of any other library that has that penetration. I don't know about iOS.

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#73
post #51

It's sad that author did not mentioned that disk engine basically stores copy of data in memory. And it seems from benchmark code that reading doesn't hit disk at all.

Hey, your first statement is true but your second is not. The disk engine does store data in memory which is part of the design. You wouldn't want to use a database that doesn't utilize caching. The last benchmark panel, https://raw.githubusercontent.com/scottrogowski/mongita/mast... , shows cold starts where I test it without cache. So in that, it does hit the disk.

> The last benchmark panel, https://raw.githubusercontent.com/scottrogowski/mongita/mast..., shows cold starts where I test it without cache. So in that, it does hit the disk.

Okay, so looking at the first two tests - "Retrieve all documents" and "Get 1000 documents by ID" ...

If you switch the order around, does it make a difference to the benchmark? Because I suspect that the first test preloads all records into RAM, and the second test simply searches RAM, which is not what we usually do with SQLite. We don't cache all records before searching.

Switch those first two tests around, and lets see if it makes a difference.

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#74
post #69
post #42

Earlier quoted context omitted.

Having the best performance isn't necessary for a lot of use cases. Sometimes you just want to store and search a bunch of json objects and for that the mongo api is way more convenient then the postgres/sqlite json options

I am not too familiar with MongoDB, but how does the API compare to an ancient key-value store library of Berkeley DB (db.get/put/delete/...)? (Asking in the context of Mongita, or rather, a file-based key-value store)

There isn't a relationship between the two in terms of API. However the team that designed the Berkeley DB storage engine went on to commercialise it via a company called SleepyCat. That company was acquired by Oracle. The team subsequently left Oracle to found WiredTiger (SleepyCat, WiredTiger, geddit? :-)). WiredTiger was focussed on building a modern database storage engine focussed on high CPU count, high memory footprint servers. In 2014 MongoDB acquired WiredTiger and that is now the main storage engine for MongoDB. Interesting Footnote, Michael Cahill is the primary author of "Serializable Isolation for Snapshot Databases" [0] the paper that introduced Serializable Snapshot Isolation (SSI). SSI is the concurrency control mechanism used in Postgres [1][2]. [0] - https://courses.cs.washington.edu/courses/cse444/08au/544M/R...

[1] - https://wiki.postgresql.org/wiki/SSI

[2] - http://drkp.net/papers/ssi-vldb12.pdf

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#75
"Mongita" is a misspelling according to the DLE; the standard spelling is "monjita". Literally, the word means "little nun", but is the common name for flycatchers of the genus Xolmis. https://dle.rae.es/?formList=form&w=monjita# https://es.wikipedia.org/wiki/Xolmis_rubetra

Unfortunately every time I see the misspelling in this thread I involuntarily cringe. I suppose "MongoDB" is named after a slur used to insult people with Down syndrome, so maybe calling this project the Spanish equivalent of "Magolia", "Mamalian", or "Meercat" is a clever reversal of the insult into a form of self-deprecation on the part of the author, who is wittily feigning illiteracy? Or perhaps it is intended to ridicule the speling of Spainards and other speekers of Spansh? Or programmers who decided to yoke their applications to fake open source?

Even if correctly spelled, perhaps the name would be more appropriate to a debugging tool than to a hash table implementation.

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#76
post #75

"Mongita" is a misspelling according to the DLE; the standard spelling is "monjita". Literally, the word means "little nun", but is the common name for flycatchers of the genus Xolmis . https://dle.rae.es/?formList=form&w=monjita# https://es.wikipedia.org/wiki/Xolmis_rubetra Unfortunately every time I see the misspelling in this thread I involuntarily cringe. I suppose "MongoDB" is named after a slur used to insult p…

FYI the name MongoDB comes from "humongous". Thanks for the wiki links, though.

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#77
post #75

"Mongita" is a misspelling according to the DLE; the standard spelling is "monjita". Literally, the word means "little nun", but is the common name for flycatchers of the genus Xolmis . https://dle.rae.es/?formList=form&w=monjita# https://es.wikipedia.org/wiki/Xolmis_rubetra Unfortunately every time I see the misspelling in this thread I involuntarily cringe. I suppose "MongoDB" is named after a slur used to insult p…

To be fair, one suggested etymology I've seen for for 'mongo' is a simplification of 'humongous'.

Whether you believe this claim or not, it's entirely down to whether you want to take a charitable or negative guess at the original intention.

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#78

Earlier quoted context omitted.

The project isn't about performance, it's about providing an embedded version of MongoDB - it clearly states that if you grow too large, then you can easily migrate to the full MongoDB. It also clearly states not to use it if you want a relational database.

Author here. That's exactly it. I think it would be very difficult to completely beat SQLite with a Python library. My goal wasn't to beat it but to have performance that's within an order of magnitude which I think I've achieved. In my opinion, the MongoDB interface has a lot of advantages over SQL that make sense in a lot of use cases. Certainly, there are times when a traditional relational database is the right c…

Have you considered using SQLite (and probably JSON1) as the backend and just making an API that amps from the Mongo API to SQLite?

It seems like this would probably have better read performance and the battle-tested reliability that we love from SQLite.

Re: Show HN: Mongita is to MongoDB as SQLite is to SQL

#79

SQL is a language and specification. How can I trust something that makes a comparison that's not right, or a product that compares itself to mongodb

SQL is a query language, MongoDB has a query language. I think that the tagline is reasonable and is made more precise in the first sentence of the README.

> Mongita is a lightweight embedded document database that implements a commonly-used subset of the MongoDB/PyMongo interface.

Post reply on HN