Description


Question: How To Configure Tables And Restrict Fields In Virtual Database Using Views. Customer is using Adabas with Predict.


Solution

refer customer to adding a VDB and then creating views and synonyms in the AC_Doc.pdf. Very simple views and synonyms can also be created within the Studio under metadata. What cannot be created using the Studio Wizard can be pasted into any SQL window/prompt, i.e. Studio, Nav_util, or the SQL Utility and added to the VDB. I have included the part of the view, Synonym and wizard sections from the AC_doc.pdf.


The CREATE VIEW Statement
You can define views on one or more data sources. This statement
creates a read-only view that can be used later in the FROM clause of an
SQL query, or wherever a subquery can be specified. A view is stored by
default in the SYS data source. The view is stored in the repository and
not in the backend data source.


Synonym Statements
This section describes the following SQL synonym statements:
_ The CREATE SYNONYM Statement, which creates a synonym
(alias) for a table, view or stored procedure.
_ The DROP SYNONYM Statement, which deletes a synonym (the
table the synonym refers to is not dropped).
The CREATE SYNONYM Statement
The CREATE SYNONYM statement creates a synonym (alias) for a table,
or view. You can use the synonym name instead of the name of the table
or view that it is replacing.


Creating Views
You can define views for one or more data source. Views created are
read-only and can later be used in a FROM clause of an SQL query, or
wherever a subquery can be specified. A view is stored by default in the
SYS data source.
_ A view cannot accept parameters.
1. Right-click Views under the virtual database you are defining and
choose New View from the popup menu. The Create view wizard
opens.
2. Specify a name which identifies the view.
3. Create the view as follows:
Selecting tables
_ In the left-hand pane, expand the data source where the table
resides.
_ Select the table and click the right button to move the table to
the right-hand pane of selected tables.