From: Jennifer C. <jen...@at...> - 2010-02-09 19:08:09
|
Chris, Sounds good. Please let us know how you make out. It would be great to better understand SDB's named graph implementation. The ability to store NG4J named graphs in SDB could be a valuable addition to the project, regardless of its performance. NG4J's database storage is not as efficient as it could be. One performance improvement that I'd like to see is using java.sql.PreparedStatement instead of java.sql.Statement. Additional optimization could be done as well. Jennifer _____ From: Chris Shellenbarger [mailto:chr...@is...] Sent: Tuesday, February 09, 2010 1:24 PM To: Jennifer Cormier Subject: RE: [namedgraphs] Using NG4J With SDB Thank you very much for your prompt reply - I'll look into the concerns you have mentioned and see how the performance differs with each approach. Thanks again, Chris From: Jennifer Cormier [mailto:jen...@at...] Sent: Tuesday, February 09, 2010 11:12 AM To: Chris Shellenbarger; ng4...@li... Subject: RE: [namedgraphs] Using NG4J With SDB Hi Chris, I agree, it would be wonderful the SDB and NG4J named graphs were compatible. Unfortunately, although NG4J does use Jena, the way that it implements "named graphs" is quite different than that of SDB. My understanding is that SDB supports naming a graph that contains triples. So each graph is a separate triple store. NG4J uses a quad store. Its "statements" are quads. The first item in each statement is the name of the graph. When I looked at SDB's support of named graphs the other year, I had the impression that each graph had to be "manually" named and loaded in from a config file. If that's the case, then in order for NG4J to work with SDB (if that's possible) it seems to me that we need an additional "pipe" or processor/transform tool that would handle the missing steps and automate everything. It would need to create a separate (SDB) graph for each NG4J named graph and give the SDB graph the name corresponding to the NG4J one. Doing so might remove much of SDB's performance gain. Another thing to consider is that with NG4J, it is not necessary to "know" the name of each graph. All the graphs are stored together (e.g. in the same database) as quads. You can easily query (using SPARQL) across all the graphs. This is possible without loading the graphs into memory. The SPARQL query is converted to a SQL database query. I don't know much about SDB, but I suspect that in order to query across all graphs it would be necessary to first load them all into memory, or put them together in a single, larger graph. Once that is done, how then does one determine to which named graph a statement belongs? I don't have the answers. That's my understanding of the situation. Clarifications welcome. Jennifer _____ From: Chris Shellenbarger [mailto:chr...@is...] Sent: Tuesday, February 09, 2010 12:13 PM To: ng4...@li... Subject: [namedgraphs] Using NG4J With SDB Hello, I am really interested in using NG4J in a project I am working on. However, the only thing holding me back is that I'd like to back the NG4J usage with the Jena SDB datastore. I noticed that NG4J has its own Database storage implementation but I was wondering if anyone has been able to successfully plugin SDB in use with NG4J? Since they both work with the Jena configuration and support named graphs it seems that there should be a way to work with both - I'm having trouble getting it to work however. If anyone could help, I'd greatly appreciate it. Thanks, Chris |