couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: impedance mismatch, XML-native db, data model
Date Wed, 02 Jul 2008 10:57:10 GMT
Heya Paola,
On Jul 2, 2008, at 11:39, paola lorusso wrote:

> Hi,
> I am an Italian student, Paola Lorusso.
> I am very interested about Couchdb which is the main topic of my
> thesis and I would like you to give me some information focusing on  
> the
> issues i 'm going to consider;
> In my thesis, I am looking into the matter of Impedance mismatch
> occurring in web application development, especially when you use a
> relational database.
> From scientific papers I got information about the uncapability of
> object databases and XML-native databases to solve the problem I dealt
> above.
> Since I look into the main features of Couchdb I mean this database  
> can erase the problem.
> In fact, for example, it allows the query language to be the same of  
> programming language.
> Please, would you let me know if my statement is correct?

That is correct. You don't necessarily need to match the
programming- and query languages (using Python for
the application and JavaScript for your View definitions
works just fine and makes a lot of sense), but you can
do that, if you need to. The main point here is that you
don't need to deal with a relational database and SQL
when code in form of map- and reduce-functions in a
regular programming language do just fine.

> Plus, I read CouchDb is schema-free with a flat address space where  
> each document has an unique ID.
> So I would ask you, how can I specify that two documents are  
> associated each other?
> For example: If I consider a blog, there is a post which is  
> commented and it has several comments.
> How can I structure a comment document? Should this document have
> the ID of post document it comments, as similar to foreign key  in a
> relational model?  Is this correct?If I have an application with  
> documents tightly correlated, what kind of advantages can I have  
> using schema-free database?
> It means there is not a data model?

See for a  
discussion on
that exact topic.

One advantage is that you don't need redesign you schema and re-tune
your queries every time your application evolves.

> The last question  I am asking you is about the differences between
> Couchdb, defined also as document oriented database, and the XML  
> native
> database, also called document centric database.
> Do you think there is a linguistic and terminological difference
> between them? Do you think Couchdb is better than XML-native database?

I am not familiar with XML-native databases, so I can't claim either to
be better or worse. You can store XML within CouchDB and access the
data structures with native JavaScript using the E4X extension in
Spidermonkey. This exists today and is mighty cool if you want to store

for more on that.

Personally, I find JSON to be a better way to describe data structures
than XML which I prefer for annotating text. There is no wrong or right,
just the right tool for the job[tm]. And CouchDB is just another tool :)

> I know, I asked a lot of questions,however, I hope you can answer
> me. Now, my aim is to understand better these matters. In this way I
> should contribute to solve problems to whom are interested in this

Don't worry about asking too many questions. In fact if you have
any more questions, feel free to follow up on this. We'd love to
hear what you come up with.


View raw message