= Database Backend = Currently, Trac uses [http://www.sqlite.org SQLite] as its database backend. However, there have been several requests that other databases should be supported as well (see #126, #986). == Existing Proposals and Implementations == Postgresql is supported as of Trac 0.9. Here are some limited instructions. * Have a working copy of Postgresql * Get the proper database driver for Python - [http://initd.org/projects/psycopg1 psycopg1], [http://initd.org/projects/psycopg2 psycopg2], or [http://pypgsql.sourceforge.net/ pyPgSQL] * Create a database for your Trac environment {{{ % createdb dbname }}} * Run trac-admin to create a new Trac environment. When prompted for a Database connection string, use: {{{ postgres://user:pass@localhost:5432/dbname }}} MySQL is only experimentally supported with the patch attached to ticket #986. It also has several limitations. * Have a working copy of MySQL version 4.1.12 or greater. * [http://sourceforge.net/projects/mysql-python MySQLdb] - Python database driver for MySQL * Create a database and user for your Trac environment {{{ % createdatabase dbname % mysql > grant all privileges on dbname.* to dbuser identified by 'dbpass'; > quit }}} * Run trac-admin to create a new Trac environment. When prompted for a database connection string, use: {{{ mysql://dbuser:dbpass@host:port/dbname }}} * or {{{ mysql://dbuser:dbpass@host/dbname }}} == Object-Relational Mapper == provide a unified object interface to different RDBMS * SQLObject I think some people have been talking about using [http://sqlobject.org SQLObject] to accomplish this goal of database independence. * [http://modeling.sourceforge.net/ Modeling] Another, more advanced (and more complex) OR-Mapper. Comparisions between both and more info on Python ORMs: * http://toulouse.amber.org/archives/2003/04/21/evaluating_objectrelational_migration.html * http://google.com/search?q=SQLObject+modeling == Store Tickets and Wiki pages directly in the Subversion repository == A compelling idea with many advantages. A page advocating this plan is TighterSubversionIntegration. There has also been a discussion on the Trac mailing list. All arguments from this discussion are summarized on the page [wiki:WhySQLite WhySQLite]. == Other Alternatives == http://wiki.w4py.org/databaseintegration.html http://adodb.sourceforge.net - the fast ADODB db abstraction layer (version available for python)