Hi all,

On Tue, 17 Dec 2013, Tom Evans wrote:

On Tue, Dec 17, 2013 at 3:35 PM, parisrocks <saravanan.sellathu...@gmail.com> wrote:
Waiting for official Django ORM support for NoSql databases.

MongoDB (and the vast majority of NoSQL databases) are not relational databases, they are document oriented databases, they store documents of an unspecified type and allow you to retrieve documents by id, or perhaps other attributes of the document.

At no point with MongoDB can you have relationships between two different documents that can be followed or queried. Therefore, I'm quite confused what you want from an "ORM" interface to a NoSQL database. Each document has no relationships, there is nothing for an "ORM" to do...

I think it would be more helpful to say that it IS possible to store the ID of a document in a field of another, of course, and that means that documents CAN have relationships:

{"id": "1", "name": "Pluto", "owner": "2"}
{"id": "2", "name": "Mickey"}

And some NoSQL databases do not provide any facilities for following that link automatically, as part of a single query, so you would need to make a separate query to retrieve the owner of an object. Other databases (such as CouchDB) do support it.

Even SQL does not always make it easy or convenient to follow these links, especially if one wants to retrieve associated records from multiple tables without creating a combinatorial explosion. NoSQL databases can actually do better than SQL here.

There is value in providing storage backends for NoSQL databases in Django. Several already exist, for example:

* https://code.djangoproject.com/wiki/NoSqlSupport
* http://www.allbuttonspressed.com/projects/django-nonrel

The main issues and solutions are listed on the first of those pages.

There is no particular reason NOT to do it, unless one wants Django's ORM layer to remain fundamentally tied to SQL. I can't see a good reason to do that, but maybe others do. In the mean time, this question will continue to be asked until a position is officially documented, even if it's "we don't care about NoSQL, just leave us alone."

Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Citylife House, Sturton Street, Cambridge, CB1 2QF, UK

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/alpine.DEB.2.02.1312171639330.6923%40lap-x201.fen.aptivate.org.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to