In this article Barry Mavin, CEO and Chief Software Architect for Recital provides details on how the Recital Database Server can be used to provide a solution for Universal Data Integration.
Overview
The Recital Database Server handles universal cross-platform data access to a wide range of data sources. The database server natively handles full remote SQL data access to Recital, Visual FoxPro, FoxPro, FoxBASE, Clipper and older dBase data. Using Bridges, it handles full remote SQL data access to C-ISAM and OpenVMS RMS. Using gateway connections, it handles full remote SQL data access to Oracle, MySQL, PostgreSQL, SQL Server, server-side ODBC, server-side JDBC and server-side OLE DB data sources. With its ability to access data using server-side ODBC, JDBC and OLE DB drivers from clients on all supported operating systems (Windows, Linux, Unix, OpenVMS), the Recital Database Server is an ideal Data Integration Solution for applications of all sizes and complexity.
Universal Data Integration Solutions
There are several ways in which data may be accessed by the Database Server.
Table 1:
Client Universal Data Access solutions for accessing local or remote data.
Client | Solution |
---|---|
Recital | Use remote gateway connections |
Visual FoxPro | Use the Universal ODBC Driver |
Java (all platforms) | Use the Universal JDBC Driver |
.NET Framework | Use the Universal .NET Data Provider |
Microsoft Office | Use the Universal ODBC Driver |
Windows Mobile | Use the Universal Compact Framework .NET Data Provider |
PHP on Linux | Use the Universal ODBC Driver for Linux |
Mono on Linux | Use the Universal .NET Data Provider |
Others | If the data source you want to access is not in the list above, then you can use a remote ODBC, JDBC or OLE DB gateway. You can find examples of connection strings for most ODBC and OLE DB data sources by clicking here. |
Table 2:
Windows Server Universal Data Access solutions accessible from any remote client running on Windows, Linux, Unix or OpenVMS:
Data Source | Solution |
---|---|
Recital | Native support (See table 1) |
Visual FoxPro | Native support (See table 1) |
FoxPro | Native support (See table 1) |
FoxBASE | Native support (See table 1) |
Clipper | Native support (See table 1) |
dBase | Native support (See table 1) |
C-ISAM | Use a bridge (See table 1) |
Access | Use a gateway connection gateway="oledb:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;" |
Exchange | Use a gateway connection gateway="oledb:Provider=ExOLEDB.DataSource;Data Source=http://servername/publicstore" |
Excel | Use a gateway connection gateway="oledb:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;" |
Oracle | Use a gateway connection gateway="oledb:Provider=msdaora;Data Source=TheOracleDB;User Id=xxxxx;Password=xxxxx;" |
SQL Server | Use a gateway connection gateway="oledb:Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;" |
MySQL | Use a gateway connection gateway="oledb:Provider=MySQLProv;Data Source=mydb;User Id=xxxxx;Password=xxxxx;" |
IBM DB2 | Use a gateway connection gateway="oledb:Provider=DB2OLEDB;Network Transport Library=TCPIP;Network Address=XXX.XXX.XXX.XXX;Initial Catalog=MyCtlg;Package Collection=MyPkgCol;Default Schema=Schema;User ID=MyUser;Password=MyPW" |
Sybase ASA | Use a gateway connection gateway="oledb:Provider=ASAProv;Data source=myASA" |
Sybase ASE | Use a gateway connection gateway="oledb:Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDBname;User Id=username;Password=password" |
IBM Informix | Use a gateway connection gateway="oledb:Provider=Ifxoledbc.2;password=myPw;User ID=myUser;Data Source=dbName@serverName;Persist Security Info=true" |
Ingres | Use a gateway connection gateway="odbc:dsn=data_source_name" |
Firebird | Use a gateway connection gateway="odbc:dsn=data_source_name" |
IBM AS400 iSeries | Use a gateway connection gateway="oledb:PROVIDER=IBMDA400; DATA SOURCE=MY_SYSTEM_NAME;USER ID=myUserName;PASSWORD=myPwd" |
Interbase | Use a gateway connection gateway="oledb:provider=sibprovider;location=localhost:;data source=c:\databases\gdbs\mygdb.gdb;user id=xxxxx;password=xxxxx" |
Others |
If the data source you want to access is not in the list above, then you can use server-side ODBC, JDBC or OLE DB. |
Table 3:
Linux and Unix Server Universal Data Access solutions accessible from any remote client running on Windows, Linux, Unix or OpenVMS:
Data Source | Solution |
---|---|
Recital | Native support (See table 1) |
Visual FoxPro | Native support (See table 1) |
FoxPro | Native support (See table 1) |
FoxBASE | Native support (See table 1) |
Clipper | Native support (See table 1) |
dBase | Native support (See table 1) |
C-ISAM | Use a bridge (See table 1) |
Oracle | Use a gateway connection gateway="oracle:Connection_String" |
MySQL | Use a gateway connection gateway="mysql:Connection_String" |
IBM DB2 | Use a gateway connection gateway="db2:Connection_String" |
PostgreSQL | Use a gateway connection gateway="postgres:Connection_String" |
Others |
If the data source you want to access is not in the list above, then you can use a server-side JDBC driver. |
Table 4:
OpenVMS Server Universal Data Access solutions accessible from any remote client running on Windows, Linux, Unix or OpenVMS:
Data Source | Solution |
---|---|
Recital | Native support (See table 1) |
Visual FoxPro | Native support (See table 1) |
FoxPro | Native support (See table 1) |
FoxBASE | Native support (See table 1) |
Clipper | Native support (See table 1) |
dBase | Native support (See table 1) |
RMS | Use a bridge (See table 1) |
Others |
If the data source you want to access is not in the list above, then you can use a server-side JDBC driver. |
Supported Data Sources
Native Data Access
The Recital Database Server has native built-in support for the following data sources:
- Recital
- Visual FoxPro
- FoxPro
- FoxBASE
- Clipper
- dBase
You can setup tables to work with using the Database Administration Tool in Recital Enterprise Studio.
Bridges
Using Bridges, you can access the following data sources as if they were standard Recital/FoxPro tables:
- CISAM
- OpenVMS RMS
You can setup bridges using the Database Administration Tool in Recital Enterprise Studio.
Gateways/Connections
Using Gateways, you can transparently access the following local or remote data sources:
- Recital
- Oracle
- ODBC (Server-side ODBC data sources)
- JDBC (Server-side JDBC data sources)
- OLEDB Use this to connect to SQL Server and other Windows OLE DB data sources)
- MySQL
- PostgreSQL
Remote Data Object functions
Recital 10 includes a complete and robust set of data source independent functions for accession MySQL, Oracle, DB2 and Postgres. This article explains how to use them.
Client Data Access drivers
Included with the Recital Database Server are three Client drivers. These Client drivers can access any data sources supported by the Recital Database Server. They are not restricted to accessing only Recital data. They can be used to access server-side ODBC, JDBC and OLE DB data sources also.
Recital Universal .NET Data Provider
Use this client driver when building .NET applications with Visual Studio .NET. A data provider in the .NET Framework serves as a bridge between an application and a data source. A data provider is used to retrieve data from a data source and to reconcile changes to that data back to the data source.
Key features of the Recital Universal .NET Data Provider:
- Fully Internet enabled
The Recital Universal .NET Data Provider works across the internet providing access to a wide range of data sources located on remote servers running Windows, Linux, Unix and OpenVMS. - SQL Server compatible
The Recital Universal .NET Data Provider is plug compatible with the .NET Framework SQL Server Data Provider. - Cross-platform Data Integration
Using the Recital Universal .NET Data Provider, you can connect to remote Windows, Linux, Unix or OpenVMS servers and access any data source supported by the Recital Database Server. - Managed code
The Recital Universal .NET Data Adaptor written in C# is 100% .NET Framework managed code. - Runs on Windows Mobile
The Recital Universal .NET Data Adaptor runs under the .NET Compact Framework on Windows Mobile.
Recital Universal JDBC Driver
The JDBC API is the industry standard for database-independent connectivity between the Java programming language and a wide range of databases. The JDBC API provides a call-level API for SQL-based database access. JDBC technology allows you to use the Java programming language to exploit "Write Once, Run Anywhere" capabilities for applications that require access to enterprise data.
Key features of the Recital Universal JDBC Driver:
- Fully Internet enabled
The Recital Universal JDBC driver works across the internet providing access to a wide range of data sources located on remote servers running Windows, Linux, Unix and OpenVMS. - JDBC 3.0 API
The Recital Universal JDBC driver supports the JDBC 3.0 API. - Pure Java Type 3 Driver
The Recital Universal JDBC driver is a 100% pure Java Type 3 driver. - Full Access to Metadata
The JDBC API provides metadata access that enables the development of sophisticated applications that need to understand the underlying facilities and capabilities of a specific database connection. - Cross-platform Data Integration
Using the Recital Universal JDBC driver, you can connect to remote Windows, Linux, Unix or OpenVMS servers and access any data source supported by the Recital Database Server. - No Installation
A pure JDBC technology-based driver does not require special installation; it is automatically downloaded as part of the applet that makes the JDBC calls. The Recital Universal JDBC Driver is 100% java.
Recital Universal ODBC Driver
Connect to remote data from Microsoft Office or other applications that support ODBC data access. The Recital Universal ODBC Driver is also available for Linux and Unix.
Key features of the Recital Universal ODBC Driver:
- Fully Internet enabled
The Recital Universal ODBC driver works across the internet providing access to a wide range of data sources located on remote servers running Windows, Linux, Unix and OpenVMS. - Works with Crystal Reports
The Recital Universal ODBC driver supports the SQL syntax generated by Crystal Reports. - Works with Microsoft Office
The Recital Universal ODBC driver works with Microsoft Office products. - Works with PHP on Linux
The Recital Universal ODBC driver is available for Linux and works with PHP.
Recital provides the following additional benefits:
- Easy to Install and Deploy - Users can set up Recital in minutes enabling organizations to deliver new applications faster than other databases.
- Easy to Administer - Recital is a low administration database that eliminates the need for highly trained, skilled, and costly database administrators to maintain the database.
- High Performance - Superior database performance for the most demanding of OLTP applications. Additionally, Clustered Recital provides 99.999% availability.
- Embeddable Library - Recital Embedded Edition provides in-process data storage engine that delivers all the features of a traditional relational database but in a size which makes it ideally suited for ISVs/VARs who need a small footprint and easy to use toolkit.
- Platform Independence - Recital runs on Linux, Solaris, AIX, HP-UX, Windows, and Mac OS X giving organizations complete flexibility in delivering a solution on the platform of their choice.
When you start the loadbalancer.org appliance you will see the following:
Default login:
Username: root
Password: loadbalancer
Access to webclient from an external client is:
http://192.168.1.129:9080
http://192.168.1.129:9443
You can access the web administrator using the IP and ports described onscreen.
For the sri lanka porject we are looking for performance and the network diagram indicates we are happy to have the cluster on the same subnet as the rest of the network.
Direct routing is the fasted performance possible, it has the advantage over NAT that the Loadbalancer does not become a bottleneck for incoming and outgoing packets. With DR the loadbalancer simply examines incoming packets and the servers to route the packets directly back to the requesting user.
The web interfaceis the only way to fully configure the loadbalancer vm. The console tool lbwizard will get it initiallised and any further configurations can then be done via the webinterface.
Using lbwizard for the Sri lanka configuration follow these steps.
On the first Loadbalancer:
//Start
Is this unit part for a HA Pair?
YES
Have you already setup the Slave?
NO
Is this a one-armed configuration?
YES
Enter the IP Address for the interface eth0?
Enter IP address you wish to be assigned to the SLAVE loadbalancer.
Enter the netmask for interface eth0?
Enter netmask for the subnet.
Enter the Floating IP adrress?
Enter the IP address that will be IP assosiacted the the HA-pair of loadbalancers.
//Finish
On the 2nd loadbalancer VM, run the lbwizard.
//Start
Is this unit part of an HA-Pair?
YES
Have you already set up the Slave?
YES
What is the slave units UP address?
Enter the IP which you entered when configuring the other loadbalancer VM.
Is this a one-armed configuration?
YES
Enter the IP Address for the interface eth0?
Enter the IP that will be assigned to the MASTER loadbalancer
Enter the netmask for interface eth0?
Enter the subnet netmask.
Enter the Floating IP address?
Enter the IP address that will be IP assosiacted the the HA-pair of loadbalancers.
Enter the address of the default gateway?
Enter the deafult gateway for the subnet.
Enter the IP of the nameserver?
Enter the dns server.
Enter the port for the first Virtual server?
Enter 22 for ssh
Enter the IP address of the first real server?
Enter the real IP of the first appserver
//Finish
Now this is complete we need to go to the web admin interface to configure the 2nd Real Server. As the lbwizard program will only allow you to configure 1 real server.
Now login to the web admin using the default password:
username: loadbalancer
password: loadbalancer
Note: Connect to the IP you have now set for your master loadbalancer
Goto the edit configuration tab
Now click add a real server:
Enter a label
IP address of the server plus the port of the service i.e. 192.168.1.125:22
Edit Configuration -> Virtual Servers
persistancte -> NO
Scheduler-> LC
LC - Least-Connection: assign more jobs to real servers with
fewer active jobs.
Service to check -> custom1
Check port -> 22
Forwarding Method -> DR
Feedback Method -> Agent
Arp Problem when using DR
Every real server must be configured to respond to the VIP address as well as the RIP
address.
You can use iptables (netfilter) on the real server to re-direct incoming packets destined for the virtual
server IP address.
This is a simple case of adding the following command to your start up script (rc.local):
//replace 10.0.0.21 with the Virtual Server IP
iptables -t nat -A PREROUTING -p tcp -d 10.0.0.21 -j REDIRECT
chkconfig iptables on
// declare some simple procedures proc display(cArg) echo "display=" + cArg endproc proc show(cArg) echo "show=" + cArg endproc // create an object based on an anonymous class myobj = new object() // add some properties myobj["name"] = "barry" myobj["company"] = "recital" // now declare an anonymous method myobj["mymethod"] = display // call the method myobj.mymethod("hello world") // displays "display=hello world" // redeclare the method myobj["mymethod"] = show // call the method myobj.mymethod("hello world") // displays "show=hello world"Where this becomes particularly useful is when you have a procedure that calls anonymous methods in order to process data. This technique can be used to call anonymous procedures in your code.
proc processdata(oArg) oArg.mymethod(oArg.name) endproc proc show(cArg) echo "show=" + cArg endproc myobj = new object() myobj["name"] = "barry" myobj["mymethod"] = show processdata(myobj) // displays "show=barry"
SET DATADIR TO [ <directory> ]This command is used to specify a directory where database tables, memos, indexes, and dictionary files are located. When a table is being opened this directory is searched first before the current directory and the file search path to locate the table and its associated files. This allows the database tables to be relocated to a different file system without the need to change an existing application.
System Requirements:
- Minimum memory: 4MB
- Minimum Diskspace: ~20MB
The following example connects to a Recital ODBC datasource, executes a query then outputs all the results from the resultset.
<?php
$sql = "select country from customers limit 10";
$conn = odbc_connect('Recital ODBC test', '?', '?');
$rs = odbc_exec($conn, $sql);
odbc_result_all($rs);
odbc_close($conn);
?>
Output:
<table><tr><th>Country</th></tr>
<tr><td>Germany </td></tr>
<tr><td>Mexico </td></tr>
<tr><td>Mexico </td></tr>
<tr><td>UK </td></tr>
<tr><td>Sweden </td></tr>
<tr><td>Germany </td></tr>
<tr><td>France </td></tr>
<tr><td>Spain </td></tr>
<tr><td>France </td></tr>
<tr><td>Canada </td></tr>
</table>
For information on installing and configuring the Recital Universal ODBC Driver and creating and modifying datasources, please see the Documentation section of this web site.
Note: Use of ? for the username and password on the local server is dependent on DB_LOCAL_LOGIN being enabled.
Here's how to set up field validation for a field with a small static number of acceptable values.
Using the example.dbf table from the southwind sample database, validation can be added to the title field to ensure it matches one of a list values.
open database southwindThe inlist() function checks whether the specified expression exists in the comma-separated list which follows. An attempt to update title with a value not in the list will give an error: Validation on field 'TITLE' failed.
alter table example add constraint;
(title set check inlist(alltrim(title),"Miss","Mr","Mrs","Ms"))
If you have access to the Recital Workbench, you can use the modify structure worksurface to add and alter your dictionary entries, including a customized error message if required.

Recital is a proven and cost-effective database solution that will help reduce the cost of your database and application software infrastructure substantially. As an added benefit, Recital can run many legacy applications with little to no change as it understands FoxBASE, FoxPRO and Clipper languages as a subset of it's overall capability.