What database should I use to store records and how to use it?

I am developing an application that will store a large number of records. These entries will be such as (URL, date, name, source, {additional data ...})

Since this is a client application, I do not want to use a database server, I just want the information to be stored in files.

I want the files to be readable from different languages ​​(at least in python and C ++), so some kind of language specific like python pickle has left the game.

I see two possibilities: sqlite and BerkeleyDB. Since my use case is clearly not relational, I am tempted to go with BerkeleyDB, however, I don’t know how to use it to store my records, since it only stores key / value pairs.

Am I reasoning correctly? If so, how should I use BDB to store my records? Can you connect me with relevant information? Or am I missing a better solution?

+5
source share
6 answers

I see two possibilities: sqlite and BerkeleyDB. Since my use case is clearly not relational, I am tempted to go with BerkeleyDB, however I do not really know how I should use it to store my records, since it only stores key / value pairs.

What you are describing is exactly what relational relationships are, even if you only need one table. SQLite is likely to make this very easy.

EDIT: . . , , (, ) , , x*y = z. (x0,y0,z0) , , .

. -, , . , , , 3-, . , , .

, , , . , , (), ( ), . , , . , , .

. , . , memcached, couchdb, hadoop , . , -, , , , , .


, , , ( )

SELECT t1.actor1 
FROM workswith AS t1, 
     workswith AS t2, 
     workswith AS t3, 
     workswith AS t4, 
     workswith AS t5,
     workswith AS t6
WHERE t1.actor2 = t2.actor1 AND
      t2.actor2 = t3.actor1 AND
      t3.actor2 = t4.actor1 AND
      t4.actor2 = t5.actor1 AND
      t5.actor2 = t6.actor1 AND
      t6.actor2 = "Kevin Bacon";

, , : workswith 6

+5

BerkeleyDB , * DBM (, GDBM). : ? URL-, URL- , ?

, , & c.

"" - .

/, , KEY . , , , "", , , "" , . /.

+2

sqlite . ( ). , - , .

, Python Berkely DB, , ; (, URL-); Python 3.

+2

MongoDB? , .

+1

, . ( ) , ( JSON ) . Berkeley DB, , , : http://en.wikipedia.org/wiki/Dbm

, SQLite . SQL, . .

SQL , , . , "" . ( , .) Google App Engine - . , , . googling "nosql". http://www.google.com/search?&q=nosql

+1

, , ..? , , .. , . , , - . , , , , .. , db. SQLite , BDB, , Sybase Advantage ( , ) VistaDB firebird... //. XML "" , ..!

0
source

All Articles