The wb03 project
General info
Project description
Data source
The About view
The lifeExpectancy view
Changes relative to the wb02 project
Database
General info
This project provides charts of the life expectancy at birth by country.
The user specifies the desired country by selecting its name from a combobox, as seen below:
It is also possible to manually iterate through the countries by using the arrow buttons or let the program iterate automatically by pressing the
button.
Project description
Data source
The project declares an SQL data source consisting of an embedded Derby database stored in a zip file located in the project's directory.
Because Viewreka sets the value of the system property 'user.dir' to the directory of the current project, this property is used in the connection string to locate the database.
The About View
The About view provides an HTML chart with information about this project. The chart content is retrieved from an external file (and it is the document you are currently reading).
The lifeExpectancy View
The lifeExpectancy view provides an XY chart based on the dataset dsLifeExp, which is defined by a parameterized query.
Changes relative to the wb02 project:
- The new dataset dsCountry, which provides the list of all country names, has been introduced.
- The parameter prmCountry uses the dataset dsCountry in order to specify its possible values.
- Due to the availability of a list of possible values for prmCountry, the program replaces the text field used in the wb02 project with a combobox and a series of navigation controls.
Database
This project uses a Derby database compiled from data provided by the World Bank.
The database consists of four tables, as seen in the figure below:
Below is a sample of the data contained in these tables:
The database also contains two views that present the data in a user friendly form, as illustrated by the samples below:
V_COUNTRY
V_INDICATOR