Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BY
DOLORES JUREZ
Contents
Introduction ........................................................................................................................................ 1
Acknowledgments ............................................................................................................................... 3
About Developers................................................................................................................................ 3
Miguel Angel Gil Rios....................................................................................................................... 3
Mara Dolores Jurez Ramrez......................................................................................................... 4
1.
Description .................................................................................................................................. 5
2.
3.
3.2
4.
5.
6.
7.
5.1
5.2
6.2
6.3
7.2
7.3
7.3
7.4
8.
9.
Histogram Charts............................................................................................................... 29
9.2
9.3
9.4
9.5
9.6
9.7
ii
Introduction
SQL Data Workshop :: Java Database Front End
Copyright (C) 2013 grios1980@users.sourceforge.net
This software is double licensed.
Under the General Public License is a free software; you can
redistribute it and or modify it under the terms of the GNU
General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111
1307, USA.
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
If you are planning to use this software or some of its parts with
commercial or profit purposes you must apply for a different
license. Since this software was built with the effort of other
people and components produced by they has not a cost, is
necessary that you apply for a distinct license or permission in
order to allow you to commercialize the derived product.
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
Aditionally,
we
are
disclaimer license:
including
the
fifesoft
(http://fifesoft.com)
Acknowledgments
This software has been wrote using own code and third party components.
Thanks to jidesoft [http://www.jidesoft.com/] by providing us with a free license of their products
suite.
The
visual
query
editor
is
[https://sourceforge.net/projects/sqleo/].
supported
on
SQLeonardo
software
The icons used in this software was taken from diverse internet free sources, including
famfamfam [http://www.famfamfam.com/lab/icons/], fatcow [http://www.fatcow.com/freeicons], graphicsfuel [http://www.graphicsfuel.com/] (The main application icon) and others.
If you see a resource from your authority, please write us in order that your name and contact info
appear here.
About Developers
Miguel Angel Gil Rios
Main Developer
Current Job:
Teacher and researcher at Universidad Tecnolgica de Len
Brief description about me:
Hi, my name is Miguel Angel. I studied a bachelor degree in
Informatics, specialized in Software Engineering and Information Systems. I
began to work during my bachelor studies in the National Institute for
Statistics, Geography and Informatics (INEGI) as database analyst. That job
increased my interest about procedures and techniques for visualization and
data analysis. After I finished my bachelor studies in 2003, I continue working
in INEGI but, this time I began to study and learn java by myself. After a few
Java programs, I love it. After the INEGI, I began to work in a company
named RED, focused on topographic processing. In RED I made some
developments (using java) in order to preprocessing DXF files. Other
developments included software to manage and download data from topographical-gps enabled devices.
In 2006 I began to work in a Company named Quarksoft, dedicated to Software Development. In
Quarksoft I learned a new way to design and develop applications. However, that job was high timeconsuming for me and I had no time to develop my own ideas and projects. Shortly after entering to
Quarksoft, I leave it and began to study a master degree in computer sciences in the Instituto
Tecnolgico de Len. During the master studies period I learned other interesting things about data
mining and soft-computing techniques. After the master degree studies I began to work at the
Universidad Tecnolgica de Len as teacher and researcher in the area of Information Technologies.
This work has allowed me to develop many ideas and personal interests. In fact, SQL Data Workshop
was developed in my free times. I began to develop this project because my research work, in the
University, involves complex data analysis over large data amounts. However, most of rich software
information retrieval are privative and they have a cost. For this reason, I began to develop the SQL Data
Workshop Project.
If you have some comment, please contact me at: angel.grios@gmail.com
1. Description
SQL Data Workshop is a free open source SQL Query builder front end that allows to you
create and display complex sql queries easily. It supports most of commercial DBMSs like
Microsoft SQL Server, MySQL, Hyper SQL, Derby and Postgre SQL. Support for more DBMSs will be
incorporated in future versions and updates.
SQL Data Workshops User Graphical Interface allows to you design complex queries involving
multiple tables in an agile, single and friendly environment.
Once you have downloaded the Windows setup software version, install it just like a typical
Windows setup program.
1. Accept license agreement.
3. Wait while setup finishes and you will have your software installed with the selected
shortcuts.
4. After setup has finished, you will start the application using the desktop shortcut (if you
selected it) and from the Start Menu.
6
3.2
In order to use the program in Linux/Unix and Mac OS environments download the
correspondent .tar or .zip compress file.
Then, ensure that you have execution privileges on SqlDataWorkshop.sh,
SqlDataWorkshop-DebugMode.sh and SqlDataWorkshopMemManager.sh files. If not, open a
terminal, go to the path where you unzip the downloaded file and type these three
commands:
chmod 755 SqlDataWorkshop.sh and press Enter
chmod 755 SqlDataWorkshop-DebugMode.sh and press Enter
chmod 755 SqlDataWorkshopMemManager.sh and press Enter
Once you have set the execution privileges to the files indicated above, you can start the
application by doing double click on SqlDataWorkshop.sh or by typing
./SqlDataWorkshop.sh in a terminal.
1. Menu Bar: Here you will find all program actions and features.
2. Toolbar: Here you will find the common functions in a fast way to open and save projects
and files, managing database connections and statistical and charting functions.
3. Database Explorer: Here you will find databases tables and views in order to query it.
4. Project Explorer: Here you will find projects contents and elements.
5. System Console: Here you will find system events and status but also including too error
descriptions.
6. Results Window: Here you will find results occurred after you perform some function or
statistical process.
7. Workspace: This is the main work area. New documents and query spaces will be
displayed in this place.
In order to open a connection with some database server or standalone database, go to menu
Database>New Connection, or press Ctrl+Alt+N or clic in the new connection button on the database
toolbar.
10
In this window you need to choose some database management system or standalone database
type.1 In this example, we will open a connection with a MySQL instance:
If all parameters are correct, you will be connected with the selected database instance.
At version 0.8.5 only some database providers are supported. However in future releases will be incremented. This is because we need
to implement specific database vendor SQL dialects in order to obtain a better performance than SQL standard on advanced and complex
queries.
11
5.2
Closing a current connection with some database management system or standalone data
file is very easy. Simply go to Database>Close Connection menu or click on the close button and the
current connection will be closed.
Warning: Closing a connection automatically will close all query workspaces that you
currently opened when that connection was created.
12
The fast way to start querying for data is doing double click over some database table or
view in the databases explorer window.
In this way a new query workspace is displayed and you can type the SQL queries that you
want against any existent database. Please note that you must to select some database which you
want to query.
13
If your query have not SQL syntax errors, the results will be displayed in a grid. You can
show and/or hide fields every time in the left panel to the data grid simply by checking each field
definition.
6.2
If you want to design queries in a visual way, simply go to menu File>New Workspace or
press Ctrl + N and a new visual query workspace will be displayed.
Then you are ready to design complex queries in an easy, fast and comfortable way.
14
In the next combo to the database combo, you can choose distinct database object types.
For example, your query could have a mixture of tables and views.
To start designing you query simply drag objects over the design space or perform a
double click over them.
15
Notice that you can switch between SQL code and Visual Design. However, if you made
manual changes to the query code, they will be detected by the visual engine and the diagram will
be reloaded in order to reflect your changes.
If you see the generated code when you perform a query using linked tables, you will
notice that by default an INNER JOIN sentence is generated in order to link the tables.
16
However, you can alter the link command for a LEFT OUTER JOIN, RIGHT OUTER
JOIN or FULL OUTER JOIN instead of INNER JOIN2.
6.3
SQL Data workshop was primary created to act as DML (Data Manipulation Language)
software rather than a full DBMS administrator. However, it includes support to run SQL Scripts
using the standard SQL semantic but also you can include custom functions depending on each
DBMS vendor.
In order to create a new SQL Script go to menu File>New Script or press Ctrl + T.
Data projects are focused in allows to you to have backups of relevant data for you in your
local media. In this way, you can query for that data every time that you need. This feature is in a
very early stage. For this reason only a few and limited features are provided in this version.
However, we are working in improve the possibilities of work with data projects.
A Data Project is a physical directory on your hard disk that contains several definition files
although a HSQL database engine in order to support the data that you download from databases.
Data project contains Snapshots of your relevant data.3 For example if you perform a
hard query, sometimes you want to store the retrieved data. In a classic way, you can select the
data directly from the table, copy it and paste it into spreadsheet software like Microsoft Excel or
Open Office Calc. However, SQL Data Workshop allows to you to create a Snapshot of that data
and retrieve them every time. You can store, copy, distribute, backup and open your data projects.
In order to create a new data project go to menu File>New Project or press Ctrl+Alt+P or click
on the New Project button on the tool bar.
Some DBMS like MySQL for example, does not support FULL OUTER JOIN clauses directly. In this case you must instead perform
two separated queries (one using LEFT OUTER JOIN and other using RIGHT OUTER JOIN) and after use the UNION clause to join
both results.
3
In future releases, Data Projects will include support to spreadsheets-based data.
17
Next step is configuring some settings in the New Project Wizard window that will
launched after you select the New Project option.
In the above screen you need provide a project name and a directory where the program
will create the projects directory. If all settings are correct, the project folder and its default
contents will be created too.
18
7.2
Once you have created a new data project, you can open it and start working with it. In
order to open an existent data project, simply do a double click on the project name in the
Projects window.
If your project does not appear in the Projects window go to File>Open Project or press
Ctrl+Alt+O.
19
When you open a data project you can access to their elements. A data project structure is
in this way:
On the same way, Snapshots Features have properties and you can identify it in a very
easy way.
First, features have different colors to identify it from others.
A yellow rhombus represents a numeric feature with not associated metrics.
A green rhombus represents a numeric feature with associated metrics. Metrics are
associated when you perform a full spread analysis over the entire snapshot. This will
covered on next chapter.
A blue rhombus represents a nominal feature. Nominal features have char sequence
values and they are descriptive. For example, a name or an address field.
If you perform a double click over any feature, the program will display the most information
associated with that feature in the results window. For example, if you do double click over an
item labeled with a green rhombus, program will show something like the picture below.
20
7.3
You can create snapshots in several ways. In this topic we will to create a new Snapshot
using an existent data source.
Creating snapshots using existent data sources is the easiest and fast way. You must have
an opened data project. Then, perform some query and obtain results from the database.
After, go to File>New Snapshot or press Ctrl+Alt+S. This will display a wizard to configure the
new snapshot.
21
First, select a data source. In this case, select the option Opened Dataset in order to display
your opened documents containing table results.
22
In the next section, you need to type the snapshot name and select the project which the
snapshot will be associated.
Finally, press the Finish button and your snapshot will be created.
23
7.3
Deleting Snapshots
SQL Data Workshop allows to you to delete Snapshots. To delete a Snapshot follow this
three steps:
24
2. Go to File>Delete Snapshot.
7.4
Snapshots allow you to obtain basic spread statistical information of their numerical fields.
In order to calculate it, go to menu Stat>Descriptive Statistics>All Snapshot Numeric Columns or press
Ctrl+Alt+C.
After this, a progress window will be displayed in order to show you the overall operation
progress.
25
When the process finishes you will see that some features color changes to green. This
means that these features now have metrics that you can query.
From this moment, if you do a double click over the peso feature, the results console will
display all statistical information about that field.
8. Using Statistics
SQL Data Workshop has some basic statistics functions. They have different behaviors
depending on the user context actions. Statistical context behavior is used for example, when
you select some values in a column on a data grid and after you press the Mean button; the
mean for the selected values will be calculated and displayed. But, if you select a projects
snapshot and after press the same button (Mean), the mean will be calculated using all data
stored in that snapshots column.
Statistical functions are applied to any selected data in a data grid. The table below
describes the function associated with each icon.
26
Menu
Icon
Function Description
Stat>Average
Mean
Stat>Minimum
Minimum value
Stat>Median
Median value
Stat>Maximum
Maximum value
Stat>Variance (Sample)
Variance Sample
Stat>Variance (Population)
Variance - Population
In order to use some statistic measure, follow next steps to calculate the mean for some
selected values.
1. Open an existent Snapshot or perform some query.
27
4. Wait while the program obtains the result. The result will be displayed in the Results
Window.
28
9. Using Charts
SQL Data Workshop includes some basic charting functions and two chart types. Charting
functions has different behaviors depending on the user context actions. Chart context behavior is
used for example, when you select some values in two columns on a data grid and after you press
the histogram chart button; the chart will be created using your selected data. But, if you select a
projects snapshot and after press the same button (the histogram chart button), you will see a
dialog asking you for the selected column to chart and after, the chart will be generated using all
data stored in that snapshots column.
Moreover, SQL Data Workshop implements two chart types: rich charts and scientific
charts. Rich charts are more flexible and offers best interactive user experience. However, rich
charts are limited for data amount. On the other hand, scientific charts allows to chart large data
amounts with good performance but offer a less interactive user experience.
Choosing between rich or scientific charts is an automatic software decision based on the
data amount to be charted. However, in future releases we hope to allow to the user to select the
chart type.
9.1
Histogram Charts
Histogram charts are also known as bar charts. In order to create a single histogram chart,
select first some values in two columns on a data grid or select a project snapshot.
29
Next, go to Graph>Histogram or press the Histogram button [ ] and select the categorical
and the numerical field in the dialog. The categorical field identifies the bars name. Numerical field
set the values to each bar.
9.2
Grouped-Histogram Charts
Grouped histogram is a chart containing group of charts. For example, suppose to have 3
columns: country name, film rating and the total rental of movies for that country by rating. Next
picture shows better the concept:
30
31
Next, select data from 3 columns (at least one of the three columns must be contain
numerical values). In this example, we will to select only few records.
] and
32
The group field is used as the main chart group classifier. Each group contains several
categories. In this case, we are interested to display a chart containing the rental rates in each
country by rating. Then, your group field is the country_country field, your categorical field is the
film_rating column and finally, the rental rate values are contained into the total_rental
column.
The chart will looks like next picture.
33
As you see, in the x-axis the countries are displayed. In the y-axis the rental rate is
displayed. And, each country has several bars (identified by colors). Each color represents a unique
film-rating.4
9.3
Linear Charts
Linear charts contain groups of sequential points linked by lines. Ways to create linear
charts are different for snapshots and selected data from data grids. Both manners will be
explained.
In order to create a linear chart selecting data from a data grid, first perform some query
or open any snapshot. Then, select some numeric values in one or more columns. Each column will
form an independent linear serie.
] and the
In this version you cannot change the bar color. This feature will be implemented in future releases.
34
In order to create a linear chart using a snapshot you must select first the snapshot in the
projects window. Then, go to Graph>Linear Multiple Columns or press the Linear Chart button [
].
This will open a dialog showing all numeric available fields in order to select those fields that you
desire to chart.
Once you have selected the columns to be charted press the Accept button and the chart
will be generated.
35
9.4
Scatter Charts
Scatter charts shows show disperse are data based on their position. That position is given
by two values in distinct columns. In order to generate a new scatter chart select some data in two
numerical columns or select a snapshot.
].
36
Finally, select the fields for the x-axis and y-axis. After this, the program will to display the chart.
37
9.5
Grouped-Scatter Charts
Grouped-Scatter Charts are scatter charts with support to visually separate groups of data.
The procedure is the same as the scatter chart but additionally, you must to select a groupcategorical field. In order to generate a grouped-scatter chart, select some data in three columns
(at least two of the three columns must contain numerical values) or select a snapshot. Then, go to
Graph>Grouped Scatter or press the Grouped-Scatter Chart button [
9.6
Spider-Web Charts
Also known as Radar Charts, this type of charts are more suitable for present data trends
in form of a ring. In order to create a spider-web chart, select data from two columns in some data
grid (at least one column must contain numerical values) or select some snapshot.
38
].
Select the categorical field and press Yes and the chart will be created and displayed.
39
9.7
Grouped-Spider-Web Charts
Grouped-Spider web charts are similar to single spider-web charts. However, GroupedSpider-Web charts allow you to manage a group field. In order to create a grouped-spider-web
chart, select data from three columns in some data grid (at least one column must contain
numerical values).
Select the group, category and values fields. Press Accept and the chart will be created and
displayed.
40
Changes on memory settings will be applied after you exit and open again the program.
However, if after doing memory settings changes the program cannot open more, you can restore
the default settings running the memory setup program following next steps.
41
On
Windows
Operatig
Systems
Programs>SqlDataWorkshop>SqlDataWorkshopMemManager:
Go
to
StartMenu>All
42