Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dataphor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Languages==== While Dataphor supports a SQL flavor they call "RealSQL",<ref>http://c2.com/cgi/wiki?AlphoraDataphor {{Bare URL inline|date=August 2022}}</ref> D4 is the preferred language for use within Dataphor, D4 supports [[Data Definition Language|DDL]] and [[Data Manipulation Language|DML]] statements. D4 queries tend to look like [[relational algebra]] expressions with written out names of operators. For example: {| class="wikitable" |- ! SQL statement !! Equivalent D4 statement |- | {{code|lang=sql|SELECT * FROM User}} || {{code|select User}} |- | {{code|lang=sql|1=SELECT * FROM User NATURAL JOIN Department}} || <code>select User [[natural join|join]] Department</code> |- | {{code|lang=sql|SELECT DISTINCT Name FROM User}}|| {{code|select User over { Name }}} |} =====Syntax===== D4 has a [[Pascal (programming language)|Pascal]]-like syntax. D4 sample code is usually written in [[UpperCamelCase]], which is also widely used in Pascal and [[Delphi (programming language)|Delphi]] systems. Like most query languages, D4 has a [[Data Definition Language]] (DDL) and a [[Data Manipulation Language]] (DML). D4 also has an [[Imperative programming|Imperative]] 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 operator|relational]] [[Declarative programming|declarative]] statements to be used, which many believe is superior to the procedural style operations used in [[SQL]]. ======Data Manipulation Language====== The DML syntax at first glance may appear to be similar to [[SQL]]s syntax, but because of D4's closer ties to [[relational algebra]], the syntax has a cleaner definition, and most users greatly prefer it over SQL. {{Citation needed|date=June 2009}} ======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, the system that uses the language. It was some time after these names were decided that its creators discovered Tutorial D, and the coincidence it had with that name. Since discovering Tutorial D and The Third Manifesto, the creators have used The Third Manifesto as a guide in making Dataphor and D4. Since then, [[Hugh Darwen]] has referred to D4, as a notable project in his talk entitled ''The Askew Wall''.<ref name="The Askew Wall"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)