DBASE

From Wikipedia, the free encyclopedia

dBASE III
Enlarge
dBASE III
The correct title of this article is dBASE. The initial letter is shown capitalized due to technical restrictions.

dBASE was the first widely used database management system or DBMS for microcomputers, published by Ashton-Tate for CP/M, and later on the Apple II, Apple Macintosh, UNIX [1], VMS [2], and IBM PC under DOS where it became one of the best-selling software titles for a number of years. dBASE was never able to transition successfully to Microsoft Windows and was eventually displaced by newer products like Paradox, Clipper, FoxPro, and Microsoft Access. dBASE was sold to Borland in 1991, which sold the rights to the product line in 1999 to the newly-formed dBASE Inc.

Starting in the mid 1980s many other companies produced their own dialects or variations on the product and language. These included FoxPro (now Visual FoxPro), Arago, Force, Recital, dbFast, dbXL, Quicksilver, Clipper, Xbase++, FlagShip, and Harbour. Together these are informally referred to as xBase or XBase.

dBASE's underlying file format, the .dbf file, is widely used in many other applications needing a simple format to store structured data.

dBASE was licensed to users for a term of fifty years in the unlikely event that a user would use their copy of dBASE for a long period of time.

Contents

[edit] Origins

The original developer of dBASE was Wayne Ratliff[3]. In 1978, while at the Jet Propulsion Laboratory, Ratliff wrote a database program in assembly language for CP/M based microcomputers to help him win the football pool at the office. He based it on Jeb Long's JPLDIS (Jet Propulsion Laboratory Display Information System) and called it "Vulcan," after Mr. Spock of Star Trek. According to Ratliff, the language in JPLDIS was a simple, command-driven language intended for interactive use on printing terminals. There is some evidence that JPLDIS was influenced by a legacy mainframe database product called RETRIEVE.

In early 1980, George Tate, of Ashton-Tate, entered into a marketing agreement with Ratliff. Vulcan was renamed to dBASE, and the software quickly became a huge success.

[edit] dBASE programming language

After porting Vulcan to the IMSAI 8080 and later to CP/M and MS-DOS (as dBASE), Ratliff added commands to accommodate the video screen interface as well as commands for improved control of flow (such as DO WHILE/ENDDO) and conditional logic (such as IF/ENDIF).

For handling data, dBASE provided detailed procedural commands and functions to open and traverse files (e.g., USE, SKIP, GO TOP, GO BOTTOM, and GO recno), manipulate field values (REPLACE and STORE), and manipulate text strings (e.g., STR() and SUBSTR()), numbers, and dates. Its ability to simultaneously open and manipulate multiple files containing related data lead Ashton-Tate to label dBASE a "relational database," even though it did not meet the criteria defined by Dr. Edgar F. Codd's relational model.

dBASE used a runtime interpreter architecture, which allowed the user to execute commands by typing them in a command line "dot prompt." Upon typing a command or function and pressing the return key, the interpreter would immediately execute or evaluate it. Similarly, program scripts (text files with PRG extensions) ran in the interpreter (with the DO command), where each command and variable was evaluated at runtime. This made dBASE programs quick and easy to write and test because programmers didn't have to first compile and link them before running them. (For other languages, these steps were tedious in the days of single- and double-digit megahertz CPUs.) The interpeter also handled automatically and dynamically all memory management (i.e., no preallocating memory and no hexadecimal notation), which more than any other feature made it possible for a business person with no programming experience to develop applications.

Conversely, the ease and simplicity of dBASE presented a challenge as its users became more expert and as professional programmers were drawn to it. More complex and more critical applications demanded professional programming features for greater reliability and performance, as well as greater developer productivity.

Over time, Ashton-Tate's competitors introduced so-called clone products and compilers that introduced more robust programming features such as user-defined functions (UDFs) to supplement the built-in function set, scoped variables for writing routines and functions that were less likely to be affected by external processes, arrays for complex data handling, packaging features for delivering applications as executable files without external runtime interpreters, object-oriented syntax, and interfaces for accessing data in remote database management systems. Ashton-Tate also implemented many of these features with varying degrees of success. Ashton-Tate and its competitors also began to incorporate SQL, the ANSI/ISO standard language for creating, modifying, and retrieving data stored in relational database management systems.

In the late 1980s, developer groups sought to create a dBASE language standard (IEEE 1192). It was then that the language started being referred to as "Xbase" to distinguish it from the Ashton-Tate product. Hundreds of books have been written on dBASE and Xbase programming.

Today, implementations of the dBASE language have expanded to include many features targeted for business applications, including the manipulation of the graphical user interface, manipulation of remote and distributed data, Internet functionality, and interaction with modern devices. Despite its functionality and ease of use, the dBASE language's legacy of being "embedded" in a popular commercial product is one of the reasons it is not a dominant standard today.

[edit] Programming example

The following example opens an employee table ("empl"), gives every manager who supervises 1 or more employees a 10-percent raise, and then prints the names and salaries.

 USE empl            
 REPLACE ALL salary WITH salary * 1.1 FOR supervises > 0
 LIST ALL fname, lname, salary TO PRINT
 * (comment: reserved words shown in CAPITALS for illustration purposes)

Note how one does not have to keep mentioning the table name. The assumed ("current") table stays the same until told otherwise. This is in contrast to SQL which almost always needs explicit tables. dBASE used a lot of similar "context" based techniques to reduce the volume of typing needed and facilitate incremental, interactive development. However, one had to be careful about porting (borrowing) programming code that assumed a certain context and it would make writing larger-scale modular code difficult.

dBASE was also one of the first business-oriented languages to implement string evaluation (long before Perl)

 i = 2
 myMacro = "i + 10"
 i = &myMacro
 // i now has the value 12

Here the "&" tells the interpreter to evaluate the string stored in "myMacro" just like it was programming code. This is an example of a feature that made dBASE programming flexible and dynamic, sometimes called "meta ability" in the profession. However, it could also be problematic for pre-compiling and for making programming code secure from hacking. However, dBASE tended to target custom applications for small and medium companies where compile-based security was often less of an issue. For example, nobody would contemplate writing an operating system in the language.

[edit] Niches

Although the language has fallen out of favor as a primary business language, some find it an excellent interactive ad-hoc data transformation tool. Unlike SQL, one can easily break data transformations into small steps to analyze and visually inspect unless you use its PROTECT command. The PROTECT command is a proprietary encryption device designed for dBASE. It also allegedly makes it easy to incrementally collect existing interactive data manipulation commands into subroutines to become automated scripts, in constrast to competitors which can require starting from scratch to go from interactive mouse commands to program scripts.

It allegedly fills the gap between formal RDBMS and array programming languages such as APL's modern derivatives (J, K, etc.) It is also often used with bulk data file preparation for shipment to external (other vendor) sites via protocols such as FTP and email.

[edit] File Formats

A major legacy of dBASE is its .dbf file format, which has been adopted in a number of other applications. For example, the shapefile format developed by ESRI for spatial data in a geographic information system uses .dbf files to store feature attribute data. The term XBase is often used for the group of applications.

dBASE's database system was one of the first to provide a header section for describing the structure of the data in the file. This meant that the program no longer required advance knowledge of the data structure, but rather could ask the data file how it was structured.

A second filetype is the .dbt file format for memo fields. While character fields are limited to 254 characters each, a memo field is a 10-byte pointer into a .dbt file which can include a much larger text field. dBASE was very limited in its ability to process memo fields, but some other xBase languages such as Clipper treat memo fields as strings just like character fields for all purposes except permanent storage.

dBase uses .ndx files for indexes. Some xBase languages include compatibility with .ndx files while others use different file formats such as .ntx used by Clipper and .cdx used by FoxPro.

[edit] External links


Topics in database management systems (DBMS) ( view talk edit )

Concepts
Database | Database model | Relational database | Relational model | Relational algebra | Primary key - Foreign key - Surrogate key - Superkey
Database normalization | Referential integrity | Relational DBMS | Distributed DBMS | ACID

Objects
Trigger | View | Table | Cursor | Log | Transaction | Index | Stored procedure | Partition

Topics in SQL
Select | Insert | Update | Merge | Delete | Join | Union | Create | Drop
Comparison of syntax

Implementations of database management systems

Types of implementations
Relational | Flat file | Deductive | Dimensional | Hierarchical | Object oriented | Temporal

Products
Caché | db4o | dBASE | Firebird | Helix database | DB2 | Informix | Ingres | InterBase | Microsoft SQL Server | MySQL | OpenLink Virtuoso | Oracle | PostgreSQL | SQLite | Sybase IQ | Sybase | Teradata | Visual FoxPro | Comparison - relational | Comparison - object-relational

Components
Query language | Query optimizer | Query plan | ODBC | JDBC
Lists
List of object-oriented database management systems
List of relational database management systems