0

I'm new at both Python and Django and still trying to figure out the best environment for my development. As far as I saw, there are 2 options available for establishing a connection to a MSSQL database which are:

Django MSSQL Database Backend: http://django-mssql.readthedocs.org/en/latest/

Django PYODBC: https://github.com/lionheart/django-pyodbc/

What I want to ask is the difference between those 2 options and their pros/cons over each other. Do they differ from each other especially in terms of performance and stability?

(I have only found the link below in stackoverflow but it was quite limited and outdated so I've wanted to ask another question. Sorry if there are any recent ones that I haven't seen yet.)

django-pyodbc vs django-mssql

Thank you.

Community
  • 1
  • 1
Phyticist
  • 566
  • 1
  • 8
  • 20
  • Are you hosting on Linux? What version of SQL Server? What version of Python and Django? – FlipperPA Nov 23 '15 at 19:58
  • Actually I am planning publish it on Azure as a web app. As the SQL Server I'll be using Azure SQL V12 with python 3.4.1 and Django 1.8.6 – Phyticist Nov 23 '15 at 20:26
  • @FlipperPA Is it possible for you to make such a comparison with the information I have provided? Thank you. – Phyticist Dec 01 '15 at 15:56
  • Possible duplicate of [django-pyodbc vs django-mssql](http://stackoverflow.com/questions/5297243/django-pyodbc-vs-django-mssql) – Anoyz Jan 25 '16 at 11:45
  • As you can see in my message, I also have shared the very same link that you have shared, but the info in that answer is very limited, thus I kindly requested a much more comprehensive answer if any possible. – Phyticist Jan 25 '16 at 19:21
  • If you are planning on using Django 1.8.6, be aware that django-mssql current stable version only supports Django 1.7. Support for Django 1.8 is currently in development. – rparent Nov 15 '16 at 08:55

1 Answers1

0

I chose django-mssql when I started my project two years ago, as it is optimized specially for SQL Server whereas django-pyodbc relies on pyodbc which is a generic ODBC driver.

Of course there are some bugs, but the package is actively maintained. So far it does the job very well for me.

The main downsides :

  • Only runs on Windows (depends on pywin32 package)
  • Django version support far behind latest (current stable version supports Django 1.7, and development version is for Django 1.8...)
  • Migrations are a little buggy. You may have to alter generated sql by yourself in some cases.

django-pyodbc seems to support latest Django version and is cross-platform, however I have not found any positive opinion of people that use it in production back when I had to choose between the two.

rparent
  • 630
  • 7
  • 14