Table-oriented programming

From Wikipedia, the free encyclopedia

Table-oriented programming (TOP) is a data-focussed programming paradigm (as opposed to code-focussed), part of the Data-oriented group of paradigms.

There are three main subtypes of table-oriented programming:

  • General-purpose TOP languages with tables built in (xBase)
  • Spreadsheets
  • Relational Database languages: Domain-specific tabular languages, often on a remote server, such as SQL

History[edit]

Mainframe Era (1960s-1978)[edit]

During this era, Table-oriented programming was called Decision table programming.

The earliest known reference to Decision table programming is What is DETAB-X?[1], in October 1962. This led to languages such as Filetab in the late 60s, whose descendents continued in the 70s and 80s.

The spreadsheet stream of TOP seems to have begun in 1969, with LANPAR[2].

The relational database concept was defined by E. F. Codd at IBM in 1970.

PC Era: 1978-1995[edit]

The general-purpose TOP languages during this era, when the paradigm was labelled at all, were sometimes called Data-oriented languages. The primary languages during this era were the xBase family (including Clipper and later xHarbour), and the FoxPro family.

This was also an era of rising popularity for spreadsheets. From the release of VisiCalc in 1979, and continuing to Lotus 1-2-3 and the rise of Microsoft Excel, spreadsheets followed the rise of the personal computer in popularity.

During this era, early versions were released of Oracle (1977 onwards), Ingres (1980s), and other Relational Database Management Systems (RDBMSs).

Web 1.0 Era: 1995-2008[edit]

During the Web 1.0 Era, the general-purpose TOP stream fell into disuse. The reasons were twofold. One was that the languages didn't move to capitalise on the web the way others such as Java did. The second was the rise in popularity of object-oriented programming. While the code-focussed langugages gave birth to object-oriented descendents (eg. C to C++ et. al, Lisp to CLOS), the TOP languages never did so. While they had superior data-handling facilities, their code-handling facilities didn't compete with the object-oriented languages.

One contributing factor was advocacy by Bryce Jacobs (using the aliases Tablizer and TOPMind); the oppositional nature of these interactions led to TOP being dismissed as inferior to OOP (whereas the concepts of TOP could be quite useful within an object-oriented programming context), and his many valid points being dismissed by those not willing to spend the time deciphering his points. He does, however, seem to have been the first to use the name "Table-oriented programming", which is the most accurate label for the paradigm.

This was an era of consolidation for spreadsheets; Microsoft Excel became the standard, and was eventually left without competitors.

On the Relational Database front, this was the era when MySQL (1995) and PostgreSQL (1996) became popular.

Web 2.0 Era: 2008-2022[edit]

During this era, any necessary table-oriented programming was pushed into the RDBMS, and a standard separation of concerns into "frontend", "backend" and "database" was developed.

Spreadsheets continued as in the previous era, except on the web. Finally a competitor arose for Excel: Google Sheets.

Features[edit]

General-purpose TOP languages share many features with other general-purpose languages.

The core feature of TOP is that tables be given a prominent place in the programming language.

Comparison of TOP streams
Header text General-Purpose TOP Spreadsheets Relational Databases Comments
Tables prominent in language Yes Yes Yes
Code Stored in Tables Yes Yes No
Conveniently manages many tables Yes No Yes
Data Dictionaries Yes No Yes
Column type Named Infinite Named
Row type Infinite Infinite Infinite Not actually infinite, but rows don't need to be named

Design Patterns[edit]

Decision Tables[edit]

Decision tables are a commonly used pattern, especially in the General-purpose TOP languages. A decision table is a table with columns (usually multiple) which represent inputs, and columns (typically singular, but many be multiple) which represent the outputs. Each set of inputs is unique, and the rows of the table should cover all possible combinations of inputs.

Control Tables[edit]

Control tables are an expansion of decision tables; instead of having output columns, they have code stored in the table. When the row for that decision is selected, the code stored in the table is run.

TOP Languages[edit]

General-purpose TOP languages[edit]

  • DETAB-X[3] (1962)
  • Filetab (between 1965 and 1968)
  • The (1986 and following)

Speradsheets[edit]

Relational Databases[edit]

See also[edit]

References[edit]

  1. ^ What is DETAB-X?, Solomon L. Pollack, October 1962.
  2. ^ https://www.historyofinformation.com/detail.php?id=5478
  3. ^ What is DETAB-X?, Solomon L. Pollack, October 1962.