NoSQL databases with Django: What is Django-nonrel?

NoSQL databases with Django

What is NoSQL?

It is a movement to promote new kinds of databases. In principle, quite apart from the SQL language and used mostly Java, JavaScript or C + + programming language.Due to the non-relational approach to the separation of fixed / default table schema and avoiding joins pursued. In contrast to the usually suffering problem relational databases NoSQL databases with many write requests bypass. Prominent examples are the use of this internet sites like Digg, Facebook and eBay.

What is Django-nonrel?

Under the name “Allbuttonspressed” developed a group of students as part of a final project Django-nonrel. Because of degrees, they had to hand the reins to successor voluntary.Django-nonrel is an independent branch of Django that extends the Object-Relational Mapping (ORM) by Django to the NoSQL databases support. A long-term goal of the developers is the NoSQL support to publish in an official Django release.

Advantages of Django-nonrel

Django nonrel has no fixed schemas, which makes the system more flexible and open. Also allows porting apps easier because the NoSQL databases all providers only use the Django ORM and not third-party libraries. A foreign code that would need to be ported, does not exist therefore. At the same time remain through the use of ORM by NoSQL all the benefits that make Django (Model Forms, Admin) obtained. In addition, a mixed operation can be realized from relational and non-relational databases.

Differences of Django Django nonrel

There are currently no ManyToMany fields, since these joins use, which does not exist in NoSQL. However, it is worked to support this in the future. The expansion ListField works just like a Python list, you get a list from the database and you can insert a list in the database. Basically they replace ManyToManyFields. Behave identically SetField and DictField.It is being planned that these field types are automatically changed with Django admin.EmeddedModelField it possible to encapsulate a model. An example would be a company model that includes a staff-model.

Installing Django-nonrel

The project is under be downloaded. Installing Django Django nonrel overwrites! This could cause problems with existing projects and apps. Next, Django is patched djangotoolbox with the tool, resulting in the extension of the above field types with itself. Well you would have to opt for a supported NoSQL database system and install the respective backend. Details of these are listed below. Other optional components were the djangodbindexer, which offers up to a certain degree, join support, and the nonrel-permission-backend with admin rights management.

Simple example setup:

   'default' :  {
      'ENGINE' :  'django_mongodb_engine' ,
      # or appengine
      'NAME' :  'blog' ,

Supported NoSQL databases Django nonrel

  • Google App Engine: djangoappengine Contains all App Engine backend for Django-nonrel, eg the database and e-mail back-ends. Additionally a test application is provided, which can be used as a guide.
  • MongoDB: django-mongodb-engine The listing on the C + + language based document-oriented database can be collections of JSON-like documents.
  • more planned for the future (Cassandra, Membased, DynamoDB, etc.)

Use the “couchdb-python” Python Library, the NoSQL database CouchDB system be used with Django.

Subscribe and never miss a post!

Subscribe to the free newsletter now and get fresh content delivered straight into your inbox. (No spam, we promise)

Comment Policy:

Your words are your own, so be nice and helpful if you can. Please, only use your REAL NAME, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please. You can wrap code in [lang-name][/lang-name] tags.

Tell us what you're thinking...

If you want a picture to show with your comment, then get Gravatar!