-3

I'm looking for a database that allows me to store and retrive strings by an index. It should work just like a mutableArray but on disk. The database entries have a fixed length, the number of entries grows over time, up to about 100'000'000.

It doesnt matter if its sql, nosql or something else. The random read and writes should just be fast. I have had a look at levelDB and Kyoto but they store by key and not by array index.

Any hints are very much appreciated.

Thomas Bader
  • 48
  • 1
  • 5

3 Answers3

1

Welcome to the ancestors. What you are looking for is implemented in a performant, reliable and well-tested manner by the good old Berkeley-Database. http://en.wikipedia.org/wiki/Berkeley_DB. Its meanwhile somehow under the control of Oracle, but still opensource as far as I know.

pbhd
  • 4,384
  • 1
  • 20
  • 26
  • Thanks pbhd, thats exactly what I was looking for: http://www.stanford.edu/class/cs276a/projects/docs/berkeleydb/ref/am_conf/renumber.html – Thomas Bader Nov 15 '12 at 22:17
0

You might want to look at SQLite (http://www.sqlite.org/)?

John
  • 727
  • 5
  • 15
  • Can you explain why? This answer isn't very helpful as it stands. – Michael Myers Feb 22 '13 at 15:54
  • Only from the standpoint that my experience with it (SQLite) seems to match the OP's requirements. I've no doubt there are better solutions available. – John Feb 22 '13 at 15:59
0

You want a relational database that supports indexing (most all RDBMs support indexing).
It will generate an "index" table that helps the DB access your data most efficiently based on fields you designate.

Since you added the tag c++, I'm assuming you want one that can interface with a C++ program. Many of them do.

Search the web for "relational database c++ (driver OR interface)".

Edit 1: A partial list of databases (in no order)

Thomas Matthews
  • 56,849
  • 17
  • 98
  • 154