Virtual Tables
Overview
The Virtual Table feature was designed to enlarge possibilities when forming strategies of comparison, synchronization and data migration.
The feature is based on creation of data views whose contents are defined by a query. Like a real table, the view consists of a set of named columns and rows of data. However, a view does not exist as a stored set of data values in a database. The rows and columns of the data come from tables referenced in the query defining the view and are produced dynamically when the view is referenced.
Such view acts as a filter on the underlying tables referenced in the view. The query that defines the view can be from one or more tables or from real views in the current databases.
Most of the popular database management systems provide the option to create and work with such views. But users of third party applications - such as CDBS – don’t always have the possibility to create views on database side: sometimes the user doesn’t have enough permissions or has a restricted access to the database, in other cases the database does not support views at all.
The Virtual Table
feature provides the possibility to create, save and then work with such views, on the client side, unlike the real views, stored on database side.
A Virtual
Table
is used to do any or all of following functions:
- Restrict a user to specific rows in a table.
- Restrict a user to specific columns.
- Join columns from multiple tables so that they look like a single table.
- Display the specific table's data, changing its
columns order.
Create Virtual Table
- Right-click on the Virtual Tables node.
- Use New Virtual Table .
- The dialog will open.
- This dialog contains 3 major areas:
- In the left upper area you can see tables. A single click on table’s name will show the table’s fields in the left upper area.
- Double-click on the field name in the right upper area will bring the field’s name to the grid in the bottom area.
- Grid in the bottom area represents the Virtual
Table structure.
- Add fields to the Virtual table and configure parameters:
- Specify the Alias for the field.
- Specify the order for the data you to be shown in the field.
- Specify if the field is Visible in the result.
- Criteria – this field is actually equivalent to
Where SQL clause. The most important usage of the Criteria property – is to
define correlation between tables. Tables may be connected in type of
Foreign Key relation. To get appropriate data from standard select statement
execution, you will usually use: table1.field1 = table2.field1 in Where
clause. "Criteria" property in the virtual table structure grid – is the
place to specify this relation.
Edit Virtual Table Definition
- Right-click on the Virtual Table name.
- Use Edit Virtual Table .
- Editing Virtual table definition you can:
- Add/Remove fields to/from the Virtual table
- Change the position of the field in the virtual table definition
- Set/Modify Alias for the field
- Set/Modify "Order" parameter for special field
- Decide if the field would be visible or not
- Modify Criteria