| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN"> |
| <html> |
| |
| <head> |
| <title>Deploying BIRT</title> |
| <link rel="stylesheet" href="../style/compose.css" type="text/css"/> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| </head> |
| |
| <body> |
| |
| <p class="head">BIRT Sample Database</p> |
| <p class="subhead">Overview</p> |
| |
| <h1>Introduction</h1> |
| |
| <p>The BIRT sample database provides a simple set of tables and data that form |
| the basis for BIRT sample reports. The schema is for Classic Models, a retailer |
| of scale models of classic cars. The database contains typical business data |
| such as customers, orders, order line items, products and so on. It was designed |
| to illustrate many of the features of the BIRT report designer.</p> |
| |
| <p>The sample database is open source; you are free to use it for your own use |
| to experiment with other tools; to create samples for other tools, etc. The |
| sample database is provided under the terms Eclipse.org |
| <a href="http://www.eclipse.org/legal/notice.html">Software User Agreement</a>.</p> |
| |
| <h1>Schema</h1> |
| |
| <p>The database consists of seven tables:</p> |
| |
| <ul> |
| <li>Offices: sales offices</li> |
| <li>Employees: All employees, including sales reps who work with customers.</li> |
| <li>Customers</li> |
| <li>Orders: Orders placed by customers</li> |
| <li>Order Details: Line items within an order.</li> |
| <li>Payments: Payments made by customers against their account</li> |
| <li>Products: The list of scale model cars</li> |
| </ul> |
| <p>This <a href="dbschema/ClassicModelsDBSchema.jpg">ER-diagram</a> shows the |
| table structure and relationships. (<a href="dbschema/ClassicModelsDBSchema.pdf">PDF |
| version</a>)</p> |
| <h1>Install</h1> |
| |
| <p>The sample database is available in three forms:</p> |
| |
| <ul> |
| <li>Apache Derby database, which is included in the BIRT download </li> |
| <li><a href="#MySQL">Scripts to load a MySQL database</a></li> |
| </ul> |
| |
| <h2><a name="MySQL">MySQL Version</a></h2> |
| |
| <p>To install the MySQL version of the sample database, you must have MySQL |
| installed. See <a href="http://www.mysql.com">mysql.com</a> for instructions.</p> |
| |
| <p>Install the MySQL JDBC driver into BIRT:</p> |
| |
| <ul> |
| <li>Download and unzip MySQL Connector/J 3.1 JDBC driver located at: |
| <a href="http://dev.mysql.com/downloads/">http://dev.mysql.com/downloads/</a> |
| </li> |
| </ul> |
| |
| <ul> |
| <li>Install the JDBC driver using the instructions on the |
| <a href="../build/install.html">install page</a>. Enter the following for the |
| URL template:</li> |
| </ul> |
| <blockquote> |
| <pre class="code-block">jdbc:mysql://[host][,failoverhost...][:port]/[database]
</pre> |
| |
| </blockquote> |
| |
| <p>You are now ready to create the Classic Models database:</p> |
| |
| <ul> |
| <li><a href="mysql/ClassicModels-MySQL.zip">Download the zip file</a> containing the MySQL database scripts.</li> |
| <li>Expand the zip file into a convenient location.</li> |
| <li>Expanding the zip file created a scripts directory with some MySQL scripts. |
| From the command line, move to the scripts directory:<br> |
| <pre class="code-block">% cd <i><location of the zip file contents></i>/scripts</pre> |
| </li> |
| |
| <li>Start the mysql utility, giving the name (and password, if needed) of a user permission |
| to create databases. For example, to use the default root user:<br> |
| <pre class="code-block">% mysql --user=root</pre></li> |
| |
| <li>Create the ClassicModels database and load the schema. (Loading the schema the schema |
| the first time will give error messages as it attemps to empty any existing tables, |
| just ignore these.)<br> |
| <pre class="code-block">mysql> create database ClassicModels; |
| mysql> use ClassicModels; |
| mysql> source create_classicmodels.sql;</pre></li> |
| |
| <li>Load the table contents:<br> |
| <pre class="code-block">mysql> source load_classicmodels.sql;</pre></li> |
| <li>Exit from mysql:<br> |
| <pre class="code-block">mysql> quit;</pre></li> |
| </ul> |
| |
| <h2><a name="LocalizeDb">Localized Version of the Sample Database</a></h2> |
| <p>Following is the Derby Database localized into French, German, Spanish, Japanese, Korean, and Simplified Chinese. </p> |
| |
| <ul> |
| <li><a href="localizeddb/Localized_Derby_Sample_DB.zip">Localized Derby Sample Database</a></li> |
| </ul> |
| |
| |
| <h1>Usage</h1> |
| |
| <p>You can now use the sample database within BIRT to create reports. The key |
| information you need to get started is how to create a data source for the |
| database. The details vary depending on the database system you selected.</p> |
| |
| <h2>Apache Derby</h2> |
| |
| <p>The Apache Derby version of the database is included in the BIRT download as a built-in data source. To access it, simply select the "Classic Models Inc. Sample Database" entry in the new data source dialog.</p> |
| |
| <h2>MySQL</h2> |
| |
| <p>Data source properties for the MySQL sample database:</p> |
| |
| <table class="simple-table"> |
| <tr> |
| <td>Driver Class:</td> |
| <td>com.mysql.jdbc.Driver</td> |
| </tr> |
| <tr> |
| <td>URL:</td> |
| <td>jdbc:mysql://localhost/classicmodels</td> |
| </tr> |
| <tr> |
| <td>User Name:</td> |
| <td>root</td> |
| </tr> |
| <tr> |
| <td>Password:</td> |
| <td> </td> |
| </tr> |
| </table> |
| |
| |
| <h2>Logos</h2> |
| |
| <p>See also the <a href="logos.html">logos page</a> for images you can use in |
| sample reports against this database.</p> |
| |
| </body> |
| </html> |