Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 84007 invoked from network); 22 Mar 2011 18:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Mar 2011 18:26:32 -0000 Received: (qmail 63467 invoked by uid 500); 22 Mar 2011 18:26:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 63434 invoked by uid 500); 22 Mar 2011 18:26:30 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Delivered-To: moderator for user@couchdb.apache.org Received: (qmail 20744 invoked by uid 99); 22 Mar 2011 15:28:48 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of basire@gmail.com designates 74.125.82.180 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=7NlHltV1obh92b5AfTzHL6SqNNgTSmRf8g7ElmIdoQU=; b=Z6/H3Qt4Ig5IbVVvhzSF9c4/KzoxQfsXqSXBDSJgpkfowzTW1fM9Vnihqi70psPGac 13AiyHXfrYORveT2eBiMy/wGY8yllltr2Xu8ODtbweGhGVTbEezyABNlVJUCdun7WraY qGu44yBaQfBSZJCTdLVXOkr4+an2tk4iePJM8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xtaPWjDUx2z5gI+gSDWLLrkTHXt5hryHjY00RYVMr2NL2jpEELWEa8Kd0Z0bca5CJe gVUOXQZTrplYYUo7aERgJLsxQ2wG2shu2RX369YTONgOzhKMKAcWLA2bam7wA4h80zMW sMS53RdhGKCrT3kDiymfLZtHig/cwPHtycXRQ= MIME-Version: 1.0 Date: Tue, 22 Mar 2011 11:28:19 -0400 Message-ID: Subject: Relationships Of Complex Documents In Document Databases From: Ryan Zec To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=001485f628ece0fca7049f13e43a X-Virus-Checked: Checked by ClamAV on apache.org --001485f628ece0fca7049f13e43a Content-Type: text/plain; charset=ISO-8859-1 I have been looking at a number of document databases (RavenDB, CouchDB, MongoDB) and there are two things about them that I really like and makes me what to incorporate them as much as possible and that is the schema-less natural (not that they are schema-less per-say but that it is a very flexible schema that is much easier to change than ones with RDBMS) and the fact there is a lot less impedance mismatch when mapping the database data to code. There have a been a number of things that I have found that have prevented me from using a document database because I find I need these things all the time. Some of them I have found solutions for like unique fields. While document databases don't directly support this feature, a work around that is acceptable is creating another document with the email is the document id and then inserting the user if the insert on the email document was successful however there are there is one big thing that I don't think document database can provide me from my searching. That feature is relationships with complex documents. One of my projects I wanted to use a document database for is a project management system. The issue with this is that there are a lot of places where I need relationships with large objects (and multiple relationships within one document). When it come to something like a task or a user, those are complex documents and having the document embedded would not be a good thing as data mismatch with these items can't happen. Now if I just reference the document then am I really getting any benefit from using a document database because now I am probably going to have a lot more queries that I need to run compared to a relational database. While I was hopping to have most of my data be stored into a document database, the more I look at it, it seems like most of the data needs to be in a RDBMS. Am I correct in assuming this type of relationship needs a RDBMS or am I un-aware of how this can be accomplished in a document database. --001485f628ece0fca7049f13e43a--