blob: 4909313fe28b455bf4e5b5392818f3e6785be600 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN">
<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">
<p class="head">BIRT Sample Database</p>
<p class="subhead">Overview</p>
<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
<a href="">Software User Agreement</a>.</p>
<p>The database consists of seven tables:</p>
<li>Offices: sales offices</li>
<li>Employees: All employees, including sales reps who work with 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>
<p>This <a href="dbschema/ClassicModelsDBSchema.jpg">ER-diagram</a> shows the
table structure and relationships. (<a href="dbschema/ClassicModelsDBSchema.pdf">PDF
<p>The sample database is available in three forms:</p>
<li>Apache Derby database, which is included in the BIRT download </li>
<li><a href="#MySQL">Scripts to load a MySQL database</a></li>
<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=""></a> for instructions.</p>
<p>Install the MySQL JDBC driver into BIRT:</p>
<li>Download and unzip MySQL Connector/J 3.1 JDBC driver located at:
<a href=""></a>
<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>
<pre class="code-block">jdbc:mysql://[host][,failoverhost...][:port]/[database]…</pre>
<p>You are now ready to create the Classic Models database:</p>
<li><a href="mysql/">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>&lt;location of the zip file contents&gt;</i>/scripts</pre>
<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&gt; create database ClassicModels;
mysql&gt; use ClassicModels;
mysql&gt; source create_classicmodels.sql;</pre></li>
<li>Load the table contents:<br>
<pre class="code-block">mysql&gt; source load_classicmodels.sql;</pre></li>
<li>Exit from mysql:<br>
<pre class="code-block">mysql&gt; quit;</pre></li>
<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>
<li><a href="localizeddb/">Localized Derby Sample Database</a></li>
<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 &quot;Classic Models Inc. Sample Database&quot; entry in the new data source dialog.</p>
<p>Data source properties for the MySQL sample database:</p>
<table class="simple-table">
<td>Driver Class:</td>
<td>User Name:</td>
<p>See also the <a href="logos.html">logos page</a> for images you can use in
sample reports against this database.</p>