Changes between Version 14 and Version 15 of DatabaseBackend
- Timestamp:
- Jan 23, 2006, 4:42:46 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DatabaseBackend
v14 v15 1 1 = Database Backend = 2 2 3 Currently, Trac uses [http://www.sqlite.org SQLite] as its database backend. 3 Initially, Trac only supported SQLite for its database backend. 4 Postgresql support has been added as of Trac [milestone:0.9]. 4 5 5 However, there have been several requests that other databases should be supported as well (see #126, #986). 6 Since milestone:0.10, Trac offers an easily extensible layer for 7 Database support (see [source:trunk/trac/db/api.py trac.db.api]). 6 8 7 == Existing Proposals and Implementations == 9 The existing backends have been refactored and integrated in this 10 layer. There's currently bundled support for: 11 * [http://www.sqlite.org SQLite], using PySqlite 12 * [http://www.postgresql.org PostgreSQL], using a variety of bindings 13 ([http://initd.org/projects/psycopg1 psycopg1], 14 [http://initd.org/projects/psycopg2 psycopg2], or 15 [http://pypgsql.sourceforge.net/ pyPgSQL]) (see #126 for historical notes) 8 16 9 Postgresql is supported as of Trac 0.9. Here are some limited instructions. 17 There's some work in progress for the following: 18 * MySQL (see #986) 19 * Oracle (see #1874) 20 21 == Backend Specific Installation Instructions == 22 23 === Postgresql === 24 10 25 * Have a working copy of Postgresql 11 * 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]26 * Get the proper database driver for Python (see above) 12 27 * Create a database for your Trac environment 13 28 {{{ … … 19 34 }}} 20 35 21 MySQL is only experimentally supported with the patch attached to ticket #986. It also has several limitations. 36 === MySQL === 37 38 MySQL is only experimentally supported with the patch attached to ticket #986. 39 It also has several limitations. 22 40 * Have a working copy of MySQL version 4.1.12 or greater. 23 41 * [http://sourceforge.net/projects/mysql-python MySQLdb] - Python database driver for MySQL … … 38 56 }}} 39 57 40 == Object-Relational Mapper ==41 58 42 provide a unified object interface to different RDBMS 59 == Alternative Ideas for Database Independence == 43 60 44 * SQLObject 45 I think some people have been talking about using [http://sqlobject.org SQLObject] to accomplish this goal of database independence. 61 === Object-Relational Mapper === 46 62 63 An ORM could be used to provide a unified object interface to different RDBMS: 64 * some people have been talking about using [http://sqlobject.org SQLObject] 65 to accomplish this goal of database independence. 47 66 * [http://modeling.sourceforge.net/ Modeling] 48 Another, more advanced (and more complex) OR-Mapper.67 Another, more advanced (and more complex) OR-Mapper. 49 68 50 69 Comparisions between both and more info on Python ORMs: 51 52 70 * http://toulouse.amber.org/archives/2003/04/21/evaluating_objectrelational_migration.html 53 71 * http://google.com/search?q=SQLObject+modeling 54 72 55 == Store Tickets and Wiki pages directly in the Subversion repository==73 === Store Tickets and Wiki pages directly in the Subversion repository === 56 74 57 75 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]. 58 76 59 == Other Alternatives==77 === Other Alternatives === 60 78 61 http://wiki.w4py.org/databaseintegration.html 62 63 http://adodb.sourceforge.net - the fast ADODB db abstraction layer (version available for python) 79 * http://wiki.w4py.org/databaseintegration.html 80 * http://adodb.sourceforge.net - the fast ADODB db abstraction layer (version available for python)