








|
Database
With the database tools you can insert a set of session log files to database.
In the database a session log is stored in a set of tables, one table for every event type in the session log.
When a session is stored in a database all events can be identified by a session group identification name,
a session number, event number.
All event types and generated tables are described at
Event Types
in the left menu.
In order to use the database tools a database server must be installed,
and a user with access rights created in the database server.
|
|
Install a database
In order to use the database tool a database server must be installed, and a database server user created.
Step 1
|
Install a database server
If you need help with installing the database server ask your system administrator for advice.
|
Step 2
|
Create a database server user account
Below is one example for how it can be done in MySQL. If you need help with creating a database server user account ask your system administrator for advice.
"user1" below is supposed to be changed with, for example, a user name.
"password" below is to be changed with a real password.
|
|
Example:
|
C:\> C:\Mysql\bin\mysql --user=root mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO user1@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO user1@"%" IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> \q
|
|
Step 3
|
Test the new User account by logging in on it
"user1" below is supposed to be changed with the user name.
|
|
Login test:
|
C:\> C:\Mysql\bin\mysql --user=user1 --password
|
|
Step 4
|
Test the user account by creating a test database.
|
|
Example:
|
C:\> C:\Mysql\bin\mysql --user=user1 --password
mysql> create database test;
...
mysql> show databases;
...
|
|
Configuration
To make it possible for the C3Fire environment to establish contact with the database server
you must give information about database that you are using.
The C3Fire environment needs to know what database driver to use,
and the IP number and the port that the database server is listen on.
If you need help with configuration of the database server ask your system administrator for advice.
Usage
Step 1
|
Specify the database driver.
Example: 'com.mysql.jdbc.Driver'
|
Step 2
|
Specify IP Nr for the server on which your database server is located.
Example: '192.168.253.19'
|
Step 3
|
Specify the port to the database server.
Example: '3306'
|
Step 4
|
Press the 'Update' button.
|
Figure 1. Example on a Configuration user interface.
Management
With the database management tool you can make a connection to an already existing database
or you can create a new database.
If you creates a new database, it is necessary to connect to the database server
first and then create the database.
If you managed to establish contact with the database server the small picture in
the foot panels right corner changes from all red,
,
to gray and red, .
The gray symbolizes your contact with the database server.
Further, if you also managed to establish contact with the database the small picture
in the foot panels right corner changes from gray and red,
,
to all gray, .
The gray symbolizes your contact with the database server and the database.
Make connection to an already existing database:
Step 1
|
Specify the name of the database you want to have contact with.
Example: 'C3Fire55'
|
Step 2
|
Specify the name of user.
This is the name corresponding to 'user1' when you where granted permissions above.
Example: 'helena'
|
Step 3
|
Specify password for the user.
This is the password corresponding to 'password' when you where assigned a password above.
Example: 'f67ddg'
|
Step 4
|
Press the 'Connect' button.
|
Create a new database:
Step 1
|
Specify the name of user.
This is the name corresponding to 'user1' when you where granted permissions above.
Example: 'helena'
|
Step 2
|
Specify password for the user.
This is the password corresponding to 'password' when you where assigned a password above.
Example: 'f67ddg'
|
Step 3
|
Press the 'Connect' button.
|
Step 4
|
Press the 'Create New Database' button.
|
Step 5
|
In the opened window give the database to be created a name.
Example: 'C3Fire56'
|
Step 6
|
Press the 'OK' button in the Create New Database window.
|
Now the new database is created and with it, the tables needed for inserting log information.
Before you can use the new created database you need to connect to the new database.
This procedure is the same as above.
Step 7
|
Specify the name of the database you want to have contact with.
Example: 'C3Fire56'
|
Step 8
|
Specify the name of user.
This is the name corresponding to 'user1' when you where granted permissions above.
Example: 'helena'
|
Step 9
|
Specify password for the user.
This is the password corresponding to 'password' when you where assigned a password above.
Example: 'f67ddg'
|
Step 10
|
Press the 'Connect' button.
|
Figure 2. Example on a Management user interface.
Add Log Information
With this tool you can insert a set of sessions to the created database.
You should define the directory that contains all sequences of sessions that you want to insert to the database.
The database tool searches recursively in the directory and inserts all session log files that it founds.
For more information about the event types and database tables that are created see
Event Type in left menu.
The Database tool assumes that all files have been organized by the
sequence grabber.
And that you have used the
Version Update
to make the log files ready for processing.
Further, you must be connected to a database. The icon
symbolizes if you have contact with the database server and that a database is connected.
The name of the database that you are connected to can be viewed at the top of the 'Query Shell' tab.
Usage
Step 1
|
Specify the name of the directory structure you want to have session log file data inserted to database from.
Example: 'C:/exp/set1/A'
Then it should exist a directory namned 'SessionLogs' in 'C:/exp/set1/A'
that contains all sessions that should be added to the database.
C:/exp/set1/A/SessionLogs/c3fire-1/c3fire-1.log
C:/exp/set1/A/SessionLogs/c3fire-2/c3fire-2.log
...
C:/exp/set1/A/SessionLogs/c3fire-9/c3fire-9.log
|
Step 2
|
Press the 'Insert' button.
|
Figure 3. Example on an Add Log Information user interface.
Table session_groups
One of the tables that exist in the database is session_groups. This table is different from the others,
it contains information concerning what experiment groups an inserted event belongs to.
In the table session_groups there are three columns.
The first, ' nr ' is the identification number for a group.
The second, 'name' is the name of the group.
The third, 'member_of_group' is the identification number to the group that this group belongs to.
With this group definition you can define groups and sub-groups structures.
Example :
You can have one group named 'set2' that contain 5 sub-groups named, 'uug1', 'uug2', 'uug3', 'uug4', 'uug5'.
Then the group 'uug5' can contain six sub-groups, 'uug5g', 'uug5i1', 'uug5i2', 'uug5i3', 'uug5i4', 'uug5i5'.
The groups 'uug5g' etc. have a sequence of sessions. See structure below, figure 4,5,6.
If you want to insert set2 then you should select the set2 directory and press insert.
Then the inserted session events will be connected to a group that has names that are
similar to 'set2.uug5.uu5g', 'set2.uug5.uu5i1' etc.
Table session_groups example.
Figure 4. Table session_groups example.
|
|
|
|
|
set2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uug1
|
|
uug2
|
|
uug3
|
|
uug4
|
|
uug5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uug3g
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uug5g
|
|
uug5i1
|
|
uug5i2
|
|
uug5i3
|
|
uug5i4
|
|
uug5i5
|
|
Figure 5. Tree structure of table session_groups example.
|
|
Figure 6. Directory structure.
|
Query Shell
The Query Shell user interface contains three parts, question window, answer window and notepad window.
From notepad window you can do cut and paste to question window.
The text in the Notepad window can be saved and loaded.
Answers from the database is viewed in the answer window.
In the upper left corner of Query Shell you can see what database you are connected to.
Usage
Step 1
|
Specify a SQL query in question window
Example: 'show tables;'
|
Step 2
|
Press the 'Send Query' button.
|
Step 3
|
Answer from database will be found in answer window.
|
Figure 7. Example on a Query Shell user interface.
|