= Changing the Database = [wiki:Installing Back to Installing] To change the database used by gnuMims the settings in the external config file must be changed. [[BR]] A jar matching the configuration may need to be placed in the Tomcat lib or classes dir (e.g. lib/mysql-connector-java-5.1.7-bin.jar [http://dev.mysql.com/downloads/connector/j/5.1.html Connector]) [[BR]] Most common SQL databases are supported by Grails (via Hibernate), we test and run MySQL (InnoDB). [[BR]] The database must support transactions and row locking. [[BR]] See the headings bellow for more details on each database tested so far. [[BR]] For more info see the DeveloperStartPage and [http://www.grails.org/Quick+Start#Configure%20a%20Data%20Source%20(Optional) Grails documentation]. '''MySQL'' MySQL is the database we use most often and therefore the most thoroughly tested and highly recommended. [[BR]] The external config file is setup for MySQL and a driver is shipped by default. Also see [wiki:InstallationTips Installation Tips] and [wiki:MysqlConfig Mysql Confg] [[BR]] '''PostgreSQL'' Not tested, please email us if you have tested against PostgreSQL. [[BR]] We will run some tests against PostgreSQL when time permits or if requests are made. [[BR]] '''MSSQL''' Live deployment in progress (Since 11-Jan-2010) only very minor differences to Mysql. [[BR]] Some searches are more or less inclusive, no real problems in practise. [[BR]] '''Oracle DB''' Currently gnuMims will not run against an Oracle DB without some work. [[BR]] The known issues should be surmountable and are listed bellow: * 30 Char limit: * Several gnuMims domain classes and attributes exceed this limit . * This is possibly the biggest issue since Grails will create join tables for classes '!MyDomainClassName1' and '!MyDomainClassName2' as 'my_domain_class_name1_my_domain_class_name2'. * Table mappings may be of use here? * Abbreviated names would make building reports directly from the database much less intuitive. * The default sequence generator does not create Id's as expected, a suitable hibernate sequence generator needs to be set. * To store empty strings the IS_NULLABLE metadata for the column needs to be set. * [http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96540/ap_keywd.htm Oracle reserved words] ("comment" and "date") this can be solved with a mapping in the appropriate domain classes: {{{ static mapping = { columns { comment column:'entry_comment' } } }}}