Differences between revisions 8 and 34 (spanning 26 versions)
Revision 8 as of 2008-11-15 14:01:19
Size: 2689
Editor: localhost
Comment: converted to 1.6 markup
Revision 34 as of 2017-08-07 19:32:49
Size: 5125
Comment: Replaced cold links of pyodbc and pypyodbc with newer links on GitHub.
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
  licence:: commercial/proprietary software, although a free (gratis) edition "SQL Server 2005 Express" is available   licence:: commercial/proprietary software, although a free (gratis) edition "SQL Server 2008 R2 Express" is available
Line 17: Line 17:
 * SQL Server comes in various flavours. The regular version includes the GUI tools and also provides advanced features which are not included in SQL Server Express.  * SQL Server comes in various flavours. The latest free version has a 10GB database size limit. It comes with the GUI tools and Reporting Services. The standard and other versions include many extra features.
Line 32: Line 32:
  URL:: http://pymssql.sourceforge.net/
  SourceForge:: http://sourceforge.net/projects/pymssql
  URL:: http://pymssql.org
Line 47: Line 46:
  Platforms:: Windows, Unix, Mac OSX, FreeBSD, Solaris   Platforms:: Windows, Unix, Mac OS X, FreeBSD, Solaris, AIX, other platforms on request
  Python versions:: 2.4 - 2.7
Line 49: Line 49:
mxODBC requires an ODBC driver to talk to SQL Server. On Windows, this comes with SQL Server, on the other platforms, there are several commercial ODBC high quality drivers available. There's also a FreeTDS ODBC driver which is free. mxODBC requires an ODBC driver to talk to SQL Server. On Windows, you can use the [[http://msdn.microsoft.com/en-us/library/jj991993.aspx|MS SQL Server Native Client ODBC driver for Windows]], on the other platforms, there are several commercial ODBC high quality drivers available, an open-source [[http://www.freetds.org/ FreeTDS ODBC driver]] for Unix platforms and the free [[http://msdn.microsoft.com/en-us/library/hh568451%28v=sql.110%29.aspx|MS SQL Server Native Client ODBC driver for Linux x64]].
Line 51: Line 51:
Unicode is supported both for data and SQL statements. mxODBC supports both 32-bit and 64-bit platforms. mxODBC comes with full support for stored procedures, multiple result sets, Unicode, a common interface on all platforms and [[http://www.egenix.com/products/python/mxODBC/#Features|many other useful features]].

=== pyodbc ===

  URL:: https://github.com/mkleehammer/pyodbc
  License:: MIT
  Platforms:: Windows, Linux, MacOS X, FreeBSD, Solaris, Any (source provided)
  Python versions:: 2.4 - 3.2

Actively maintained Open Source project.

Precompiled binaries are available for Windows. Red``Hat Enterprise Linux, Centos, and Fedora have precompiled RPMs available in their Extras repositories.

Supports ANSI and Unicode data and SQL statements and includes an extensive set of unit tests for SQL Server. pyODBC require ODBC driver to work correctly with SQL Server. You may [[https://www.devart.com/odbc/sqlserver/download.html|download latest SQL Server ODBC driver]] and use it freely. Or you may choose Microsoft ODBC driver for that needs which is posted above in mxODBC driver description.


=== pypyodbc (Pure Python) ===

 URL::
 https://github.com/jiangwen365/pypyodbc

 License:: MIT
 Platforms:: Windows, Linux
 Python versions:: 2.4 - 3.3

[[http://code.google.com/p/pypyodbc/wiki/A_HelloWorld_sample_to_access_mssql_with_python|A Hello World script of pypyodbc database programing]]

[[http://code.google.com/p/pypyodbc/wiki/Linux_ODBC_in_3_steps|Connect SQL Server in 3 steps with pypyodbc on Linux]]

[[https://code.google.com/p/pypyodbc/wiki/Enable_SQLAlchemy_on_PyPy| Run SQLAlchemy on PyPy with pypyodbc driver]]

PyPyODBC is a pure Python script, it runs on CPython / IronPython / PyPy , Version 2.4 / 2.5 / 2.6 / 2.7 , Win / Linux , 32 / 64 bit.

Almost totally same usage as pyodbc ( can be seen as a re-implementation of pyodbc in pure Python ).

Simple - the whole module is implemented in a single python script with less than 3000 lines.

Built-in Access MDB file creation and compression functions on Windows.

Line 58: Line 97:

''Comment:'' Note about the comment above -- just because it should be pointed out, mxODBC is not a free product from what I can see, and the 'cookbook entry' from 2005 referenced above indicates that it is.
----
CategoryPythonWebsite

Microsoft SQL Server

URL

http://www.microsoft.com/sql/default.mspx

licence
commercial/proprietary software, although a free (gratis) edition "SQL Server 2008 R2 Express" is available
platforms
Windows 2000 and later

Pros

  • SQL Server is a robust and fully-featured database, and it performs very well. Moreover, I have not had any problems using this database with Python.
  • The SQL Server Express versions are free to download, use and can even be redistributed with products.

Cons

  • Windows only.
  • SQL Server comes in various flavours. The latest free version has a 10GB database size limit. It comes with the GUI tools and Reporting Services. The standard and other versions include many extra features.


DB API 2.0 Drivers

adodbapi

URL

http://adodbapi.sourceforge.net/

SourceForge

http://sourceforge.net/projects/adodbapi

licence
LGPL
platforms
Windows only

pymssql

URL

http://pymssql.org

licence
LGPL
platforms
Windows and Unix

mssql

URL

http://www.object-craft.com.au/projects/mssql/

licence
BSD
platforms
Windows

mxODBC

URL

http://www.egenix.com/

License
eGenix.com Commercial License
Platforms
Windows, Unix, Mac OS X, FreeBSD, Solaris, AIX, other platforms on request
Python versions
2.4 - 2.7

mxODBC requires an ODBC driver to talk to SQL Server. On Windows, you can use the MS SQL Server Native Client ODBC driver for Windows, on the other platforms, there are several commercial ODBC high quality drivers available, an open-source http://www.freetds.org/ FreeTDS ODBC driver for Unix platforms and the free MS SQL Server Native Client ODBC driver for Linux x64.

mxODBC comes with full support for stored procedures, multiple result sets, Unicode, a common interface on all platforms and many other useful features.

pyodbc

URL

https://github.com/mkleehammer/pyodbc

License
MIT
Platforms
Windows, Linux, MacOS X, FreeBSD, Solaris, Any (source provided)
Python versions
2.4 - 3.2

Actively maintained Open Source project.

Precompiled binaries are available for Windows. RedHat Enterprise Linux, Centos, and Fedora have precompiled RPMs available in their Extras repositories.

Supports ANSI and Unicode data and SQL statements and includes an extensive set of unit tests for SQL Server. pyODBC require ODBC driver to work correctly with SQL Server. You may download latest SQL Server ODBC driver and use it freely. Or you may choose Microsoft ODBC driver for that needs which is posted above in mxODBC driver description.

pypyodbc (Pure Python)

URL

https://github.com/jiangwen365/pypyodbc

License
MIT
Platforms
Windows, Linux
Python versions
2.4 - 3.3

A Hello World script of pypyodbc database programing

Connect SQL Server in 3 steps with pypyodbc on Linux

Run SQLAlchemy on PyPy with pypyodbc driver

PyPyODBC is a pure Python script, it runs on CPython / IronPython / PyPy , Version 2.4 / 2.5 / 2.6 / 2.7 , Win / Linux , 32 / 64 bit.

Almost totally same usage as pyodbc ( can be seen as a re-implementation of pyodbc in pure Python ).

Simple - the whole module is implemented in a single python script with less than 3000 lines.

Built-in Access MDB file creation and compression functions on Windows.

ODBC

It is possible to connect to an SQL Server database using ODBC, either the mxODBC driver or the one included with Win32all. However, this is not recommended - adodbapi is a better solution, in part because it supports unicode.

Comment: This is actually not true at all: ODBC is the native API used for SQL Server and does support Unicode all the way. In fact, ODBC is the preferred way of accessing SQL Server if you care for performance. Microsoft has just released the SQL Server Native Client which is an extended ODBC driver for SQL Server. ADO is just a layer on top of the ODBC interface and a lot slower as a result. See e.g. MS TechNet for a comparison of ODBC, OLE DB and ADO, or this cookbook entry.

Comment: Note about the comment above -- just because it should be pointed out, mxODBC is not a free product from what I can see, and the 'cookbook entry' from 2005 referenced above indicates that it is.


CategoryPythonWebsite

SQL Server (last edited 2017-08-07 19:32:49 by MaximilianFuxjaeger)

Unable to edit the page? See the FrontPage for instructions.