Re: is there a lower-level (non-SQL) API for Derby?
Hi Brian, The last time the community discussed this, there was some concern that this effort would fall outside Derby's charter. One way forward might be to create an experimental branch in which to prototype a solution. If the prototype attracted enough interest, then we could take it to the Apache Incubator and attempt to create a new, related DB subproject. Here, for instance, is something which we could prototype in a branch: We could create a small wrapper API around Derby. The jar file containing this small wrapper would be what the related Apache project ultimately delivers and you would use it together with the existing Derby jars. I'm thinking that for operations like creating/dropping a container (i.e., a table) you might not see a performance gain but for simple gets and puts you could see the 15-20% improvement. Of the benefits listed at the end of this message, this solution would deliver benefit (3) and to a smaller extent benefit (2). It would not deliver benefit (1): the code footprint of this solution would actually be a little larger than native Derby and memory and disk usage would be pretty much the same. Would a solution like this be useful for you? Thanks, -Rick Brian Peterson wrote: Hi Rick, I've tried following up with this because I'd be interested in using this lighter version. From what I've been able to find, it looks like you started to set up the goals for such an effort. Is this effort still moving forward? My chief need would be speed -- factoring out the overhead of the JDBC/SQL interface. I see someone else noted that this has been measured at 15-20% for lookups on simple tables. I would definitely use the subsystem to get a 20% improvement when using an embedded database. Brian -Original Message- From: richard.hille...@sun.com [mailto:richard.hille...@sun.com] Sent: Monday, January 05, 2009 9:49 AM To: Derby Discussion Cc: derby-...@db.apache.org Subject: Re: is there a lower-level (non-SQL) API for Derby? Hi Tim, This question has come up before. For instance, you may find some interesting discussion on the following email thread: http://www.nabble.com/simpler-api-to-the-Derby-store-td18137499.html#a181374 99 The Derby storage layer is supposed to be an independent component. The api is described in the javadoc for the org.apache.derby.iapi.store.access package: http://db.apache.org/derby/javadoc/engine/ What would you say are your chief needs? Are you looking for a version of Derby which is 1) smaller 2) faster or 3) easier-to-use Hope this helps, -Rick Tim Dugan wrote: I'm looking to see if Derby can be used similarly to Berkeley DB -- a lower-level API. Can anyone tell me? Maybe to the access area of the Store Layer which in some Derby documentation is described like this: The Store layer is split into two main areas, access and raw. The access layer presents a conglomerate (table or index)/row based interface to the SQL layer. It handles table scans, index scans, index lookups, indexing, sorting, locking policies, transactions, isolation levels. Now that Derby is included in Java 16--I am having a really hard time finding Java documentation that talks about Derby.
RE: is there a lower-level (non-SQL) API for Derby?
Hi Rick, I've tried following up with this because I'd be interested in using this lighter version. From what I've been able to find, it looks like you started to set up the goals for such an effort. Is this effort still moving forward? My chief need would be speed -- factoring out the overhead of the JDBC/SQL interface. I see someone else noted that this has been measured at 15-20% for lookups on simple tables. I would definitely use the subsystem to get a 20% improvement when using an embedded database. Brian -Original Message- From: richard.hille...@sun.com [mailto:richard.hille...@sun.com] Sent: Monday, January 05, 2009 9:49 AM To: Derby Discussion Cc: derby-...@db.apache.org Subject: Re: is there a lower-level (non-SQL) API for Derby? Hi Tim, This question has come up before. For instance, you may find some interesting discussion on the following email thread: http://www.nabble.com/simpler-api-to-the-Derby-store-td18137499.html#a181374 99 The Derby storage layer is supposed to be an independent component. The api is described in the javadoc for the org.apache.derby.iapi.store.access package: http://db.apache.org/derby/javadoc/engine/ What would you say are your chief needs? Are you looking for a version of Derby which is 1) smaller 2) faster or 3) easier-to-use Hope this helps, -Rick Tim Dugan wrote: I'm looking to see if Derby can be used similarly to Berkeley DB -- a lower-level API. Can anyone tell me? Maybe to the access area of the Store Layer which in some Derby documentation is described like this: The Store layer is split into two main areas, access and raw. The access layer presents a conglomerate (table or index)/row based interface to the SQL layer. It handles table scans, index scans, index lookups, indexing, sorting, locking policies, transactions, isolation levels. Now that Derby is included in Java 16--I am having a really hard time finding Java documentation that talks about Derby.
Re: is there a lower-level (non-SQL) API for Derby?
Hi Tim, This question has come up before. For instance, you may find some interesting discussion on the following email thread: http://www.nabble.com/simpler-api-to-the-Derby-store-td18137499.html#a18137499 The Derby storage layer is supposed to be an independent component. The api is described in the javadoc for the org.apache.derby.iapi.store.access package: http://db.apache.org/derby/javadoc/engine/ What would you say are your chief needs? Are you looking for a version of Derby which is 1) smaller 2) faster or 3) easier-to-use Hope this helps, -Rick Tim Dugan wrote: I'm looking to see if Derby can be used similarly to Berkeley DB -- a lower-level API. Can anyone tell me? Maybe to the access area of the Store Layer which in some Derby documentation is described like this: The Store layer is split into two main areas, access and raw. The access layer presents a conglomerate (table or index)/row based interface to the SQL layer. It handles table scans, index scans, index lookups, indexing, sorting, locking policies, transactions, isolation levels. Now that Derby is included in Java 16--I am having a really hard time finding Java documentation that talks about Derby.
Re: is there a lower-level (non-SQL) API for Derby?
Tim Dugan tdu...@prospricing.com writes: I'm looking to see if Derby can be used similarly to Berkeley DB -- a lower-level API. Can anyone tell me? No, there is no public lower level API. Maybe to the access area of the Store Layer which in some Derby documentation is described like this: The Store layer is split into two main areas, access and raw. The access layer presents a conglomerate (table or index)/row based interface to the SQL layer. It handles table scans, index scans, index lookups, indexing, sorting, locking policies, transactions, isolation levels. Right, there are internal layers in the architecture, but they do not constitute public APIs at the present time. Note that when you use Derby embedded combined with prepared statements, the SQL overhead is typically low, we have measured in the order of 15-20% extra for read operations of small records with a simple primary key (we used the internal APIs to make a comparison), where data fit in the in-memory cache. But YMMV, of course. Now that Derby is included in Java 16--I am having a really hard time finding Java documentation that talks about Derby. The Java DB docs are essentially the Derby docs rebundled. You can find them here: http://developers.sun.com/javadb/reference/docs/index.jsp The Derby version is here: http://db.apache.org/derby/manuals/index.html#docs_10.4 Thanks, Dag