return to first page linux journal archive
keywordscontents

Product Review

Velocis Beta-3.0 Database Server

Before I tell you about Velocis, let me tell you about my company's system and why we need a database server. Itres Research Limited is a developer of the Compact Airborne Spectrographic Imager (casi), a multispectral imaging instrument that combines the sophistication of satellite geo-positioning systems (GPS) with the practicalities of aerial photography. The casi is used worldwide in a variety of applications, and is distinguished by its high precision and flexibility of use. The casi is a user-programmable, all-digital system that is easily installed in light aircraft. It operates in the visible and near-infrared range of the spectrum. This makes it an ideal camera for forestry, agriculture, environmental monitoring, land-use planning and water-purity applications. It is widely recognized as a valuable tool in remote sensing.

One of the more important features of the casi instrument is its ability to generate absolute radiance values from the scene. In simple terms, it can not only generate color photos, but it can also tell you the absolute spectral signature of the scene. Given that most plants, minerals and other land-based objects exhibit different spectral characteristics, it is possible to classify the type of vegetation and minerals present in the photographed scene, including estimates of densities, health and concentration.

Our Problem

Precision does not come without a price. The data collected has to be passed through a number of processing steps, including radiometric correction calibration, geo-correction (the projection of each image pixel to a unique earth coordinate), mosaic (the tiling of all image strips into a single photograph) and analysis (the interpretation of the image and creation of a data product).

Before one can make use of the data, it is necessary to obtain detailed information on the casi sensor (camera) used to acquire the images (e.g., when it was last calibrated, where the latest calibration files are located, etc.) and associated flight records.

When the data processing is complete and the final report is generated, it is also highly desirable to have the means to review the parameters and tools used to process the data. This is an integral and necessary part of the quality-assurance program.

Databases Come to the Rescue (Not)

Itres' processing power is based mainly on Red Hat Linux 5.2 and 6.0. There are a number of processing stations, each equipped with dual processors (400MHz per CPU) and each connected to a 100Mbps LAN (local area network). Access to the workstation is provided by personal computers, which (unfortunately) run Windows 95. Graphic services are provided through xwin32 (an X-Windows server for Win32) in conjunction with Samba file access.

All users of Windows 95 must have access to Microsoft's Office Suite 97, primarily for editing their mail. This led to an unfortunate side effect, the availability of MS Access--the Microsoft Database engine. The need for a database solution to the information processing was so great that a number of users created private MS Access databases, which contain important processing-related information and product inventory information. There is a storage requirements database, component inventory database, customer contact database, on-line help database, flight-planning information database and the list goes on. The unfortunate part is that those databases are located on personal computers and are not easily shared among users. We attempted to move the data to our main servers which run Linux, but we met with resistance for basically two reasons:

As a result, we searched for solutions which would enable the average user to gain access to their databases using MS Access as before, while taking advantage of the capabilities of Linux as an effective file server.

The Velocis Database Engine

We had a number of minimal requirements for a database server, and the Velocis database server 3.0 by Raima Corporation (now Centura Software) met all of them. The key features of Velocis that match our requirements are as follows:

Installation

Velocis is distributed on a CD, and it occupies approximately 10MB installed. The Linux (or UNIX) installation is accomplished in a few simple steps:

Installation on Windows 95/98 or NT is similar, except for the use of winzip and install shield setup programs.

Starting Velocis

Centura Software provides a number of tools (most are available as C source code in the ``examples'' directory) to invoke, manage and communicate with the Velocis database engine. With the exception of the administrative tool (admin.exe under Windows and rdsadm under UNIX), all tools are available on all platforms. The most notable tools are:

The steps necessary to start Velocis are as follows:

Although the steps above are rather simple to execute, they assume the user has some knowledge of Linux and networking. It would be nice if Centura Software used RPM to bundle the package. It would be even nicer if they were to perform the installation of the scripts automatically and provide a System V-equivalent Velocis init script (with start, stop and restart) capability.

Running Database Applications

If you have reached this point, you are in business. However, it is important to note that Velocis is a dual-mode database server. Since it operates internally as a hybrid-relational model (network and hierarchical database engine), one has to take care when creating databases. Two database structures are supported: database schemas for non-SQL applications (also referred to as native) and database schemas for SQL applications.

Both SQL and non-SQL databases are created by defining the schema in a text file, compiled using the utility sddlp for SQL databases and ddlproc for non-SQL databases. Database models are implemented at design time. Interestingly, the network database model can be implemented in database designs using the SQL Database Definition Language (DDL). This is done by using Velocis' CREATE JOIN statement to create a permanent, pointer-based join on the primary and foreign keys of selected SQL tables. This improves performance by eliminating the runtime need for indexes between tables. The ability to implement both network, relational or combined network/relational database models using either the SQL DDL or the non-SQL (C-based) DDL is a unique feature of Velocis. Adding to this flexibility, the SQL API and record-level C-API can both be embedded in applications and used to interact with databases created using either DDL.

Databases are registered either when compiled, by adding a parameter to the command line or via the rdsadm (or admin.exe) tools. These utilities are also invoked when adding or dropping users.

The Itres Application

As was stated earlier, we desired a database engine that had a C API interface (for precise, record-level access to the database) and supported the SQL and ODBC industry standards. The Itres database is running under Linux, which is the intranet database server. The server listens to ODBC communication requests from Windows 95/98 and NT and lets certain individuals run admin.exe under Windows. Yes, I'm guilty of doing that, but the Windows administration API is much nicer than the command-line-driven Linux version. The ODBC interface is provided primarily to enable Microsoft Access users to access the database, without yielding to Linux.

In order to interface with the Velocis SQL engine, we developed a Microsoft Access database conversion application based on VBA (Visual Basic for Application). This tool can read the table structures and data contents of any Microsoft Access 97 database and generate an ANSI SQL text file for the transfer purpose.

Any SQL-compatible database engine, such as Velocis, can read the SQL text files and import their contents from the Microsoft Access database. The Itres Microsoft-Access-based inventory database was successfully transferred to the Velocis.

It was also considered desirable for intranet users to have access (or views) into databases. The obvious viewing tool of choice is a web browser. To that end, we wrote CGI (Common Gateway Interface) scripts using Tcl (Tool Command Language from Scriptics Corporation). Tcl was extended as a dynamically loadable library, using Velocis' extensive native C API, to provide access to the database using SQL. These functions essentially utilized the sample source code for rsql found in Velocis' examples directory. From this point on, the effort shifted away from API integration with Velocis to a database-design project using SQL, which was our original goal.

Conclusion

In a nutshell, Velocis delivers all we expect of it: reliable operation, interoperability among computing platforms, a strong C API that supports complex operations and multithreading, standards-based ANSI SQL interpreter and reliable archive and recovery tools. Most importantly, Centura Software provides customer support (for a fee) necessary for operating in commercial settings.

We could use (and actually are using) PostgreSQL for prototyping SQL code on many computers, but when it comes to critical code, we prefer to use a supported tool. This preference also drove our selection of Red Hat Linux as a server platform.

Velocis is not perfect, and it does seem to have some potential rough spots (in the installation area and startup), but once configured and running, it works smoothly without complaints.

VAST

Avygdor Moise (avy@itres.com) earned a Ph.D. degree in experimental space science and has extensive experience in microcomputer technology, operating system design and application development for real-time systems. He has extensive hands-on working knowledge of Linux, UNIX and Win32. He is president of Future DOS Research and Development Inc. and Vice President, Research, at Itres. He is an independent consultant providing services to large and small companies on network design and implementation and Linux.