How to Hybrid Mysql and MongoDB in Django

django, mongodb, mysql, nosql

Solution

First use standard rdbms database backend. Next try to add django-nonrel/django_mongodb_engine . Django supports multiple databases.

settings.py
DATABASES = {
   'default': {   
'ENGINE': 'django.db.backends.mysql',
    'USER': 'mysql_user',
    'PASSWORD': 'priv4te'
    },

   'product_db' : {
      'ENGINE' : 'django_mongodb_engine',
      'NAME' : 'my_database'
   }
}

- https://docs.djangoproject.com/en/dev/topics/db/multi-db/

- http://www.allbuttonspressed.com/projects/django-nonrel#documentation

- https://github.com/django-nonrel/mongodb-engine

Problem

I want to use both mysql and mongodb for my auction site. Product store in MongoDB, Order store in Mysql http://www.slideshare.net/spf13/hybrid-mongodb-and-rdbms-applications How can I do this in Django

Original source