ibaAnalyzer-DB v2.0 en
ibaAnalyzer-DB v2.0 en
Manual
Issue 2.0
Manufacturer
iba AG
Koenigswarterstr. 44
90762 Fuerth
Germany
Contacts
This manual must not be circulated or copied, or its contents utilized and disseminated,
without our express written permission. Any breach or infringement of this provision will
result in liability for damages.
© iba AG 2018, All Rights Reserved
The content of this publication has been checked for compliance with the described
hardware and software. Nevertheless, deviations cannot be excluded completely so that
the full compliance is not guaranteed. However, the information in this publication is
updated regularly. Required corrections are contained in the following issues or can be
downloaded from the Internet.
The current version is available for download on our web site http://www.iba-ag.com.
Issue Date Revision Author Version SW
2.0 02-01-2018 Revised edition RM 6.10.0
Table of Contents
ii Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
1.2 Notations
In this manual, the following notations are used:
Action Notation
Menu command Menu Logic diagram
Calling the menu command Step 1 – Step 2 – Step 3 – Step x
Example:
Select the menu Logic diagram - Add - New function block.
4 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
The non-observance of this safety information may result in an imminent risk of death or
severe injury:
From an electric shock!
Due to the improper handling of software products which are coupled to
input and output procedures with control function!
The non-observance of this safety information may result in a potential risk of death or
severe injury!
The non-observance of this safety information may result in a potential risk of injury or
material damage!
Note
A note specifies special requirements or actions to be observed.
Important note
Note if some special features must be observed, for example exceptions from the rule.
Tip
Tip or example as a helpful note or insider tip to make the work a little bit easier.
Other documentation
Reference to additional documentation or further reading.
Example
Configuration and application examples for a better understanding
Issue 2.0 5
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
2 Introduction
6 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Important information
Depending on the availability of the ODBC driver and/or on the Database Client
Software (32 or 64 bit), the 32 or 64bit version of ibaAnalyzer is required.
Two versions of the installer are available:
- The 32 bit version: ibaAnalyzerInstall_x86_v6.x.y.exe.
- The 64 bit version: ibaAnalyzerInstall_x64_v6.x.y.exe.
Only one of these versions can be installed on one computer (v6.10.0 or higher).
Issue 2.0 7
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
3 Installation
If ibaAnalyzer has been installed without database support it is possible to add it later by
starting one of the batch files ("reg_dataextractor.bat" or "reg_dataextractorMC.bat") in
the home directory specified during the installation of ibaAnalyzer (default: C:\Program
Files\iba\ibaAnalyzer) or by rerunning the installation procedure and selecting one of the
database options.
8 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
The procedures required to install the necessary database components are described in
the chapter "Setting Up Databases".
Issue 2.0 9
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
If the database connection has not been previously configured the following default
configuration will be shown. Otherwise the previously selected configuration will be
shown.
The following describes the steps needed to link ibaAnalyzer to the selected and
configured database.
10 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
4.1.1 SQL-Server
Database provider
Select <Sql-server>
Database name
Enter name specified during database installation
Computer
Select <Local machine> or enter the name of the <Database server>\<Instance>
If the Database server is the localhost the following notation with wildcard "." is possible
".\<Instance>". (see example on previous page)
Authentication
Select either:
Use Windows NT authentication or
Specify authentication info "Username" and "Password"
Issue 2.0 11
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
4.1.2 ODBC-Database
For ODBC Databases (MySQL/MariaDB, PostgreSQL, MS Access, SQLite, …) use DSN
(Data Source Name) configured in the "ODBC Data Source Administrator" (Control
Panel "Administrative Tools" Data Sources ODBC):
12 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
4.1.2.1 MS-Access
In a simple local test environment with an ODBC connection to Microsoft Access, only
the ODBC-DSN needs to be configured.
Verify if MS-Access ODBC driver is available in ODBC DSN Administrator:
If the driver is not available it can be downloaded from the Microsoft website.
We recommend using/creating a System-DSN:
Issue 2.0 13
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Select ODBC-database as "Database provider" and use the DSN (Data Source Name)
as "Database name":
4.1.2.2 MySQL/Maria-DB
For both MySQL and Maria-DB we recommend the ODBC driver (32 or 64 bit) of MySQL.
14 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Select ODBC-database as "Database provider" and use the specified DSN as "Database
name":
4.1.3 PostgreSQL
For PostgreSQL use the ODBC driver (32 or 64 bit) and add/configure a System DSN:
16 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 17
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Select ODBC-database as "Database provider" and use the DSN as "Database name":
18 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
4.1.4 SQLite
For SQLite use the ODBC driver (32 or 64 bit) and add/configure a System DSN:
Note
Note: BLOBs are not supported for SQLite.
Select ODBC-database as "Database provider" and use the DSN as "Database name".
Issue 2.0 19
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
4.1.5 Oracle
If Oracle is used, the Local Net Service Name (TNS-Name), configured in the Oracle
client software (see $ORACLE_HOME\NETWORK\ADMIN\tnsnames.ora) must be
specified in the "Database name:" field and then instead of OS-identification ("Use
Windows NT authentication") the use of an oracle username and password is
recommended throughout the database system.
Important information
For oracle client installation it is necessary to install the OLE DB option, which is not
included in standard installation types.
20 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 21
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
4.1.6 DB2-UDB
For DB2-UDB we recommend using the OLE DB client interface provided via IBM
Software:
Select DB2-UDB as "Database provider" and use the database alias name configured in
the DB2-UDB client software as "Database name:".
22 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Unsuccessful connection
Issue 2.0 23
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Important information
The names must be compatible with the naming restrictions of the employed database
system. For example, if Oracle is used and the database support type "MC extractor" is
installed, the maximum length for the "Segments" name is 23 characters, since 7
characters are required for the segment table suffixes "_CountT" and "_CountL"
24 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 25
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
5 Data Extractor
The Data Extractor window can be opened in ibaAnalyzer by one of the two methods
shown in the figure.
Extract to database
The "Extractor output" tab is displayed automatically in accordance with the selected
database type.
26 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Click <OK> and select <Database connection> (see chapter "Configuring the database
connection, page 10")
Each Data Extractor tab contains the following buttons:
<Extract now>
The database tables will be filled based on all the current settings in the „Data Extractor"
window.
<OK>
All current settings in the "Data Extractor" window are saved and window is closed.
<Cancel>
All settings changed after the "Data Extractor" window was opened are discarded and
window is closed.
Issue 2.0 27
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
28 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
"Database:"
This displays the connected database type.
<Database connection>
This opens the "Database connection" window (see chapter Configuring the database
connection, page 10).
<Create default tables>
This creates tables in the database with the names specified in the "Database
connection" window. See chapter Specify database table names, page 24.
When you click this button, ibaAnalyzer-DB checks whether the database already
contains tables with the same names. If there is no conflict with existing objects, tables,
indexes and constraints the tables are created. If tables with the specified names already
exist, ibaAnalyzer-DB will ask if these should be replaced.
Issue 2.0 29
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Important information
The naming conventions of the connected database must be adhered to, e.g. avoid
blanks, special characters, etc.
Important information
Use the "Tables Refresh" command in the database to ensure that the transaction results
are displayed.
30 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Important information
Ensure user privileges. In multiuser environments only the application administrator
should be the object owner. Other users should have different database logins with
appropriate restrictions (e. g. only SELECT privileges).
Issue 2.0 31
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Database connection
See chapter Option Extractor Database Library (Standard), page 29
Create default tables
See chapter Option Extractor Database Library (Standard), page 29
Use transactions
See chapter Option Extractor Database Library (Standard), page 29
Extract microseconds column
See chapter Option Extractor Database Library (Standard), page 29
Delete duplicate file rows
See chapter Option Extractor Database Library (Standard), page 29
Store .dat file location as UNC path
See chapter Option Extractor Database Library (Standard), page 29
Extract descending segment numbers
This option adds a new column "_ReverseSegmentNr" to the segment table, which
numbers the segments in reverse order.
32 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Deactivated:
Activated:
Issue 2.0 33
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Important information
"Create default tables" does not delete additional segment tables.
Note
A value of 0 (Zero) in the segment table index denotes the reference to a segment table
without counter at the end of its name. Values n > 0 represent a reference to segment
tables with the number n+1 at the end of their names.
Important information
Additional segment tables are created dynamically during the extraction, similar to the
creation of new columns in segment tables.
34 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Important information
If the selection is altered additional channels will be created and the previous channels
will remain. No channel will be deleted!
If <Comment 1> is selected and a signal does not have a first comment, the channel
name is used instead. If <Comment 2> is selected for a signal where "Comment 2" is not
available, "Comment 1" is used, if that is also missing, the channel name is used.
Important information
Note that comments are not stored separately in the database. If the column names are
generated from one of the comments, the original channel (signal) name will not be
transferred to the database and it will be lost.
When creating the default tables, a message will appear if tables with the specified
names already exist. If the message is confirmed, all data stored in those tables will be
lost ("drop table"). This is a quick way of deleting existing database tables when
reinitializing.
Issue 2.0 35
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Important information
„Create default tables" does not delete any tables which were created when the option
„Start a new segment table every <N> columns" was selected. These must be deleted
manually in the database.
36 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Column "Blob"
Data is stored as a Binary Large OBject (BLOB). For details see chapter Using BLOBs,
page 59 .
Note
If the BLOB-option is used, the statistical values are only accessible by a user defined
de-compress program - not by ibaAnalyzer!
Note
If the BLOB-option is used, the option „Values in segment" is unavailable.
Column "Mode"
Use the drop down list to select a sampling mode in an empty cell in the "Mode" column
of the "Segment archive profiles" window.
Column "Size"
Select the adjacent cell in "Size" column and enter a multiplier to determine the sampling
cycle for the extracted data (e.g. 10 s = "Size (10)" x "Mode (Time(Seconds))".
For the "Time" and "Length" modes, it’s possible to enter a "Size" < 1 in order to obtain
fractions of the "Mode" unit. Fractions of the mode "*signal time base", of course, make
no sense, e. g. a temperature that was measured every minute need not be extracted
every 100 ms. If the recording signal time base is 1 ms, the sample 100 ms profile could
Issue 2.0 37
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
also be defined by "Size" = 100 and "Mode" = "* signal time base".
By using the modes "Time segments" or "Length segments" it is possible to define a fixed
number of equidistant time or length segments. For example "Size" = 1 and "Mode" =
"Time segments" means that only 1 segment value for the whole data channel is stored.
If parts of the source signal are invalid, then extracted segments containing these will be
empty. If the empty segments are at the beginning or end of the signal, they will not be
transferred to the extracted data. If the empty segments lie between valid segments,
then the extracted data will contain corresponding gaps of invalid values.
The mode "Time, non-equidistant" is not supported and leads to the following error
message.
Column "Name"
Select the adjacent cell in the "Name" column and enter a profile name.
It is advisable to use a name which reflects the chosen sampling period for the extracted
file (e.g. "10 s" = Size (10) * Mode (Time (Seconds)).
38 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Signal selection
Signals must be assigned to the created profiles.
Select any number of the signals to be included in the extracted data using the check
boxes in the Signal selection window. The extracted signal values are the averages of
the source signal values within the selected sample cycles.
When checking a module node in the "closed" tree view all signals belonging to that
module will be checked, or unchecked. Before assigning individual signals the module
tree has to be opened by clicking on the + symbol. The checked signals are always
assigned to the marked profile (gray background color). When changing the profile, the
checkmarks in the checkboxes disappear.
Multidimensional expressions (logicals, expressions on logicals and the new vectors
from a data file) can be extracted to and queried back from the database. In the database
channel table a new column named "_LogicalId" ("i_LogicalId" for Oracle and IBM DB2
databases) will be created to indicate which sub-channels belong to the same
multidimensional channel.
Important information
A signal can always be assigned to only 1 profile.
Important information
Assigning a length mode to a time based signal or a time mode to a length based signal
Issue 2.0 39
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Note
If the archive profile specifies signals which are not present in the existing data file,
these will be listed under "Channels currently unavailable".
40 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Note
Obviously if the selected profile sample cycle is the same as that of the source signals,
these values are meaningless.
Values in segment
The column "_ValuesInSegment" is created in the database and contains the number of
data points compressed into each segment stored in the database.
Mark value from, Mark value to
Use "Mark value from" and/or "Mark value to" to define a beginning and end of the
extracted profile range. If either of these is not defined, the corresponding end of the
extracted profile range will be the same as that of the input signal range.
If the given expressions cannot be evaluated, an error message will occur during
extraction.
Issue 2.0 41
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Important information
You can use expressions to calculate the range from your data.
42 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Click on the source field. The field information will be transferred to the processing field.
Double click on the source field. The column line will be filled in addition to the
processing field. The "Column type" can be selected from the drop-down list, which
contains the available data types on the currently active database system. The "Column
name" can be renamed if required. Restrictions for database column names have to be
considered. The range of characters within the "Function" can be altered in the
processing window.
Note
If there is no active database connection, only "CHAR" will be displayed.
Caution
The names might not be compatible with the naming restrictions of the used database.
Issue 2.0 43
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Avoid blanks, hyphens and special characters, etc. and check the permissible length!
When marking the characters in the technostring area, be sure that the correct row in the
table above has been selected. The last marked excerpt before leaving the row or
closing the window is valid and will be stored.
Select group
It is also possible to select a group of characters from the contents of the info field.
Click on the first of the required characters, drag the mouse to the last required character
and release.
Click on <Apply>
The excerpt from the source string is transferred to the column field.
44 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
All the characters from the marked starting point to the end of the info field are selected.
Extract module names
If the option is enabled (default), the module names are extracted to the file table.
Note
If there is no need for module names after the extraction, the number of columns in the
file table can be reduced by deselecting this option.
Issue 2.0 45
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
The following message will be shown after the successful creation of all required
columns.
46 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Add line Adds a new empty line above the currently selected line.
Delete line Deletes the currently selected line.
Move line up Moves currently selected line up.
Move line down Moves currently selected line down.
Import info file Import Info Column information from text file. The "Open
text file" dialog appears.
Alternative: right click on header, select <Import>
Export info file Export Info Column information to text file. The "Save text
file" dialog appears.
Alternative: right click on header, select <Export>
Issue 2.0 47
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Note
If no group function is specified in the expression ibaAnalyzer automatically uses the
average.
48 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 49
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Mode
None: Log switched off.
Brief: Contents of log file
Filename
Enter name of diagnostic file. If daily log has not been selected this would be, e.g.:
<….>
Browse the network if required
Create logfile on day base
One log file is created for each day.
<Edit>
The selected log file can be opened in Notepad and changed as required.
50 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Important information
If logging is activated permanently, a cleanup strategy for the log files has to be
implemented externally (not part of ibaAnalyzer).
5.5.2 Notifications
The Notification tab provides 4 means of communication triggered by a selected status of
the extraction process. The following statuses are available:
On completion
Notification made when the output procedure has been completed, success or failure is
irrelevant.
On success
Notification made when report output is successful.
On failure
Notification made when any report output has failed.
On failure (1st. failure only)
Notification made when first report output has failed
E-Mail address
Enter address and select extraction mode.
Net send computer name
Enter computer name and select extraction mode.
<…>
Browse the network if required
Issue 2.0 51
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Command line
Enter command line script to be executed when extractor status achieved and select
extraction mode.
Tip
The "Command line" option is not limited to notification tasks. Any application can be
called to perform, for example, some post-processing.
52 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
5.6 Renumbering
If multiple files are opened and several signals are to be extracted from several files, it is
likely that multiple channels will have the same ID number and hence need to be
renumbered or otherwise they will not be able to be uniquely identified in the exported
media. ibaAnalyzer can do this renumbering automatically but will give a warning if it has
to do so before proceeding with the extraction.
The channel IDs are comprised of a module number and a position within the module.
The Renumbering tab allows the specification of an offset to the module numbers for
each file, hence enabling the user to prevent ID collisions and avoid automatic
renumbering.
Issue 2.0 53
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
"Active" column
Channel offsets will only be made for active files. Extraction of channels in inactive files
leads to the following message.
Important information
The original and offset channel numbers are not visible in the database. They can only be
seen ibaAnalyzer after database queries have been executed. See „Using ibaAnalyzer-DB
for Analysis"
54 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 55
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
"_Complete"
This shows the status of the extraction process. The first record of a data file extraction
always is inserted into the file header table ("deFile") with status "_Complete = 0". After
finishing all other inserts in the channel and segment tables the flag is updated to
"_Complete = 1". When querying the "deFile" table the WHERE clause should check this
"complete" flag to see whether the corresponding extraction was successful. For
databases which support transaction encapsulation (e. g. Oracle, MSSQL, DB2-UDB)
the option "Use transactions" can be selected (see chapter: Option Extractor Database
Library (Standard), page 29. In this case, the "_Complete" and the "_ErrorOnExtract"
flags are obsolete.
_"ErrorOnExtract"
This is set if an extraction error occurs.
56 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
"_TimeStampMicroSecs"
This function is enabled by selecting the "Extract microseconds column" option in the
Extractor output tab (See chapter Option Extractor Database Library (Standard), page
29).
Note
In many database systems there are data types available, which can handle
microsecond resolution. However, a separate column has been introduced for this
purpose to maintain backward compatibility.
Issue 2.0 57
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
With "BLOBs":
58 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Note
BLOBs are not supported for SQLite databases.
Issue 2.0 59
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Important information
There is one table for all values!
Important information
This table is only filled when the "Blob" option has not been selected!
"_FileID"
See chapter Database table "deFile", page 56
"_ChannelNr"
See chapter Database table "deChannel", page 58
"_SegmentNr "
Each compressed sample is assigned a segment number. The segment number is
incremented automatically for each channel, starting from 0 (zero) until the end of the
record.
"_ValuesInSegment"
This displays the number of values in the raw data file included in each segment (sample
cycle) stored in the database.
Example
Raw-data in the data file: 1 value every 10 ms.
Data extract to database: 1 value every 100 ms (= sample cycle). Here "Size" is set to
0.1 based on a "Mode" of "Time (seconds)" set in "Archive profile assignment, page 37"
60 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
"_Max"
Maximum value of signal values within each segment.
Issue 2.0 61
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Depending on the option Start a new segment table every N columns, additional
segment tables may be created automatically. This option is explained in section "Start a
new segment table every <…..> columns". This can be used to avoid database table
column number restrictions.
62 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Before inserting the segment records ibaAnalyzer-DB checks if columns for all the
channels exist. If not, the segment tables will be altered. By default, the column names
for the channels are derived from the channel number. Format and contents of MC
database table "deSegment_AvgT" in MSSQL-format:
Important information
These tables are only filled when the "Blob" option has not been selected!
Issue 2.0 63
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
64 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Important information
Deleting records does not always ensure an increase of free disk space. Depending on
the database system, additional maintenance commands or procedures may have to be
executed.
Data management strategies may also depend on related third party applications.
For example a MES or QM application gives the triggers for deletion or archiving of
records that come from product related data files. In this case a product-id reference is
required in the file table
Another part of the data management strategy covers requirements for the disk storage.
How much hard disk space (e.g. to store data for 100 days) is required to implement
ibaAnalyzer-DB? By using information from the database supplier it is possible to
calculate the different record lengths, the index space requirements and so on. In reality
it is better to simulate typical data processing and monitor the space consumption. It is
very easy to configure a typical database extraction process using some test data.
Using the extracted measurement data together with further data in a production or
information system environment sometimes requires additional INDEXES for
performance tuning or information columns that will be filled from external procedures.
All the "insert" statements of ibaAnalyzer-DB are "fully qualified". Therefore adding
Issue 2.0 65
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
66 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 67
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
It is possible to create standard queries without any knowledge of SQL (Structured Query
Language). Query Builder opens the following window.
Conditions
In the "Query Builder", conditions can be defined that are based on the contents of the
main fields in a file table. When clicking on the drop down button in the "Field" column a
selection of available fields pops up.
These fields are the same as shown in the database file table. Apart from the standard
fields such as _FileID, _TimeStamp, _FileName or _FileType you can also select
self-created fields from the technostring field assignment, e.g. 'STRIP_ID'.
68 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
A condition can be selected from the options made available by clicking on a cell in the
"Cond" column.
The comparator, which must be compatible with the database format, is entered in the
"Value" column.
Several rows of queries can be entered which are then automatically combined by AND
keywords.
If the database field type of the chosen field is "Date" or "DateTime", a calendar pops up
automatically when the drop down button is selected.
If data extracted from different data files (different ibaPDAs or recorders) are associated
by a common identifier, such as for example, the material-id, and these are to be
merged, a "sync field" can be defined (see chapter: MC-format segment tables, page
61).
Issue 2.0 69
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
If the "sync field" option is used, all queried records (data files) that belong to one field
(e. g. STRIP_ID) are merged and only the sync field’s content is shown in the dropdown
list.
70 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Important information
If the "Max rows in resultset" parameter was exceeded the following message boxes are
displayed (Example: Max rows in resultset = 50). These have to be confirmed and the
query reconfigured:
<Cancel>
The window is closed without saving the query and any currently running query is
terminated.
A record can be selected by clicking on the drop down button and then on the required
record. The selected result will always be shown at the top of the tree view in the
"Signals" window.
The queried records can be handled like data files in the advanced window of the "Open
Data File …" or "Add New Data File… " dialogs.
Issue 2.0 71
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Select the required database files, decide on the option Append files on multiselect and
select <Open from File Group>
Using the Append files on multiselect option is also possible for queried data.
72 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
It is also possible to mix database queries and data files. The different data sources are
distinguished by the icons for database and for data file.
If the data files are opened and added in the "Advanced" window of the "Open/Add data
file" dialogs they will be part of the group in the multiselect bar as well as being shown in
the "Signals" window.
Issue 2.0 73
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
74 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
they will appear in the tree structure shown in the "Signals" window but not in the
multiselect drop down menu.
The signals can be selected as usual for display and further evaluation.
Issue 2.0 75
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
7.1.2 SQL-queries
It is also possible to write queries directly in SQL syntax. This option provides the full
flexibility that is available within the used database/application environment. Any table
that is accessible from the configured database connection can be used in the WHERE
condition.
File
A previously created query file can be selected
SQL select
SQL text can be written in this field.
Merge signals on database sync field
See chapter: Query builder, page 67
Add to previous query result
See chapter: Query builder, page 67
76 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Note
Only column names specified by the selected "Derive column names from:" option can be
used in the SQL query.
Note
The SQL syntax may differ depending on the used database system and connection type
(ODBC, OLEDB).
Example:
Querying Data of the last two days in SQL-Server:
SELECT * FROM PDA_File WHERE _Timestamp > (getdate()- 2)
Equivalent query in Oracle syntax:
SELECT * FROM PDA_File WHERE I_Timestamp > (SYSDATE - 2)
Issue 2.0 77
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Each record in the query result is displayed by a point having an x-coordinate equal to
the time stamp of the source file and a y-coordinate equal to the aggregate value of the
sample. These generated signals can be used in further computations. However in this
case they are first converted to equidistant signals by linear interpolation before being
used in the given expression. The sample separation of the resampled signal will be the
time interval between the closest two sample points in the original, non-equidistant
signal.
78 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Table
Select the table to be queried.
Filename field column
This column contains the filenames.
Issue 2.0 79
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Selecting this option will enable the opening of the original files corresponding to the
extracted files in the database. If the table to be queried has the iba database layout, the
correct column will be preselected.
In the "Overview" window move the cursor onto the diamond to view the name of the
source file and double click.
This option can be disabled if the original files are not required or no longer present as
the query speed is then increased. This option is not available if the option "Place result
in overview instead of signal tree" has not been selected.
Available fields
All the fields which are available in the selected table (type "defile") are displayed
Selected fields
80 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
When selecting this option and selecting the name of the appropriate sync field column in
the combo box next to it (e.g. CoilID), all rows with the same value in the sync field
column will be merged and presented as a single data point in the trend query. The
"Selected fields" will be displayed under "Trendquery results" in the "Signals" window
Issue 2.0 81
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
The timestamp of the data point will be the earliest in the merged rows and the values of
the data point will be the first non 0 (Zero) values in the selected numeric or string
columns when the merged rows are sorted by the timestamp (or the values will be
0 (Zero) if 0 (Zero) or NULL values are present in the merged rows for the selected
numeric or string columns).
Add to previous query result
See chapter: Query builder, page 67
Place result in overview instead of signal tree
This option puts the trend query result in the "Overview" window instead of the signal
tree.
Note
Note that the option "Add to previous query result" is grayed out when this option is
selected. This is because there can only be one query result (possibly comprised out of
several signals) present at a time in the overview. Any previously executed trend query
result in the overview will be replaced when continuing with the query.
<New Query>
See chapter: Query builder, page 67
<Save as SQL>
See chapter: Query builder, page 67
82 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
<Query>
Each field in the result set will generate a signal with a name which is the same as the
fieldname. The signal will be added to the signal tree under the "Trend query results"
node.
<Cancel>
See chapter: Query builder, page 67
<Import>
Exported Trend Query Builder settings can be imported. The current settings are
overwritten.
<Export>
Trend Query Builder settings are exported as an .ini file.
Issue 2.0 83
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
SQL instructions can be entered into the "SQL-Trendqueries" window in order to acquire
the trend graph data.
File
See chapter: SQL-queries, page 76
SQL select
See chapter: SQL-queries, page 76
Merge signals on database sync field
See chapter: Query builder, page 67
Use first numeric column as microsecond part of timestamp
Note
Obviously this column should contain the correct data type, otherwise the result will be
meaningless
84 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 85
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
The results generated by the queries can be seen in the signal tree under the "Trend
query results" node. These can be dragged or double-clicked to display them in the
graph view.
To remove the query result from the signal tree right click on the result or on the "Trend
query results" node and select "Clear trend query results" in the drop down menu. The
query results can also be cleared by selecting "Close all data files". This can also be
done from the "File" drop down menu. A query result in the "Overview" window can only
be erased by a new query.
86 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
The trend queries can be shown in the "Overview" window. Calculations cannot be
performed on trend queries placed in this window. However the "Overview" window has
functions which are not available for trend queries placed in the main graph window.
Specifically, the overview can be used to query the database for the extracted or source
files that correspond to the data points of the trend query result in the overview and open
the original data files corresponding to these extracted files (drill down functionality).
The graph that depicts the signals resulting from the trend query result is very similar to
the standard ibaAnalyzer graph. Signals can be dragged and dropped on to the same
Y-axis within the graph (but not out of the graph). The zoom buttons in the ibaAnalyzer
toolbar will also work, provided that the overview is the active window (i. e. the last
clicked window).
Issue 2.0 87
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
7.3.2.2 Markers
A pair of markers is available in the overview graph. These are like the normal markers
except they have a diamond located at roughly 2/3rd of their height. These markers can
be dragged by either the thick outer ends or the diamond. Pressing the <Ctrl> key while
dragging the markers causes them to jump to the next data point.
A tool-tip will appear when the mouse hovers over a marker’s diamond containing the
exact timestamp of the data point it is on and the action it will perform if you double click
on the diamond. Depending on the settings this will either open the original file or query
the database for the extracted file.
Pressing the <Ctrl> key while double clicking opens or queries all the files encompassed
by the markers and appends them.
Note
The area to the right of a data point "belongs" to the file of that data point.
The time range visible in the graph window is highlighted by the green rectangle in the
overview window.
88 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
A right click on the diamond opens a drop down menu of drill down options.
Note
The area to the right of a data point "belongs" to the file of that data point.
Issue 2.0 89
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
<Setup …>
Will open the "Preferences" dialog with the tab showing the options for the overview
selected.
90 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 91
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
92 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
8.1 Overview
A database is an organized collection of data, typically stored in electronic format.
Data can be input, managed, organized, and retrieved quickly.
Traditional databases are organized by records (rows), fields (columns) located in
tables which are stored in the database files.
A database table is a collection of rows and columns that is used to organize information
about a topic. Each row within a table corresponds to a single record and contains
several attributes that describe the record.
These tables are stored in databases
Issue 2.0 93
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
A relational database is a collection of data tables all of which are formally described and
organized according to the relational model. Each table must identify a column or group
of columns, by means of the PRIMARY KEY, in order to uniquely identify each row.
ibaAnalyzerDB creates the following types of tables (see chapter: Database format
options, page 56)
Referential Integrity (RI) is a database concept used to ensure that the relationships
between the database tables remains synchronized during data modifications. RI can be
used to ensure the data is consistent, may be helpful in optimizing the database
environment and can assist in early detection of errors.
A combination of PRIMARY KEY and FOREIGN KEY constraints can be used to help
enforce referential integrity of the database. In addition to a foreign key referencing a
primary key constraint, a foreign key can also reference a UNIQUE constraint to help
maintain referential integrity.
94 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Normalizing a database
Normalization is the process of organizing data in a database that includes creating
tables and establishing relationships between the tables. The following normalization
forms are used to help eliminate redundant data
Five normalization forms (NFs)
1NF: Eliminate Repeating Groups
2NF: Eliminate Redundant Data
3NF: Eliminate Columns Not Dependent on Key
4NF: Isolate Independent Multiple Relationships
5NF: Isolate Semantically Related Multiple Relationships
General structure in database management systems
Issue 2.0 95
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
96 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
8.2.3 Calculations, …
Issue 2.0 97
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
TOP n: Select top n files from a table and sort them ASCending or DESCending
98 Issue 2.0
ibaAnalyzer-DB Manual Flexible Database Integration for
iba Systems
Issue 2.0 99
Flexible Database Integration for Manual ibaAnalyzer-DB
iba Systems
Select data from three tables with common _FileId and _ChannelNr for top 50000 rows.
cleanup_DB.bat:
SQLCMD -S .\SQLEXPRESS -i C:\iba\training\DB\cleanup_DB.sql
GO
DELETE iba_genealogic_file WHERE [_TimeStamp] < getdate() - 365
GO
DELETE iba_fingerprint_file
backup_DB.bat:
SQLCMD -S .\SQLEXPRESS -i C:\iba\training\DB\backup_DB.sql
backup_DB.sql:
BACKUP DATABASE IBA_TTT
TO DISK = N'C:\iba\training\DB\Backup\IBA_TTT.bak'
WITH NOFORMAT, INIT,
NAME = N'IBA_TTT Backup',
Note
Any paths containing blanks need to be in quotation marks.
If only data files are specified, ibaAnalyzer opens all the data files and shows them in the
signal tree.
Example:
"C:\Program Files (x86)\iba\ibaAnalyzer\ibaAnalyzer.exe"
D:\IBA\dat_files\pda_training021.dat D:\IBA\dat_files\pda_training022.dat
If an analysis file is also specified, ibaAnalyzer opens the data files and shows the
signals as defined in the analysis file. If more than one analysis file is specified, only the
last analysis file in the command-line is loaded.
Example:
"C:\Program Files (x86)\iba\ibaAnalyzer\ibaAnalyzer.exe"
D:\IBA\dat_files\pda_training021.dat D:\IBA\DBExt.pdo
Example:
"C:\Program Files (x86)\iba\ibaAnalyzer\ibaAnalyzer.exe"
D:\IBA\dat_files\pda_training021.dat D:\IBA\DBExt.pdo /reuse
A "Lock analysis" icon in the upper left corner of the tool bar indicates that ibaAnalyzer
has been started with the /reuse switch.
Clicking this button disables updates by further program calls containing the /reuse
switch. By automating this process, for example, using the post-processing command, it
is possible to permanently update an analysis display with the latest .dat file.
As this icon is not displayed by default it must be activated via the Main Toolbar selection.
Example:
"C:\Program Files (x86)\iba\ibaAnalyzer\ibaAnalyzer.exe"
D:\IBA\dat_files\pda_training021.dat D:\IBA\dat_files\pda_training022.dat
D:\IBA\DBExt.pdo /append
Examples:
C:\ibaAnalyzer.exe C:\dat\pda040.dat C:\iba\dbextract.pdo /extract
If "Extract to file" is selected in the analysis file then the name of the output file can be
specified after the extract switch. The second example will extract the data specified in
txt.pdo from pda040.dat into a text file called: "c:\output.txt".
This switch can only be used in conjunction with the license for the database interface
(ibaAnalyzer-DB-Extractor). You may also extract the data into a file by using the
filename as parameter to the switch. For extracting data into a file the license
ibaAnalyzer-DAT-Extractor is required.
Examples:
C:\ibaAnalyzer.exe C:\iba\dbquery.pdo /sql:"C:\iba\query.sql"
C:\ibaAnalyzer.exe C:\iba\dbmerge.pdo /sql:"C:\iba\merge.sql";
sync:"STRIP_ID"
The "dbquery.sql" must be a text file conforming to the SQL-language supported by the
database system specified in the PDO file (i. e. Oracle, SQL-Server, DB2, ODBC)
For instance the query.sql specified in first example could be something like:
SELECT * FROM PDA_File order by [_Timestamp] DESC;
The second example shows the use of the /-sql switch together with the sync field
argument.
The sync field name (here "STRIP_ID") corresponds to the database sync field specified
in the SQL-Queries dialog. (See chapter: Query builder, page 67).
When specifying data files and also using the /sql parameter, all data files are placed in
the signal tree starting from the second line. If the query was successful the first position
will contain the first file in the query result, otherwise the first line will be empty.
This switch is similar to the previous one, but it queries infofields and/or computed
columns from the file table instead of data files. (See chapter Trend queries, page 78
ibaAnalyzer starts and queries the database specified in the PDO with the SQL
statement from the "trend.sql" file. This query needs to have a TimeStamp column
selected. All other selected columns will be added under the "trend query results" node in
the signal tree and can be used in the analysis.
The file trend.sql must be a text file conform to the SQL-language supported by the
database system specified in the analysis file (i. e. Oracle, SQL-Server, DB2, ODBC).
The SQL instruction in it must have a result set with a timestamp field (you can have
more than one, but only the first one will be referenced) and at least one numeric field.
The instruction must also contain an "Order by" clause on the timestamp field.
Example:
C:\ibaAnalyzer.exe /overviewsql:"C:\iba\overview.sql"
/sql:"C:\iba\query.sql"
Examples:
C:\ibaAnalyzer.exe C:\dat\pda040.dat C:\iba\rep.pdo /report
Reports can also be based on database queries. After an standard or trend query it is
possible to build a report with the selected data. The according *.sql and *.pdo can be
used for a command line script.
Example:
C:\ibaAnalyzer.exe /sql:"C:\iba\merge.sql";sync:"STRIP_ID" 8
C:\iba\strip_rep.pdo /report:"c:\tmp\repout.pdf"
Combination /trendsql
permissible /sql /reuse /append /print /extract /report
or useful ? /overviewsql
/sql
/reuse YES
/trendsql
YES YES NO YES NO YES
/overviewsql
… extract process…
If the remote access to the database is required set the "SQL Server Browser" Startup
Type to "Automatic". Further settings for remote access are described later.
For external access choose "Mixed Mode…" and specify the password for the system
administrator.
The installation now runs for a few minutes and at the end all features have "Succeeded".
Connect to Server
Specify the "Database name" and confirm default settings with <OK>:
On the third page select "Database" in the window "User mapped to this login" and
"db_owner" in the window "Database role membership for:".
Activate TCP/IP protocol for "SQL Server Network Configuration" (right mouse click on
"TCP/IP"):
Open Firewall configuration from Control Panel and select "Advanced settings":
In window "Protocol and Ports" select TCP, Specify local ports and enter "1433":
In window "Protocol and Ports" select UDP, Specify local ports and enter "1434":
Test connection from remote PC See chapter "Testing the Database Connection in
ibaAnalyzer"
Note
If you require support, indicate the serial number (iba-S/N) of the product.
Contact
Headquarters
iba AG
Koenigswarterstr. 44
90762 Fuerth
Germany
Phone: +49 911 97282-0
Fax: +49 911 97282-33
Email: [email protected]
Contact: Mr Harald Opel