Django Book 翻译
菜单>:
TOC
返回
原文:
* It ties us to MySQL. If, down the road, we switch from MySQL to PostgreSQL, well have to use a different database adapter (e.g., ``psycopg`` rather than ``MySQLdb`` ), alter the connection parameters, and depending on the nature of the SQL statement possibly rewrite the SQL. Ideally, the database server were using would be abstracted, so that a database server change could be made in a single place.
翻译:
* 它把我们栓死在 MySQL 之上。如果过段时间,我们要从 MySQL 换到 PostgreSQL,就不得不使用不同的数据库适配器(例如 ``psycopg`` 而不是 ``MySQLdb`` ),改变连接参数,根据 SQL 语句的类型可能还要修改SQL 。理想情况下,应对所使用的数据库服务器进行抽象,这样一来只在一处修改即可变换数据库服务器。
备注:
译者: