2

I am using two package 1) Berkeley db Java Edition using BASE API 2)Berkeley DB Java Edition Using DPL (Direct Persistence Layer)

if the performance is the issue then which is better way

Dhananjay Joshi
  • 704
  • 1
  • 7
  • 8
  • you should check out some of the more modern nosql solutions, like cassandra or mongodb. – Kevin Jun 29 '11 at 13:54
  • @duffymo: JDBC uses SQL and therefore it is much slower than databases that do not use/provide an SQL layer. – Robert Jun 29 '11 at 14:44
  • I assumed Berkeley was relational; bad assumption. – duffymo Jun 29 '11 at 14:47
  • 1
    Without any idea what you mean by "performance", it's very hard to answer this. Raw speed of read queries vs. updates? Do you care about single- or multi-threaded access? Do you care about memory consumption? I would suggest evaluating both to see which one best fits your application's needs. – Brian Kelly Jun 30 '11 at 03:30
  • @Kevin - care to share why Berkeley shouldn't be considered in favor of those newer DBs? – Brian Kelly Jun 30 '11 at 03:31

1 Answers1

0

DPL is basically the base API with BDBs built-in custom binding/serialization on top.

This means that performance will depend on where the data you store is coming from. If it is coming from Java objects and you want to use the base API, it's unlikely that you'll find a quicker serialization process than BDBs. (Although not impossible and you can always construct one for specific cases.)

If the data you want to store is already in a serialized format, or just not in the form of POJOs, you might be better off with the base API.

Either way, the official recommendation is that unless you have a very good reason not to use it, you sdhould use DPL. And generally speaking the perfomance of databases depends on the number of times disk access is needed and that isn't affected much by the API you use.

biziclop
  • 48,926
  • 12
  • 77
  • 104