<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="example-explained">
  <title>Portfolio Example Explained</title>

  <section>
    <para>The investor's portfolio example information is stored in a HSQL
    database and "current" stock prices are stored in a delimited text file.
    When the VDB is completed, a single query will cause Teiid to access the
    relational and non-relational sources, calculate the portfolio values, and
    return the results.</para>

    <figure id="steps">
      <title>Various Steps involved in creating the example</title>

      <graphic align="center" fileref="../images/steps-defined.png"
               scale="100" />
    </figure>

    <itemizedlist>
      <listitem>
        <para>
          <link linkend="setupDS">Step-1: Setup Data Sources /
          ConnectionFactories</link>
        </para>
      </listitem>

      <listitem>
        <para>
          <link linkend="buildVDB">Step-3: Build a VDB</link>
        </para>
      </listitem>

      <listitem>
        <para>
          <link linkend="deployment">Step-4: Deploy the VDB in JBoss AS</link>
        </para>
      </listitem>

      <listitem>
        <para>
          <link linkend="OpenConnection">Step-5: Access the VDB using the JDBC
          API</link>
        </para>
      </listitem>
    </itemizedlist>
  </section>

  <note>
    <para>HSQL database is used here since it is Open Source and comes with
    JBoss AS and is light-weight. You can substitute any other relational
    database, as long as you have a suitable JDBC driver. The schema file
    provided, and described below, is specific to HSQL, but can be easily
    converted for use with other databases.</para>
  </note>
</chapter>
