English 中文(简体)
Python & MySQL - Overview
  • 时间:2024-11-03

Python & MySQL - Overview


Previous Page Next Page  

The Python standard for database interfaces is the Python DB-API. Most Python database interfaces adhere to this standard.

You can choose the right database for your apppcation. Python Database API supports a wide range of database servers such as −

    GadFly

    mSQL

    MySQL

    PostgreSQL

    Microsoft SQL Server 2000

    Informix

    Interbase

    Oracle

    Sybase

Here is the pst of available Python database interfaces: Python Database Interfaces and APIs. You must download a separate DB API module for each database you need to access. For example, if you need to access an Oracle database as well as a MySQL database, you must download both the Oracle and the MySQL database modules.

The DB API provides a minimal standard for working with databases using Python structures and syntax wherever possible. This API includes the following −

    Importing the API module.

    Acquiring a connection with the database.

    Issuing SQL statements and stored procedures.

    Closing the connection

MySQLdb

MySQLdb is an interface for connecting to a MySQL database server from Python. It implements the Python Database API v2.0 and is built on top of the MySQL C API.

Advertisements