D4 (programming language)
Encyclopedia
D4 is a computer language used in Dataphor
Dataphor
Dataphor is an open-source truly relational database management system and its accompanying user interface technologies, which together are designed to provide highly declarative software application development...

, a relational database management system
Relational database management system
A relational database management system is a database management system that is based on the relational model as introduced by E. F. Codd. Most popular databases currently in use are based on the relational database model....

.

Syntax

Alphora, the creators of D4, have given it a Pascal
Pascal (programming language)
Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.A derivative known as Object Pascal...

 like syntax. Sample code in D4 made by Alphora is usually written in UpperCamelCase, which is also widely used in Pascal and Delphi systems.

Like most query languages, D4 has a Data Definition Language
Data Definition Language
A data definition language or data description language is a syntax similar to a computer programming language for defining data structures, especially database schemas.-History:...

 (DDL) and a Data Manipulation Language
Data Manipulation Language
A data manipulation language is a family of syntax elements similar to a computer programming language used for inserting, deleting and updating data in a database...

 (DML). D4 also has an Imperative
Imperative programming
In computer science, imperative programming is a programming paradigm that describes computation in terms of statements that change a program state...

 Language for procedural code.

Data definition language

The DDL for Dataphor bears many similarities to other DBMSs, but with an obviously Pascal-like twist. Many of the allowed DDL operations, like constraints, allow relational
Relational
Relational may refer to:*Relational *Relational aggression*Relational algebra*Relational art*Relational database*Relational calculus*Relational operator*Relational model*Relational theory*Relational philosophy*Relational psychoanalysis...

 declarative
Declarative programming
In computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. Many languages applying this style attempt to minimize or eliminate side effects by describing what the program should accomplish, rather than...

 statements to be used, which many believe is superior to the procedural style operations used in SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 ex: create, drop, truncate, alter.

Data manipulation language

The DML syntax at first glance may appear to be similar to SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

s syntax, but because of D4's closer ties to relational algebra
Relational algebra
Relational algebra, an offshoot of first-order logic , deals with a set of finitary relations that is closed under certain operators. These operators operate on one or more relations to yield a relation...

, the syntax has a cleaner definition, and most users greatly prefer it over SQL.

Imperative language

The Imperative Language in D4 is remarkably similar to Pascal in many respects. The largest distinction being that D4 also allows DDL and DML statements to be run in regular procedural code.

History

D4 was named after the similar sounding Dataphor
Dataphor
Dataphor is an open-source truly relational database management system and its accompanying user interface technologies, which together are designed to provide highly declarative software application development...

, the system that uses the language. It was some time after these names were decided that Alphora discovered Tutorial D, and the coincidence it had with that name. Since discovering Tutorial D and The Third Manifesto
The Third Manifesto
The Third Manifesto is Christopher J. Date's and Hugh Darwen's proposal for future database management systems, a response to two earlier Manifestos with the same purpose. The theme of the manifestos is how to avoid the 'object-relational impedance mismatch' between object-oriented programming...

, Alphora has used The Third Manifesto as a guide in making Dataphor and D4.

In early 2008, the Alphora name and the Dataphor product were acquired by Database Consulting Group LLC, founded by the original developers of Dataphor, and was re-licensed as open source.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK