Demetrius Nunes | 7 May 2009 21:15
Picon
Gravatar

CouchDB x RDF databases comparison

Hi there,

We are evaluating new technologies for managing semi-structured data and
documents in one of our applications. We've got tired of wrestling
relational databases for this.

I would like to know why would I prefer to use CouchDB instead of a RDF
database, such as Sesame ou Mulgara.

I know some of the RDF advantages, such as open standards, interoperability,
rules engines, semantic queries, community and tool support, maturity, etc.

But I really like the simplicity of the CouchDB model.

Can anyone enlighten me?

Thanks a lot,
Demetrius

--

-- 
____________________________
http://www.demetriusnunes.com
Benoit Chesneau | 11 May 2009 14:24
Picon
Gravatar

Re: CouchDB x RDF databases comparison

2009/5/7 Demetrius Nunes <demetriusnunes@...>:
> Hi there,
>
> We are evaluating new technologies for managing semi-structured data and
> documents in one of our applications. We've got tired of wrestling
> relational databases for this.
>
> I would like to know why would I prefer to use CouchDB instead of a RDF
> database, such as Sesame ou Mulgara.
>
> I know some of the RDF advantages, such as open standards, interoperability,
> rules engines, semantic queries, community and tool support, maturity, etc.
>
> But I really like the simplicity of the CouchDB model.
>
> Can anyone enlighten me?
>
> Thanks a lot,
> Demetrius
>
> --
> ____________________________
> http://www.demetriusnunes.com
>

There is a draft for rdf-json here :
http://n2.talis.com/wiki/RDF_JSON_Specification

So it may be possible to store rdf as json and then using _show &
_list to format the output you need.
(Continue reading)

Parnell Springmeyer | 11 May 2009 20:29
Picon
Gravatar

Re: CouchDB x RDF databases comparison

Yeah, I know about the JSON serialization of RDF - it has drawbacks though,
cardinality can't properly be expressed, as well as many other RDF features.
The primary structure of RDF can be captured by JSON though.

My key interest is serializing XML serialized RDF into the JSON objects and
using the proper libs to parse that into triples - N3 also wouldn't be bad,
however, N3 was designed more for humans, and since JSON doesn't like
carriage returns in it's data, that makes XML the more logical choice...

As for a SPARQL endpoint, I believe there could be a few useful hack-arounds
devised (such as this RDF hack-around), but, nothing will supplant a
properly built Erlang backed, distributed SPARQL endpoint/triple store. Only
problem there is Erlang's lacking XML libraries which makes building an RDF
parser that much more difficult.

I've been looking into using Redland and Erlang's C bridge to accomplish the
parsing task... I dunno, I'm still researching it - but all this research is
in my free time (which is stretched as it is) so it is slow moving.

Keep me updated as to what you come up with, last night I made some headway
with serializing XML into JSON objects within CouchDB and will begin doing
more comprehensive (ie: bloggable) experiments with rdfparse.js and the
eulersharp reasoner - may see what I can do with Python.

Another interesting thought would be to embed the Python interpreter in
CouchDB and use it as the primary view server - I like JSON as the storage
medium because it is simple and light weight and I like Python's strength as
a general purpose programming language with many mature libraries (including
RDF, hint hint).
(Continue reading)

Parnell Springmeyer | 11 May 2009 20:28
Picon
Gravatar

Re: CouchDB x RDF databases comparison

Yeah, I know about the JSON serialization of RDF - it has drawbacks though,
cardinality can't properly be expressed, as well as many other RDF features.
The primary structure of RDF can be captured by JSON though.

My key interest is serializing XML serialized RDF into the JSON objects and
using the proper libs to parse that into triples - N3 also wouldn't be bad,
however, N3 was designed more for humans, and since JSON doesn't like
carriage returns in it's data, that makes XML the more logical choice...

As for a SPARQL endpoint, I believe there could be a few useful hack-arounds
devised (such as this RDF hack-around), but, nothing will supplant a
properly built Erlang backed, distributed SPARQL endpoint/triple store. Only
problem there is Erlang's lacking XML libraries which makes building an RDF
parser that much more difficult.

I've been looking into using Redland and Erlang's C bridge to accomplish the
parsing task... I dunno, I'm still researching it - but all this research is
in my free time (which is stretched as it is) so it is slow moving.

Keep me updated as to what you come up with, last night I made some headway
with serializing XML into JSON objects within CouchDB and will begin doing
more comprehensive (ie: bloggable) experiments with rdfparse.js and the
eulersharp reasoner - may see what I can do with Python.

Another interesting thought would be to embed the Python interpreter in
CouchDB and use it as the primary view server - I like JSON as the storage
medium because it is simple and light weight and I like Python's strength as
a general purpose programming language with many mature libraries (including
RDF, hint hint).
(Continue reading)

Dean Landolt | 12 May 2009 01:07
Gravatar

Re: CouchDB x RDF databases comparison

> Another interesting thought would be to embed the Python interpreter in
> CouchDB and use it as the primary view server - I like JSON as the storage
> medium because it is simple and light weight and I like Python's strength
> as
> a general purpose programming language with many mature libraries
> (including
> RDF, hint hint).
>

Couch just shells out to spidermonkey...it's no different than shelling out
to python (or anything else -- hence all the alternative view servers).
Couch was designed with this in mind -- hit the wiki for ideas. You can do
pretty much anything you can dream up with externals -- the only drawback is
they're not portable (for those rare few without python in their path, at
least)...

I'll grant you javascript isn't as general purpose as it could be, but don't
write it off yet -- keep an eye on the serverjs project and see what shakes
out.
Michael Willson | 11 May 2009 17:29

thanks - EOM / Re: CouchDB x RDF databases comparison


-- 
Michael Willson
www.xquad.com
011 52 33 3044 6747
mwillson@...

CLL Independencia 445
Int. 9
Col: Arcos de Guadalupe
Zapopan, Jalisco
45037

You do NOT have my permission to send me solicitations or to sell my
contact information. Any information released is strictly to you, and is
confidential, and shall not be released to a third party without my
permission. Any communication directly conveyed to me to solicit or is
spam in nature is strictly prohibited. I will pursue all means, including
legal action and seek damages, to prevent solicitation and receiving spam..
Thank you.

> 2009/5/7 Demetrius Nunes <demetriusnunes@...>:
>> Hi there,
>>
>> We are evaluating new technologies for managing semi-structured data and
>> documents in one of our applications. We've got tired of wrestling
>> relational databases for this.
>>
>> I would like to know why would I prefer to use CouchDB instead of a RDF
>> database, such as Sesame ou Mulgara.
(Continue reading)

Michael Willson | 11 May 2009 17:28

thanks - EOM / Re: CouchDB x RDF databases comparison


-- 
Michael Willson
www.xquad.com
011 52 33 3044 6747
mwillson@...

CLL Independencia 445
Int. 9
Col: Arcos de Guadalupe
Zapopan, Jalisco
45037

You do NOT have my permission to send me solicitations or to sell my
contact information. Any information released is strictly to you, and is
confidential, and shall not be released to a third party without my
permission. Any communication directly conveyed to me to solicit or is
spam in nature is strictly prohibited. I will pursue all means, including
legal action and seek damages, to prevent solicitation and receiving spam..
Thank you.

> 2009/5/7 Demetrius Nunes <demetriusnunes@...>:
>> Hi there,
>>
>> We are evaluating new technologies for managing semi-structured data and
>> documents in one of our applications. We've got tired of wrestling
>> relational databases for this.
>>
>> I would like to know why would I prefer to use CouchDB instead of a RDF
>> database, such as Sesame ou Mulgara.
(Continue reading)

Nitin Borwankar | 7 May 2009 22:04

Re: CouchDB x RDF databases comparison

Demetrius Nunes wrote:
> Hi there,
>
> We are evaluating new technologies for managing semi-structured data and
> documents in one of our applications. We've got tired of wrestling
> relational databases for this.
>
> I would like to know why would I prefer to use CouchDB instead of a RDF
> database, such as Sesame ou Mulgara.
>
> I know some of the RDF advantages, such as open standards, interoperability,
> rules engines, semantic queries, community and tool support, maturity, etc.
>
> But I really like the simplicity of the CouchDB model.
>
> Can anyone enlighten me?
>
> Thanks a lot,
> Demetrius
>
>   
Hi Demetrius,

We ( bibkn.org) have investigated and used SQL databases, RDF store 
(Virtuoso) and CouchDB for bibliographic metadata management.  I am the 
project manager and data architect for this project.
Relnl databases are a first choice often but have many limitations in 
management of loosely typed, messy, string based data sets.  So we are 
in agreement on not using that technology.

(Continue reading)

Demetrius Nunes | 7 May 2009 22:11
Picon
Gravatar

Re: CouchDB x RDF databases comparison

Hi Nitin,

Great answer. Thanks a lot. One more question...

I am in the Javaland here, so another viable option for my application is
using JCR, such as the Apache Jackrabbit implementation.

Did you happen to take a look at that as well? I think JCR has even more
similarities with CouchDB than RDF.

How would you compare JCR and CouchDB ?

Thanks a lot,
Demetrius

On Thu, May 7, 2009 at 5:04 PM, Nitin Borwankar <nitin@...> wrote:

> Demetrius Nunes wrote:
>
>> Hi there,
>>
>> We are evaluating new technologies for managing semi-structured data and
>> documents in one of our applications. We've got tired of wrestling
>> relational databases for this.
>>
>> I would like to know why would I prefer to use CouchDB instead of a RDF
>> database, such as Sesame ou Mulgara.
>>
>> I know some of the RDF advantages, such as open standards,
>> interoperability,
(Continue reading)

Nitin Borwankar | 7 May 2009 22:55

Re: CouchDB x RDF databases comparison

Demetrius Nunes wrote:
> Hi Nitin,
>
> Great answer. Thanks a lot. One more question...
>
> I am in the Javaland here, so another viable option for my application is
> using JCR, such as the Apache Jackrabbit implementation.
>   

Hi Demetrius,

I am a refugee from Javaland so am familiar with the power and 
limitations of Java.  Yes, I have looked at JCR and JackRabbit in a 
previous project.
These days I just recoil from the verbosity and conceptual layers you 
encounter when coding simple things in Java.  And then there's XML.....
So I would have held my nose and used JackRabbit if CouchDB didn't exist 
- but in my mind it's a distant second in practice even if it is 
conceptually similar and close in theory.

Personally when I see layer upon layer of abstraction in Java 
architecture diagrams I wonder how much of my CPU cost is going in 
converting from strings, to TypeA to LayeredClassB to factoryC to ORM D 
to EJB4 to disk and back again all the way to strings.  So I am moving 
away from Java except when the best of breed solution is in Java ( 
Lucene/Solr) - so I don't hate Java - I just need to justify the 
overhead that it brings both in coding and in the build/install/deploy 
process.

CouchDB has minimal overhead in roundtrip datatype translations - it's 
(Continue reading)

Daniel Friesen | 8 May 2009 09:09
Favicon

Re: CouchDB x RDF databases comparison

There's also XML Databases (XQuery) (I'll just use X for simplicity) to 
compare. I ended up starting to use Sedna over at my work.

CouchDB uses JSON, X use XML
CouchDB uses views, X uses XQuery which has some simple indexing and has 
a significantly powerful and understandable query language
CouchDB has a lucene plugin, Sedna can have an extra fulltext index 
feature enabled.
Updating data in CouchDB requires an entire document be updated, X 
databases can modify small parts of the document
CouchDB saves a new document each change, X works on a current document.
CouchDB handles conflicts using conflict resolution, X makes the 
modification query on the current document in order of queries 
(transactions are also supported).
CouchDB uses a HTTP REST API, most X databases use a normal binary 
protocol (Sedna seams to have a good set of libraries for most languages)
CouchDB is distributed and scalable.
In X databases documents can be grouped into collections. (These can 
also be used in queries)
It's probably a moot point, but XQuery is w3c standardized and 
implemented by a number of databases.

IMHO compiling a comparison of alternative databases and seeing what 
features work best for what data you're working with is the best option.

I went through the semantic databases myself to cause our company had 
"Semantics" in mind. I had issues getting them to work and finding help 
for most of them myself and ended up finding that our data better fit 
the document based database type. For us TQL was the only actual one 
with a significant improvement (we really needed the walk capabilities) 
(Continue reading)

Parnell Springmeyer | 8 May 2009 17:03
Picon
Gravatar

Re: CouchDB x RDF databases comparison

Just so you are aware, there are RDF and SPARQL libraries out there for 
Javascript. Which can be used in the JS views in CouchDB when performing 
map reduce operations on the data - quite powerful IMHO.

Barry Wark | 8 May 2009 19:48
Picon
Gravatar

Re: CouchDB x RDF databases comparison

On Fri, May 8, 2009 at 8:03 AM, Parnell Springmeyer
<ixmatus@...> wrote:
> Just so you are aware, there are RDF and SPARQL libraries out there for
> Javascript. Which can be used in the JS views in CouchDB when performing map
> reduce operations on the data - quite powerful IMHO.
>

Could you say a little more about how this might work? Would you have
parallel CouchDB and RDF stores or are you suggesting that it would be
possible to use SPARQL to query from CouchDB?

Parnell Springmeyer | 8 May 2009 20:20
Picon
Gravatar

Re: CouchDB x RDF databases comparison

I haven't personally used SPARQL in any prototypes or implementations, just
the RDFParse lib - I would RDF in CouchDB documents and parse it within
map-reduce views to return usable triples. It all depends on what you are
trying to do too - although, that seemed like the most exciting use of
CouchDB + RDF for me.

These ideas are very new too - I haven't matured them at all or used them
within a production environment, so, more than anything they are ideas and
theories.

On Fri, May 8, 2009 at 10:48 AM, Barry Wark <barrywark@...> wrote:

> On Fri, May 8, 2009 at 8:03 AM, Parnell Springmeyer <ixmatus@...>
> wrote:
> > Just so you are aware, there are RDF and SPARQL libraries out there for
> > Javascript. Which can be used in the JS views in CouchDB when performing
> map
> > reduce operations on the data - quite powerful IMHO.
> >
>
> Could you say a little more about how this might work? Would you have
> parallel CouchDB and RDF stores or are you suggesting that it would be
> possible to use SPARQL to query from CouchDB?
>
Barry Wark | 8 May 2009 21:24
Picon
Gravatar

Re: CouchDB x RDF databases comparison

Thanks for sharing your in-progress thoughts. I've got a lot to chew on.

Cheers,
Barry

On Fri, May 8, 2009 at 11:20 AM, Parnell Springmeyer
<ixmatus@...> wrote:
> I haven't personally used SPARQL in any prototypes or implementations, just
> the RDFParse lib - I would RDF in CouchDB documents and parse it within
> map-reduce views to return usable triples. It all depends on what you are
> trying to do too - although, that seemed like the most exciting use of
> CouchDB + RDF for me.
>
> These ideas are very new too - I haven't matured them at all or used them
> within a production environment, so, more than anything they are ideas and
> theories.
>
> On Fri, May 8, 2009 at 10:48 AM, Barry Wark <barrywark@...> wrote:
>
>> On Fri, May 8, 2009 at 8:03 AM, Parnell Springmeyer <ixmatus@...>
>> wrote:
>> > Just so you are aware, there are RDF and SPARQL libraries out there for
>> > Javascript. Which can be used in the JS views in CouchDB when performing
>> map
>> > reduce operations on the data - quite powerful IMHO.
>> >
>>
>> Could you say a little more about how this might work? Would you have
>> parallel CouchDB and RDF stores or are you suggesting that it would be
>> possible to use SPARQL to query from CouchDB?
(Continue reading)

Dustin Whitney | 8 May 2009 17:32
Picon

Re: CouchDB x RDF databases comparison

Any examples you can share?

On Fri, May 8, 2009 at 11:03 AM, Parnell Springmeyer <ixmatus@...>wrote:

> Just so you are aware, there are RDF and SPARQL libraries out there for
> Javascript. Which can be used in the JS views in CouchDB when performing map
> reduce operations on the data - quite powerful IMHO.
>
Parnell Springmeyer | 8 May 2009 19:50
Picon
Gravatar

Re: CouchDB x RDF databases comparison

I would love to, ATM I am at work where I don't have access to any of my
experiments. When I get a chance, I will try to send you something.

In the meantime, here is what I use for RDF parsing in Javascript:
http://dig.csail.mit.edu/2005/ajar/release/tabulator/0.7/doc/api/overview-summary-rdfparser.js.html

It is small, implements the entire RDF spec and is well written.

On Fri, May 8, 2009 at 8:32 AM, Dustin Whitney <dustin.whitney@...>wrote:

> Any examples you can share?
>
> On Fri, May 8, 2009 at 11:03 AM, Parnell Springmeyer <ixmatus@...
> >wrote:
>
> > Just so you are aware, there are RDF and SPARQL libraries out there for
> > Javascript. Which can be used in the JS views in CouchDB when performing
> map
> > reduce operations on the data - quite powerful IMHO.
> >
>
Robert Koberg | 8 May 2009 19:55

Re: CouchDB x RDF databases comparison

Now just write an XPath 2.0 processor that will be plugged into your  
implementation of XSL 2.0 and XQuery 1.0 processors

:-D

On May 8, 2009, at 1:50 PM, Parnell Springmeyer wrote:

> I would love to, ATM I am at work where I don't have access to any  
> of my
> experiments. When I get a chance, I will try to send you something.
>
> In the meantime, here is what I use for RDF parsing in Javascript:
> http://dig.csail.mit.edu/2005/ajar/release/tabulator/0.7/doc/api/overview-summary-rdfparser.js.html
>
> It is small, implements the entire RDF spec and is well written.
>
> On Fri, May 8, 2009 at 8:32 AM, Dustin Whitney
<dustin.whitney@... 
> >wrote:
>
>> Any examples you can share?
>>
>> On Fri, May 8, 2009 at 11:03 AM, Parnell Springmeyer <ixmatus@...
>>> wrote:
>>
>>> Just so you are aware, there are RDF and SPARQL libraries out  
>>> there for
>>> Javascript. Which can be used in the JS views in CouchDB when  
>>> performing
>> map
(Continue reading)

Demetrius Nunes | 8 May 2009 15:52
Picon
Gravatar

Re: CouchDB x RDF databases comparison

Thanks for all the thoughtful responses. They really helped.

On Fri, May 8, 2009 at 4:09 AM, Daniel Friesen <lists@...>wrote:

> There's also XML Databases (XQuery) (I'll just use X for simplicity) to
> compare. I ended up starting to use Sedna over at my work.
>
> CouchDB uses JSON, X use XML
> CouchDB uses views, X uses XQuery which has some simple indexing and has a
> significantly powerful and understandable query language
> CouchDB has a lucene plugin, Sedna can have an extra fulltext index feature
> enabled.
> Updating data in CouchDB requires an entire document be updated, X
> databases can modify small parts of the document
> CouchDB saves a new document each change, X works on a current document.
> CouchDB handles conflicts using conflict resolution, X makes the
> modification query on the current document in order of queries (transactions
> are also supported).
> CouchDB uses a HTTP REST API, most X databases use a normal binary protocol
> (Sedna seams to have a good set of libraries for most languages)
> CouchDB is distributed and scalable.
> In X databases documents can be grouped into collections. (These can also
> be used in queries)
> It's probably a moot point, but XQuery is w3c standardized and implemented
> by a number of databases.
>
> IMHO compiling a comparison of alternative databases and seeing what
> features work best for what data you're working with is the best option.
>
> I went through the semantic databases myself to cause our company had
(Continue reading)

Parnell Springmeyer | 7 May 2009 23:15
Picon
Gravatar

Re: CouchDB x RDF databases comparison

 <at> Jan: cheers m8!
Parnell Springmeyer | 7 May 2009 21:40
Picon
Gravatar

Re: CouchDB x RDF databases comparison

You can store RDF documents or, even simpler, triples in CouchDB documents.
Query for the data and perform your RDF parsing/manipulation in-application.

Sure, it isn't as sweet as a triple store with a SPARQL endpoint - but, it's
hella better than using Sesame or any of those other Java implementations.
They can't scale - whereas CouchDB can; you can also scale your application
to handle the RDF processing it does in the application logic; as you have
more control over that.

I am also in the process (have been for a while) of building an Erlang
backed triplestore. Not a light undertaking by anymeans and I may be using
CouchDB to build that ontop of it (license permitting).

CouchDB + RDF = FTW

On Fri, May 8, 2009 at 2:15 AM, Demetrius Nunes <demetriusnunes@...>wrote:

> Hi there,
>
> We are evaluating new technologies for managing semi-structured data and
> documents in one of our applications. We've got tired of wrestling
> relational databases for this.
>
> I would like to know why would I prefer to use CouchDB instead of a RDF
> database, such as Sesame ou Mulgara.
>
> I know some of the RDF advantages, such as open standards,
> interoperability,
> rules engines, semantic queries, community and tool support, maturity, etc.
>
(Continue reading)

Jan Lehnardt | 7 May 2009 22:12
Picon
Favicon
Gravatar

Re: CouchDB x RDF databases comparison


On 7 May 2009, at 21:40, Parnell Springmeyer wrote:
>
> I am also in the process (have been for a while) of building an Erlang
> backed triplestore. Not a light undertaking by anymeans and I may be  
> using
> CouchDB to build that ontop of it (license permitting).

License* permits :)

* http://www.apache.org/licenses/LICENSE-2.0

Cheers
Jan
--

>
> CouchDB + RDF = FTW
>
> On Fri, May 8, 2009 at 2:15 AM, Demetrius Nunes
<demetriusnunes@... 
> >wrote:
>
>> Hi there,
>>
>> We are evaluating new technologies for managing semi-structured  
>> data and
>> documents in one of our applications. We've got tired of wrestling
>> relational databases for this.
>>
(Continue reading)


Gmane