Differences
This shows you the differences between two versions of the page.
databaseconfiguration [2011/06/28 17:40] predrag.radenkovic |
databaseconfiguration [2011/06/30 15:35] (current) milorad.poptosic |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Database Configuration ====== | ====== Database Configuration ====== | ||
- | Used database in SOLoist project is configured through db.properties file. | + | The database to be used in a SOLoist application is configured by way of a db.properties file. |
- | Currently, SOLoist supports Oracle, Sybase SQL Anywhere, MySQL, but any other RDBMS that supports the usual relational paradigm, SQL (Structured Query Language), and ODBC can be easily supported, too. In EmptyProject that can be downloaded from [[http://www.soloist4uml.com/downloads|SOLoist Website download section]] there are three db.properties files for each supported database. | + | Currently, SOLoist supports Oracle, Sybase SQL Anywhere, MySQL databases, but any other RDBMS that supports the usual relational paradigm, SQL (Structured Query Language), and ODBC can be easily supported, too. In the Empty Project, which can be downloaded from [[http://www.soloist4uml.com/downloads|SOLoist Website Download Section]] there are three db.properties files for each supported database. You will have to rename appropriate properties file to db.properties depending on which RDBMS you will use. |
- | Before you start with configuring RDBMS for SOLoist application, you have to create schema and user with all privileges for that schema. Information about created schema and user are placed in the db.properties file, so configuring database for SOLoist application comes down to entering those information in appropriate file. | + | Before you start configuring database for a SOLoist application, you need to create a database schema, and add a user with appropriate privileges for that schema. Be sure to memorize or write down the schema name, user name and password, beacuse you will need to enter them into the db.properties file. |
- | The most important property values for configuring database are driverClassName, url, username and password. | + | ===== Properties ===== |
+ | The most important settings are described below. For a full description of all options, see [[http://commons.apache.org/dbcp/configuration.html|DBCP Configuration]]. | ||
+ | ==== database ==== | ||
+ | This property specifies the RDBMS to be used. It can be one of the following: mysql, oracle, sybase_asa. | ||
+ | ==== url ==== | ||
+ | This property contains the fully qualified name of the database driver to be used. | ||
+ | ==== username ==== | ||
+ | This property specifies the database username to be used when accessing the database. | ||
+ | ==== password ==== | ||
+ | This property specifies the password for the user to be used when accessing the database. | ||
+ | ==== defaultAutoCommit ==== | ||
+ | This property specifies whether each update should be made permanent immediately, or when the commit happens. | ||
+ | It is highly recommended to set this property to false, as otherwise SOLoist transactions will not work. | ||
+ | Find out [[http://download.oracle.com/javase/tutorial/jdbc/basics/transactions.html#disable_auto_commit|more about the auto-commit mode]]. | ||
+ | |||
+ | |||
+ | In sections which follow, it is shown how to configure the most important settings for the three supported databases. | ||
===== MySQL ===== | ===== MySQL ===== | ||
<file> | <file> | ||
+ | database=mysql | ||
driverClassName=com.mysql.jdbc.Driver | driverClassName=com.mysql.jdbc.Driver | ||
url=jdbc:mysql://localhost:3306/emptyproject | url=jdbc:mysql://localhost:3306/emptyproject | ||
Line 17: | Line 34: | ||
===== Oracle ===== | ===== Oracle ===== | ||
<file> | <file> | ||
+ | database=oracle | ||
driverClassName=oracle.jdbc.OracleDriver | driverClassName=oracle.jdbc.OracleDriver | ||
url=jdbc:oracle:thin:@localhost:1521/XE | url=jdbc:oracle:thin:@localhost:1521/XE | ||
Line 25: | Line 43: | ||
===== Sybase SQL Anywhere ===== | ===== Sybase SQL Anywhere ===== | ||
<file> | <file> | ||
+ | database=sybase_asa | ||
driverClassName=com.sybase.jdbc4.jdbc.SybDriver | driverClassName=com.sybase.jdbc4.jdbc.SybDriver | ||
url=jdbc:sybase:Tds:localhost:2640/emptyproject | url=jdbc:sybase:Tds:localhost:2640/emptyproject | ||
Line 31: | Line 50: | ||
</file> | </file> | ||
+ | ===== Security Issues ===== | ||
+ | Since the database password is kept in plaintext in db.properties file, it should be properly secured. | ||
- | + | SOLoist doesn't offer any kind of encryption of the password field. |