Recital Developer Center / Technical Articles /Using The Database Administration with Recital Enterprise Studio


Using The Database Administration with Recital Enterprise Studio

Related Links


Recital Home

Recital Product Family
Recital Terminal Developer
Recital Visual Developer
Recital Database Server
Recital Web Developer

 
    
    
   

In this article Barry Mavin, CEO and Chief Software Architect for Recital provides details on how to use the Database Administrator for working with local or remote databases.

Barry Mavin
May, 2005

Overview

A quick reference to Database Administration with Recital Enterprise Studio.

Universal Data Integration Solutions

You can start the Database Administrator (DBA) by clicking on the "Database Administrator" button in the Toolbar. When the DBA Dialog is shown, select the "Databases" Tab, then right click on the database you want to administer and then select "Open".

Double click the items that you want to inspect.

The Database Administration dialog will be activated and the appropriate TabPage selected depending on what you double clicked..

The Database Administrator

The Database Administration dialog is organized into three panels.

  • Database Explorer
  • Database Workspace
  • Command Log

The buttons in the toolbar are applicable to the currently selected TabPage of the Database Workspace.

The following TabPages are available in the Database Workspace.

Help

Clicking on the links in the Help TabPage of the Database Explorer displays the html page in the Help TabPage of the Database Workspace.

Tables

The Tables tab contains details for the current table that is being administered. You can choose from a list of the tables in your database by clicking on the Items dropdown button and selecting a table to modify. As you edit the information presented in this form the appropriate SQL commands will be added to the Actions tab. You can view the changes that will be made to the table prior to you committing them by clicking on the Preview button. You commit the changes by clicking on the Commit button.

You can undo previous changes that you made by pressing the Undo button, and reapply the changes by pressing the Redo button.

If you need to, you can cancel all changes that you have made by pressing the Rollback button.

This Tables tab is arranged into three sections.

Table Details

Elements in this section are read-only and cannot be edited.

* Table Triggers

Table triggers are executed when any of the specified operations is performed on the table. You can write triggers by selecting the Procedures tab. You can click on the small button to the right of each trigger and choose an appropriate procedure to execute. Trigger procedures are written in the Recital/4GL which is compatible with FoxPro.

* Table Security

Table security can be specified to restrict user access to the data in the table. You can click on the small button to the right of each security constraint to edit them

Columns

The Columns tab contains the columns contained in the table that is currently being administered. You can choose from a list of columns in the table by clicking on the Items dropdown button and selecting a column to modify. As you edit the information presented in this form the appropriate SQL commands will be added to the Actions tab. You can view the changes that will be made to the table prior to you committing them by clicking on the Preview button. You commit the changes by clicking on the Commit button. You can navigate the columns in the currently selected table by clicking on the buttons in the navigation bar. To add a new column, click the Add button. To remove a column, click the Delete button.

You can undo previous changes that you made by pressing the Undo button, and reapply the changes by pressing the Redo button.

If you need to, you can cancel all changes that you have made by pressing the Rollback button.

This Columns tab is arranged into four sections.

Column Details

This section contains the basic column information and is the minimum required for the column to exist in the table.

Column Attributes

This section contains some basic column attributes that are used by forms.

Column Protection

End user access to the columns can be restricted using Access Control Strings (ACS). You can click on the small button to the right of each element to edit them.

Column Constraints

Column constraints that are associated with the currently selected column.

Indexes

The Indexes tab contains details of the indexes associated with the current table that is being administered. You can choose from a list of the tables in your database by clicking on the Items dropdown button and selecting a table to associate indexes with. As you edit the information presented in this form the appropriate SQL commands will be added to the Actions tab. You can view the changes that will be made to the table prior to you committing them by clicking on the Preview button. You commit the changes by clicking on the Commit button.

This Indexes tab contains an editable grid that contains the following columns.

Index Name

This is the name that will identify the index associated with the currently selected table in your database.

Unique

If this is checked, then keys added to this index will be checked for uniqueness. Use this to handle primary key indexes or indexes for items that should only exist once in the table e.g. an order number, or customer number.

Index Expressions

In this column you should specify a comma separated list of index expressions and optionally the direction of this index i.e Asc or Desc (default is Asc).

Example:

left(custid, 10), order_date desc, order_time Asc

Procedures

The Procedures tab contains a code editor that provides the ability for you to edit stored procedures and triggers associated with the current database being administered. You can choose from a list of the procedures in your database by clicking on the Items dropdown button and selecting a procedure to edit. You can save the changes by clicking on the Save button. You can test run the procedure by clicking on the Run button.

Views

The Views tab contains the database views contained in the database that is currently being administered. You can choose from a list of views in the database by clicking on the Items dropdown button and selecting a view to modify. As you edit the information presented in this form the appropriate SQL commands will be added to the Actions tab. You can view the changes that will be made to the table prior to you committing them by clicking on the Preview button. You commit the changes by clicking on the Commit button. You can navigate the columns in the currently selected table by clicking on the buttons in the navigation bar. To add a new column, click the Add button. To remove a column, click the Delete button.

You can undo previous changes that you made by pressing the Undo button, and reapply the changes by pressing the Redo button.

If you need to, you can cancel all changes that you have made by pressing the Rollback button.

This Views tab contains an editable grid containing the following columns.

Name

This section contains the basic column information and is the minimum required for the column to exist in the table.

SQL Select Statement

Specifies the SQL Select statement that this view represents.

Scripts

The Scripts tab contains a code editor that provides the ability for you to edit SQL scripts associated with the current database being administered. You can choose from a list of the scripts in the database by clicking on the Items dropdown button and selecting a script to edit. You can save the changes by clicking on the Save button. You can test run the script by clicking on the Run button.

Bridges

The Recital Database Server handles universal cross-platform data access. The server transparently handles full SQL data access to Recital, FoxPro, FoxBASE, Clipper and older dBase data. If you want SQL access to CISAM or OpenVMS RMS data, you need to define a Bridge to that data. In the Bridges tab you can define logical mapping between Recital tables and external data sources. You can choose from a list of the bridges in your database by clicking on the Items dropdown button and selecting a table to modify. As you edit the information presented in this form the appropriate SQL commands will be added to the Actions tab. You can view the changes that will be made to the database prior to you committing them by clicking on the Preview button. You commit the changes by clicking on the Commit button.

You can undo previous changes that you made by pressing the Undo button, and reapply the changes by pressing the Redo button.

If you need to, you can cancel all changes that you have made by pressing the Rollback button.

This Bridges tab contains an editable grid with the following columns.

Name

The name of the Bridge. Bridge files have a .brg file extension. Once you have created a Bridge, you can copy it to a file with a .dbf extension. You can then use this Bridge as if it were a native Recital table. The mapping between the Recital table structure and the data in the external file will be handled automatically by the Recital Database engine.

* Type

The Type of Bridge. Currently CISAM or RMS.

External File Name

The external file that this bridge maps onto.

* Recital Table Name

The Recital Table that maps onto the external file. You need to create an empty table first, then save it with a .str extension. You then specify that empty table name here.

* Alias Name

This is a name that the data can be referenced by in your application code.

Index Key 1 - 7

If the data being Bridged to has indexes, you need to define index key mappings here. Up to 7 index keys can be mapped. These can be used to perform either SQL or navigational data access (SEEK etc).

Connections

The Recital Database Server handles universal cross platform data access. The server natively handles full SQL data access to Recital, FoxPro, FoxBASE, Clipper and older dBase data. It also provides native SQL access to CISAM or OpenVMS RMS data using Bridges. The Connections tab provides the ability to define remote connections to external SQL data. You can choose from a list of the Connections in your database by clicking on the Items dropdown button and selecting a connection to modify. As you edit the information presented in this form the appropriate SQL commands will be added to the Actions tab. You can view the changes that will be made to the database prior to you committing them by clicking on the Preview button. You commit the changes by clicking on the Commit button.

You can undo previous changes that you made by pressing the Undo button, and reapply the changes by pressing the Redo button.

If you need to, you can cancel all changes that you have made by pressing the Rollback button.

This Connections tab contains an editable grid with the following columns.

Name

The name of the Connection. Connection files have a .gtw (gateway) file extension. Once you have created a Connection, you can copy it to a file with a .dbf extension. You can then use this Connection as if it were a native Recital table. The mapping between the Recital table structure and the remote SQL data will be handled automatically by the Recital Database engine.

* Type

The Type of Connection. Data sources currently supported are:

  • Recital
  • Oracle
  • SyBase
  • Informix
  • DB2
  • ODBC (Server-side ODBC data sources)
  • JDBC (Server-side JDBC data sources)
  • OLEDB (Use this to connect to SQL Server and other Native Windows OLE DB data sources)
  • MySQL
  • PostgreSQL

Node / IP Address

The DNS name or IP address where the remote server for the specified Type resides.

* UserID

The user name used to connect into the remote server on the target IP Address.

* Password

The password used to connect into the remote server on the target IP address.

Database / Connection String

Specify the database name that will be connected to. When the Type is OLEDB this contains the Connection String for the OLE DB data source. When the Type is ODBC, this contains the ODBC data source name on the remote server. You do not need to install a local ODBC driver when using the Recital Database Server. When the type is JDBC, this contains the full path of the JDBC driver followed by a ‘:’ then the JDBC Connection String. When accessing remote data using any of the Client Database Drivers that ship with the Recital Database Server, you can specify the connection in the following format.

ODBC:data-source-name

JDBC:path-to-driver:connection-information

OLEDB:oledb-connection-string

Server Table Name

The name of the base table on the remote SQL server.

Primary Key Expression

The primary key expression using Recital/4GL syntax (FoxPro).

SQL Select Statement

The SQL SELECT to be executed against the remote SQL data source.

Actions

The Actions tab contains a list of pending commands that will be executed when you click the Commit button. Any design changes that you make to the tables, columns, indexes, bridges, connections or views will be recorded in the actions tab. You can review the changes by clicking on the Preview button. If you need to, you can edit the commands in the actions tab prior to pressing the Commit button.

If you need to, you can cancel all changes that you have made in the designer by pressing the Rollback button.

You can undo previous operations by pressing the Undo button, and reapply the changes by pressing the Redo button.

Click the Help button if you need any assistance with SQL syntax.

Data

The Data tab provides the ability to browse and update data from tables in the current database that is being administered. You can choose from a list of the tables in your database by clicking on the Items dropdown button and selecting a table to browse.

You can perform SQL queries interactively by typing in a SQL SELECT statement then clicking the Run button. If you want to perform data cleansing on your data it is better to write a Procedure and run that rather than type in individual commands in here.


Copyright © 2005 Recital Corporation. All rights reserved.
Terms of Use Privacy Policy Contact Us Site Map