1

SQLite is nice for small, standalone projects, since the data file is a single object that lives with the project. Most of the NoSQL solutions I've seen are servers that store data there. Is there a NoSQL solution that keeps the data in a single file like SQLite?

  • I dont think there is a true flatfile nosql solution out there. Mongodb claims to be able to run for small installations requiring minimal config and it does do that. However there is no way around running a daemon. I suppose it is the way nosql systems are designed that they must manage processes. Other than that you are basically looking at flat files or sql embedded databases. – Abhishek Dujari Jul 10 '12 at 08:13
  • 1
    Here's this question on SO: http://stackoverflow.com/questions/2403174/is-there-any-nosql-database-as-simple-as-sqlite – pjz Jul 20 '15 at 18:22

3 Answers3

1

If you really have a hard-on for keeping everything in a single file (well, almost), BerkeleyDB is what you want. However, I'd probably just use the original key-value store: your filesystem.

womble
  • 96,255
  • 29
  • 175
  • 230
1

There's GDBM:

The basic use of GDBM is to store key/data pairs in a data file. Each key must be unique and each key is paired with only one data item.

The library provides primitives for storing key/data pairs, searching and retrieving the data by its key and deleting a key along with its data. It also support sequential iteration over all key/data pairs in a database.

mgorven
  • 30,615
  • 7
  • 79
  • 122
0

yep its called CSV

http://en.wikipedia.org/wiki/Comma-separated_values

example http://code.activestate.com/recipes/577419-query-csv-file/

Abhishek Dujari
  • 567
  • 2
  • 5
  • 17
  • Cute idea, but the CSV file format has no optimization (B-Tree or whatnot) for dealing with very large data sets as most databases do. The linked implementation reads the entire database into memory for every query run. – MidnightLightning Jul 09 '12 at 21:30
  • 2
    neither does nosql. nosql usually does not implement btree but most commly hash indexes or range indexes. It is true that it will read entire thing to memory with CSV but since you wanted an embedded one I assumed it is not going to be a huge DB and reading from memory might infact be better. You can however use MS Access for flat file querying using ADODB or similar adapters for your language. – Abhishek Dujari Jul 10 '12 at 08:07