Recital

Login Register

XBase Myth Buster

In this article Barry Mavin, CEO and Chief Software Architect for Recital debunks the myths and misrepresentations surrounding XBase and explains how Recital, an enterprise-class XBase platform, has overcome all the shortfalls and weaknesses of early XBase implementations.

 Contrary to what we are all led to believe by the computing press, hype and the mighty marketing dollars of the large software companies it is "Applications" that drive the use of IT in companies of all sizes. Yes "Applications", not languages, operating systems, development tools or database systems.
It is these applications that can make or break a company. The ability of the application to perform or respond to user requests quickly and reliably is of paramount importance to the survival of any organization.

The IT landscape has been fed with many "Bait and switch" tools, languages, and other technologies for as long as I can remember. If we as developers were to jump on each and every bandwagon that was raved about in the press and on the web, we would never complete any projects. Ever!

This should be a major concern to all organizations. I will not dwell on the "Bait and switch" in this article, but will in the future discuss this in an article of its own, as it merits a longer discussion.

XBase is a general-purpose database programming language. It's often used for developing small to medium-size database systems, but that's not the whole story. You will find XBase applications running major Banking, Logistics, and POS applications all around the world. 

If you already have XBase applications written and they work well for you, there is no need to rewrite these, there is no need to throw away something that works well, is proven and is business-critical.

XBase has nothing to do with the underlying database structure or how the database engine is implemented. An XBase implementation is free to choose the file format, as long as the XBase commands and functions produce the same results on all implementations.

Visual FoxPro is Microsoft's XBase application platform for Windows.

Recital is an enterprise-class XBase application platform that has a complete multi-user high-performance ANSI SQL compliant database engine which has an XBase compatible 4GL embedded within it. Just as SQL Server uses Transact-SQL, and Oracle uses PL/SQL, Recital uses a superset of the XBase language in place of these procedural languages -- the Recital/4GL. All SQL databases have a different procedural language for writing procedural business rules and stored procedures.

The Recital/4GL has XBase (Visual FoxPro , FoxPro, FoxBASE, dBase and Clipper) language (commands and functions) compatibity. The XBase commands and functions are oriented towards the development of business-oriented database applications.

In fact, on close inspection, you will find that the Recital/4GL is significantly more functional that SQL Server Transact-SQL, and Oracle's PL/SQL as it contains a rich set of high-level commands and functions. When comparing Recital with SQL server and/or Oracle, you should not assume that "Recital is XBase" therefore it cannot be as good or as powerful as these other products.

Recital has a complete native ANSI SQL implementation at the heart of it, as well as the Recital 4GL (a superset of the XBase language) which is used to write application program logic "around" the SQL statements. Additionally, Recital supports both Navigational as well as SQL data access. Take for example a POS application. Speed is of paramount importance as the end-user on a cash-drawer will not wait! This type of application requires that the database tables be queried navigationally for performance reasons. How many POS applications use SQL server or Oracle?

What makes Recital an enterprise-class XBase application platform? We describe Recital as an "enterprise-class XBase application platform" because it will allow you to run your existing XBase applications with little to no code changes required. This is where Recital shines. Your existing windows and SCO FoxPro/FoxBASE applications can be migrated to Windows, Linux, Unix and OpenVMS with little to no code changes. They can be web-enabled, with little to no code changes. They can then be integrated into a corporate IT infrastructure using the Recital Server and Recital Web.

I will now take a look at some of the myths surrounding XBase and how Recital debunks these. 

Myth: XBase is a PC desktop database

Reality: Recital is an enterprise-class XBase application platform that is available on Windows, Linux, Unix, Mac OS X and OpenVMS.

Myth: XBase is not suitable for high throughput multi-user access as it only supports manual locking

Reality: Recital supports both manual and automatic record locking. Record locking can be either pessimistic or optimistic. Additionally, Recital supports transaction isolation levels for SQL statements.

Myth: XBase data is not secure

Reality: Recital databases conform to the operating file system permissions. Recital controls database user permissions for each table. Each user or groups of users can be granted command priviledges using standard SQL GRANT/REVOKE commands. When a database table is accessed, Recital will only open it read-only if its permissions prohibit updates. Additionally, Recital Database Tables can be DES3 encrypted. The ENCRYPT command is used to encrypt the data in the specified table with a DES3 key. The key is DES3 encrypted and stored in a .dkf file with the same basename as the table. After encryption, the three parts of the key must be specified correctly before the table can be accessed. The key stored in the .dkf file must match the key that you specify to open the table. This DES3 encryption works with SQL also.
// The ENCRYPT command is used to encrypt the data in the specified 
// table and create a ".dkf" file
encrypt accounts key "key1,key2,key3"
// when the suppliers table is being opened the user will be asked
// to enter the "security key"
use suppliers
// This functionality can be overidden by specifying the key on
// the "use" command
use suppliers encrytion "key1,key2,key3"
// SQL queries also need to specify the key
select * from accounts where amount > 5000
// The DECRYPT command decrypts the data and removes the table’s .dkf file.
// After decryption, the key need no longer be specified to gain access to
// the table
decrypt accounts key "key1,key2,key3"
 Myth: XBase is not a web-enabled technology

Reality: The Recital Server is a completely web/internet enabled Visual FoxPro compatible Database Server. The client drivers for ODBC, JDBC and .NET all use TCPIP as their network transport mechanism. Additionally, Recital has a native Linux/Unix ODBC driver that works with PHP on these platforms. Recital Web provides the same functionality as that of PHP with the difference being that you use Recital in place of PHP.

Myth: XBase has no standard

Reality: both Recital and VFP are derived from the original dBase language of the 80's. Both Recital and Visual FoxPro have extended the original dBase language extensively over the last decade. Both Recital and Visual FoxPro are object-oriented with full support for classes and an OOPS programming methodology. Recital's and Visual FoxPro's OOPS implementations are compatible. Recital has Visual FoxPro language and function compatibility. Additionally, Recital's SQL is compatible with Visual FoxPro SQL. If you know Visual FoxPro you already know Recital albeit on a different platform.

Myth: XBase does not support SQL for data access

Reality: both Recital and Visual FoxPro support full ANSI SQL capabilities, including outer joins. These can be performed on both local and cross-platform server data.

Myth: XBase is not client/server

Reality: The client-server model needs a minimum of three elements: a user interface (or front end), a data source (or back end), and some form of data access middleware (like ODBC, JDBC or a .NET Data Provider) that connects these two tiers. These components can all reside on the same machine if you desire. With both Recital and VFP you can use the power of Remote Views and the flexibility of SQL Pass-through to build a robust client-server application.

// This remote view is stored in the Recital Database Catalog (DBC) 
// or the VFP Database Container (DBC)
create sql view vCustomer ;
remote connection mySqlConnection ;
as select * from customer
// You can fetch data from a remote SQL Server into a local cursor
// just by referencing the remote view "vCustomer"
use vCustomer
// Use Recital/VFP SQL grammar on local cursor
update vCustomer set country = "USA" where empty(country)
// Create as many temporary indexes as you need
index on state tag state
index on upper(city) tag city
// Set optimistic table buffering for multi-row updates
CursorSetProp("Buffering", 5)
// Use standard VFP data manipulation language
replace state with "NY" for upper (city) = "NEW YORK"
// Send the updates to the remote SQL Server
If !TableUpdate(.T.)
// Update failed, revert local change buffer
TableRevert(.T.)
Endif
// Close the view, destroy the cursor and its indices.
use in vCustomer
Myth: XBase is an unsupported product

Reality: Recital is fully supported round-the-clock by our skilled software support team from locations in the UK, US, and Asia. Visual FoxPro is still a fully supported Microsoft product.

Myth: XBase does not handle multi-statement transactions

Reality: Recital supports nested multi-statement transaction blocks. The following example uses XBase command syntax but SQL commands are also fully supported.

    // transactions can be nested
begin transaction
use orders
seek suppliers->id
replace amount with amount + 1
end transaction
end transaction

Myth: XBase cannot be used for business-critical applications

Reality: Recital and Visual FoxPro are being used extensively in a wide range of mission critical applications including; Banking, Logistics, POS, Defense, and Insurance.

Myth: XBase does not support XML

Reality: Recital can export and import data in Microsoft ADO XML format. Using this standard XML format, data can be easily interchanged with other applications both Microsoft and non-Microsoft across all platforms.

Myth: XBase applications are not scaleable and cannot be tuned for optimal performance

Reality: Recital can run on any Windows, Linux, Unix, Mac OS X or OpenVMS platform. Recital supports a wide range of commands for tuning its performance, for example; SET ICACHE for index caching, SET DCACHE for database caching, SET PCACHE for procedure/program caching. Additionally, Recital applications are JIT compiled (similar to Java) and loaded into shared memory segments on Linux and Unix. This results in reduced memory usage and reduced paging activity when large numbers of users are using the same application.

Myth: XBase has a 2GB size limit for data files

Reality: Recital has Very Large Database Support (VLDB). This allows database tables and other associated files (e.g. memo files ) to be up to 2^63 in size.

Myth: XBase does not support structured error handling

Reality: both Recital and Visual FoxPro handle modern structured error handling contructs using the TRY/CATCH/THROW commands.

Conclusion 

That's not all the myths you'll hear about XBase; I haven't time to list them all, but there's a lot of disinformation out there. If you've heard about any of those things I've mentioned, I'd ask you to take another look at XBase and Recital in particular; it's easier than you think, it's faster than you think, and it's better than you think. Don't listen to the myths - don't even take my word for it. Download it from the Recital website and try it for yourself.
Twitter

Copyright © 2024 Recital Software Inc.

Login

Register

User Registration
or Cancel