views:

1502

answers:

4

I want to create desktop application in c# for that i want to use embedded database like (sqlite,berkeley db), so how can i start benchmarking for these databases ?

A: 

Here a link with some information: http://www.perlmonks.org/?node_id=152749

Philippe GOETZ
That study is 7 years old and a very poor benchmark to boot. It's only good as an example of how not to do a benchmark.
Lucky
+2  A: 

Before thinking about benchmarking, you need to compare the features of the databases.

SQLite and BDB are completely different in the features they support, and if the data is complicated, I'd suggest SQLite for easier querying of relational data (if that's how your data is laid out)

Osama ALASSIRY
+1  A: 

I agree with Osama that you should compare the features your after first.

However, I disagree that "complicated" data should automatically drive you toward sqlite. While I haven't seen any benchmarks (nor have cared to write any), I have a gut reaction (whatever that's worth) that says BerkeleyDB is going to outperform nearly every time.

That said. I don't think that's what I'd use to make my own decision. It goes back to those features. If all I want is a simple data store, then I'd probably choose sqlite because its going to be easier. Likewise, if I want to be able to arbitrarily query my data on any field, or possibly one day store it in an "enterprise" SQL database, I'd likely go with sqlite because future migration will be easier. If, however, I intend to move beyond a simple data store, and am eyeing transactional safety, high concurrency, high availability, having many readers and writers, etc and I have a set of fairly well-defined "queries", then I probably want BDB.

Notice that "complexity" of my data doesn't really enter into these equations. The reason is simple. BDB can hold my object in it's native serialized format. Sql of any flavor comes with the famous impedence mismatch which, IMO, complicates my application.

If you are seriously considering BDB, I need to warn you that you should decide the type of storage your going to use up front as the different types of stores that BDB offers are not necessarily compatible.

Shaun
+2  A: 

Recently, Oracle added the sqlite3 interface on top of BDB's btree storage, so you should be able to write your code against sqlite3 and then plug in BDB. The catch is licensing. BDB forces you to either pay or go open source; sqlite let's you do whatever you want.

broc
http://www.oracle.com/technology/products/berkeley-db/sql.html
Mauricio Scheffer