Is there a lightweight, embeddable, key/value data

2019-03-09 11:49发布

I was wondering if there was a lightweight, embeddable, key/value database out there.

Something like a lightweight Couchdb (RESTful, key/value, etc) where you just send it the key and it responds with appropriate values.

Thanks!

6条回答
做自己的国王
2楼-- · 2019-03-09 12:09

Would TinyCDB be suitable?

http://www.corpit.ru/mjt/tinycdb.html

Introduction

TinyCDB is a very fast and simple package for creating and reading constant data bases, a data structure introduced by Dan J. Bernstein in his cdb package. It may be used to speed up searches in a sequence of (key,value) pairs with very big number of records. Example usage is indexing a big list of users - where a search will require linear reading of a large /etc/passwd file, and for many other tasks. It's usage/API is similar to ones found in BerkeleyDB, gdbm and traditional *nix dbm/ndbm libraries, and is compatible in great extent to cdb-0.75 package by Dan Bernstein.

CDB is a constant database, that is, it cannot be updated at a runtime, only rebuilt. Rebuilding is atomic operation and is very fast - much faster than of many other similar packages. Once created, CDB may be queried, and a query takes very little time to complete.

查看更多
Animai°情兽
3楼-- · 2019-03-09 12:15

On the Related Projects page of the CouchDB wiki, under "Alternatives" they mention some similar projects:

  • Feather DB* CouchDB clone in java.
  • StrokeDB* A CouchDB-like database written in Ruby to make embedding into Ruby apps easier.
  • mongoDB A high-performance, open source, schema-free document-oriented database.

And of course Tokyo Cabinet which has already been mentioned.

There's also neo4j which is a "graph database" for java.

Of course, part of the power of CouchDB and some of the others is not just being able to store key/value pairs, but the high capacity, replication, and in particular views, which are basically the way of running queries over your documents.

If you just needed a simple key/value datastore that you can embed into your program, that doesn't have to hold gigs of data, the venerable GDBM might suit your needs.

A little hard to answer without knowing a bit more about your needs (programming language, concurrency requirements, data volumes and such).

* Web site does not appear to be working at the time of this writing.

查看更多
Explosion°爆炸
4楼-- · 2019-03-09 12:19

For what platform? Tokyo Cabinet is a lightweight, embeddable, associative database engine for a variety of scripting environments (Java, Ruby, Perl, Lua, et al.)

查看更多
趁早两清
5楼-- · 2019-03-09 12:28

Check out Perst -- it's licensed GPLv2 and/or proprietary depending on your needs. I've never used it but I hear that it's good. It's an application-embedded key-value store database under active development with ports to a number of popular frameworks and languages.

查看更多
太酷不给撩
6楼-- · 2019-03-09 12:31

The OS filesystem is a lightweight key/value database. Keys are filenames and values are data in the files.

The word "embeddable" has an odd meaning if it's to be RESTful, so I don't really understand your requirements; but if all you need is storage and retrieval, why not use the FS?

查看更多
戒情不戒烟
7楼-- · 2019-03-09 12:33

Simple, embeddable key/value database ? That's pretty much BDB

查看更多
登录 后发表回答