i'm new to the nosql world, and from forums and articles that i've read: most of users try to "mix" nosql tools, for example, they use Cassandra and MongoDB together to make a "powerful system", because am beginning with MongoDB, i've downloaded the DjanMon project (am a django fan ^_^ ), of course i've downloaded the special version of django that accepts the NoSql use: Django NonRel, and i've noticed that the Setting file dont "oblige" you to use one specific NoSql solution like in Django with RDBMS where you must specify MySql or PostegreSql or other solution, so, is it possible to mix lot of (or two of course) NoSql solution using Django (for example MongoDB+Cassandra)?
There's nothing to stop you using multiple storage solutions, whether SQL or NoSQL - but the NoSQL solutions all have different architectures, data models and APIs (For example, MongoDB is a document-oriented database, whereas Cassandra is Column-oriented), so you can't usually swap one for another without some effort.
Can you clarify what you are actually trying to achieve? I.e. why are you interested in mixing these two specific solutions?
Related
Recently we are working with Rails Now want to attach module working with Django. Can We use same data Base for both project. Secondly postgresql db is used here.If any framework or gem present that can handle this.
The cool thing about a general-purpose relational database (or actually one of the many cool things) is that you can use it with all kinds of programming environments – all you need to do is use the proper driver. So that should be no problem technically.
If the two programs work on the same data, let them share the database. If they operate on different data, create a new database.
We need a reasonable insert and query speed over huge tables so I considered using some noSQL adapter with Django. Unfortunately:
Django does not provide official support for noSQL databases.
In our original schema some Big Data are relational to other Big Data making the data duplication unacceptable.
Project deadlines are enemies of hot stuff like this.
So, as far I can see, PostgreSQL should be the way to go for this scenario, right?!
Please let me know any other detail that may be relevant to this question!
Bonus to anyone that can point out some useful database techniques like database sharding...
Well, there is a fork of django project that uses MongoDb as the backend.You can read about it here . The Code on GitHub is here.You give some heads up, MongoDB is a NOSQL db that does support sharding and replication. So i think this might something that you are looking for.
I am not that experienced with django yet, but we are creating a project soon and we were wondering which database to use for our backend (Mongodb or PostgreSQL).
I've read a lot of post saying the differences between each, but I still can't take the decision of which to go for. Taking in consideration I never worked with Mongodb before.
So what shall I go for ??
Thanks a lot in advance
MongoDB is non-relational, and as such you cannot do things like joins, etc.
For this reason, many of the django.contrib apps, and other 3rd-part apps are likely to not work with mongodb.
But mongodb might be very useful if you need to store schemaless complex objects that won't go straight into postgresql (of course you could json-serialize and put in a text field, but using mongodb instead is just way better, allows you doing searches, ..).
So, the best suggestion is to use two databases:
PostgreSQL for the standard applications, such as django core, authentication, ...
MongoDB only for your application, when you have to store non-relational, complex objects
You also might want to use the raw_* methods that skip lots of (mostly unnecessary) validation by the django orm.
Just remember that databases, especially sql vs no-sql, are not drop-in replacements of each other, but instead they have their own features, pros and cons, so you have to find out which one suits best your needs in each case, not just pick one and use it for everything.
UPDATE
I forgot to say: remember that you have to use the django-nonrel fork in order to make django support non-relational databases. It is currently a fork of django 1.3, but a 1.4-based version is work-in-progress.
This is more of an architectural question than a technological one per se.
I am currently building a business website/social network that needs to store large volumes of data and use that data to draw analytics (consumer behavior).
I am using Django and a PostgreSQL database.
Now my question is: I want to expand this architecture to include a data warehouse. The ideal would be: the operational DB would be the current Django PostgreSQL database, and the data warehouse would be something additional, preferably in a multidimensional model.
We are still in a very early phase, we are going to test with 50 users, so something primitive such as a one-column table for starters would be enough.
I would like to know if somebody has experience in this situation, and that could recommend me a framework to create a data warehouse, all while mantaining the operational DB with the Django models for ease of use (if possible).
Thank you in advance!
Here are some cool Open Source tools I used recently:
Kettle - great ETL tool, you can use this to extract the data from your operational database into your warehouse. Supports any database with a JDBC driver and makes it very easy to build e.g. a star schema.
Saiku - nice Web 2.0 frontend built on Pentaho Mondrian (MDX implementation). This allows your users to easily build complex aggregation queries (think Pivot table in Excel), and the Mondrian layer provides caching etc. to make things go fast. Try the demo here.
My answer does not necessarily apply to data warehousing. In your case I see the possibility to implement a NoSQL database solution alongside an OLTP relational storage, which in this case is PostgreSQL.
Why consider NoSQL? In addition to the obvious scalability benefits, NoSQL offer a number of advantages that probably will apply to your scenario. For instance, the flexibility of having records with different sets of fields, and key-based access.
Since you're still in "trial" stage you might find it easier to decide for a NoSQL database solution depending on your hosting provider. For instance AWS have SimpleDB, Google App Engine provide their own DataStore, etc. However there are plenty of other NoSQL solutions you can go for that have nice Python bindings.
Django (http://djangoproject.com) framework currently supports the following databases: PostgreSQL, SQLite 3, MySQL 5 and Oracle. This question is not about the comparison of these databases, contrariwise I want to know details about their compatibility with Django and how one should choose an adequate database for a simple (but growing) project.
It depends. If you don't want to pay the (huge) premium for Oracle, your choice is between MySQL and PostgreSQL (SQLite is mostly meant for development, not production). PostgreSQL seems to be the choice of most Django core devs (Andrew Godwin went as far as putting "friends don't let friends use MySQL" into a DjangoCon talk). Nevertheless, MySQL is fully supported by Django and is used by many Django websites in production.
IMHO, PostgreSQL has two clear advantages over MySQL:
If you use GeoDjango. There's really no alternative to PostGIS. MySQL's GIS support is lackluster at best.
South. MySQL is not able to use transactions during schema migrations, which means if a South migration goes awry, you're hanging between two migrations without clear way forward or backward. PostgreSQL saves a lot of pain in such situations.
The quick answer is it doesn't really matter but if I had to pick one, it would probably be PostgreSQL.
The original Django developers heavily recommended PostgreSQL in the early days. PostgreSQL is arguably/technically a 'better' database then MySQL so if you've never used it before it might be worth investing some time to lean it.
Now-a-days though I'd say it's safe to assume that all the DB drivers work equally well. So if you are more familiar with MySQL or Oracle there should be no problems using them instead. I've only used Django with MySQL and haven't had any problems.
All of the pluggable databases are supported, meaning, the the model/db-layer will abstract the db-specifics for you. As for performance, I'd suggest MySQL 5 or Postgresql. Oracle will definitely perform well, but might be more expensive in the long run. If you are just started your project, sqlite3 is your friend, simply because the it will be setup within seconds.
Handling parallel settings for development and production has been discussed in various blog posts, e.g. in this one:
http://ericholscher.com/blog/2011/jan/10/handling-django-settings-files/