Printer Friendly
The Free Library
14,735,889 articles and books
Member login
User name  
Password 
 
Join us Forgot password?

Complex quantification in Structured Query Language (SQL): a tutorial using relational calculus.


The Structured Query Language See SQL.

Structured Query Language - SQL
 (SQL SQL
 in full Structured Query Language.

Computer programming language used for retrieving records or parts of records in databases and performing various calculations before displaying the results.
) forms a substantial component of introductory database courses and is supported by almost every commercial database product. One disadvantage In policy debate, a disadvantage (abbreviated as DA, and sometimes referred to as a Disad) is an argument that a team brings up against a policy action that is being considered. Structure
A DA usually has four key elements.
 of SQL is that it does not provide a universal quantification In predicate logic, universal quantification is an attempt to formalize the notion that something (a logical predicate) is true for everything, or every relevant thing.  construct. Queries that have twisted universal and existential quantifiers existential quantifier - quantifier  can be stunning for students, practitioners, or even instructors. Universal quantification exists in natural languages and proliferates in our daily logic. Experience shows that students can infer the rigorous logic, such as the tuple relational calculus The tuple calculus is a calculus that was introduced by Edgar F. Codd as part of the relational model in order to give a declarative database query language for this data model. , from natural language queries A query expressed by typing English, French or any other spoken language in a normal manner. For example, "how many sales reps sold more than a million dollars in any eastern state in January?" In order to allow for spoken queries, both a voice recognition system and natural language , but find it cumbersome cum·ber·some  
adj.
1. Difficult to handle because of weight or bulk. See Synonyms at heavy.

2. Troublesome or onerous.



cum
 to translate (1) To change one language into another; for example, assemblers, compilers and interpreters translate source language into machine language.

(2) In computer graphics, to move an image on screen without rotating it.
 it to SQL. To bridge this gap, this article develops a systematic method to translate tuple relational calculus queries to SQL. This is accomplished by introducing the SQL-Normal-From of tuple relational calculus from which generating SQL code is straightforward. The approach is illustrated by a series of examples. This method was voluntarily adopted by a vast majority of students when it was introduced in a third-year Adj. 1. third-year - used of the third or next to final year in United States high school or college; "the junior class"; "a third-year student"
junior, next-to-last
 introductory course on database systems.

**********

SQL is the most commonly used language in commercial relational database management systems See DBMS for a shorter list of “typical”, representative database management systems. Open-source software
  • CSQL
  • Derby aka Java DB
  • Firebird
  • Gladius DB
  • H2
  • HSQLDB
  • Ingres
  • LucidDB
  • MaxDB
  • Mckoi SQL Database
  • MonetDB
, such as Oracle, SQL Server An earlier relational DBMS from Sybase and from Microsoft. Sybase introduced SQL Server in 1988 for various Unix versions. In that same year, with help from IBM, Sybase created an OS/2 version that Microsoft licensed and branded as Microsoft SQL Server. , and Ingress An entrance. Contrast with "egress," which means exit. See ingress traffic. See also Ingres 2006. , and forms a substantial component of undergraduate courses on database systems (Date, 2000; Elmasri & Navathe, 2000; Korth, Silberschatz, & Sudarshan Sudarshan can mean the name of the following persons:
  • H. Sudarshan - Right Livelihood and Padma Shri award winner, known for his work with the Soliga tribes of Karnataka, India
, 1999). As noted by Date (1984), SQL has many shortcomings A shortcoming is a character flaw.

Shortcomings may also be:
  • Shortcomings (SATC episode), an episode of the television series Sex and the City
. One major disadvantage of SQL is its lack of a direct support to a universal quantification construct. The for all and every English 1. English - (Obsolete) The source code for a program, which may be in any language, as opposed to the linkable or executable binary produced from it by a compiler. The idea behind the term is that to a real hacker, a program written in his favourite programming language is  phrases can be satisfied in SQL through negating its existential quantifier construct EXISTS. However, when these phrases become nested and twisted with each other and with existential ex·is·ten·tial  
adj.
1. Of, relating to, or dealing with existence.

2. Based on experience; empirical.

3. Of or as conceived by existentialism or existentialists:
 phrases, translating the English query To interrogate a collection of data such as records in a database. The term may also be used to search a single file or collection of files such as HTML files on the Web. However, in addition to obtaining lists of records that match the search criteria, queries to a database allow for  to SQL can be a very subtle process, even for the most experienced. Quantification quan·ti·fy  
tr.v. quan·ti·fied, quan·ti·fy·ing, quan·ti·fies
1. To determine or express the quantity of.

2.
 in SQL is far more complex than joining and grouping. Yet, Resiner (1981) reported that users even have some difficulties using the SQL join and group constructs. Date (2000) proposed some work techniques to avoid the use of quantification in SQL. Nevertheless, these proposed techniques require other constructs that are not supported in many commercial implementations of SQL, as Date (2000) warned. Thus, the use of quantifiers in SQL is unavoidable.

The use of universal quantifiers universal quantifier - quantifier  to comprehend and express the for all and every phrases is more natural and intuitive than negating existential quantifiers. Consider the following statement:
  Every company, which is destroying at least one forest, is savage,
  and every person who lives in Canada is concerned (1) about such
  companies.


This statement could be equivalently written in English, eliminating all universal quantifiers (every phrases) as follows:
  It is not true that there is a company that is destroying at least
  one forest and this company is not savage, or there is a person who
  lives in Canada and who is not concerned about that company.


The simplicity of the use of universal versus existential quantifiers in this example is evident. This is still true even after resolving the ambiguity Ambiguity
Delphic oracle

ultimate authority in ancient Greece; often speaks in ambiguous terms. [Gk. Hist.: Leach, 305]

Iseult’s vow

pledge to husband has double meaning. [Arth.
 that results from determining the scope of "It is not true that." Moreover, only "bracketing A still camera technique for ensuring correct exposure. One picture is taken directly at, one slightly under and one slightly over the estimated exposure. See bracket. " the rest of the statement, something that requires more than English, can eliminate this ambiguity.

The use of implications with universal quantifiers is also a natural and intuitive way to express the for all and every English phrases. Furthermore, programmers This is a list of programmers notable for their contributions to software, either as original author or architect, or for later additions.

See also: Game programmer, List of computer scientists

, including students in the Computing computing - computer  disciplines, are accustomed to the use of if-then constructs. Rewriting re·write  
v. re·wrote , re·writ·ten , re·writ·ing, re·writes

v.tr.
1. To write again, especially in a different or improved form; revise.

2.
 the example with implications (if-then), results in the following:
  For every c, if c is a company that is destroying at least one
  forest f then c is savage and for every p, if p is a person living
  in Canada then p is concerned about c.


It can be easily confirmed that this statement is easier to express and understand than the following, which does not use implications, although it is logically equivalent to the previous one:
  For every c, either c is not a company or there is no forest f that
  c is destroying or c is savage, and for every p, either p is not a
  person or p does not live in Canada or p is not concerned about c.


Experience shows that students find it easier to translate English phrases to first-order predicate A first-order predicate is a predicate that takes only individual(s) constants or variables as argument(s). Compare second-order predicate and higher-order predicate. See also
  • First-order predicate calculus
 logical expressions than to SQL. This is due to the fact that universal quantification is abundant in our natural language use, but expressing it in SQL requires the negation NEGATION. Denial. Two negations are construed to mean one affirmation. Dig. 50, 16, 137.  of existential quantification In predicate logic, an existential quantification is the predication of a property or relation to at least one member of the domain. The logical operator symbol ∃ called the existential quantifier is used to denote existential quantification. , which can be quite unintuitive. The tuple relational calculus theoretical query language A generalized language that allows a user to select records from a database. It uses a command language, menu-driven method or a query by example (QBE) format for expressing the matching condition.  (Codd, 1972) is among the concepts that students learn in the same course with SQL. It uses first-order predicate logic and can be used as an intermediate step between English queries and SQL (Date, 1992).

This tutorial An instructional book or program that takes the user through a prescribed sequence of steps in order to learn a product. Contrast with documentation, which, although instructional, tends to group features and functions by category. See tutorials in this publication.  presents a systematic, easy-to-follow method to translate relational calculus The rules for combining and manipulating relations; for example De Morgan's law, "the complement of a union is equal to the union of the complements."

(database) relational calculus
 expressions to SQL queries. The approach is demonstrated by example, using a handful of English queries with complicated quantification structures. These are first rewritten in tuple relational calculus using both kinds of quantification and using implication implication

In logic, a relation that holds between two propositions when they are linked as antecedent and consequent of a true conditional proposition. Logicians distinguish two main types of implication, material and strict.
 with universal quantifiers. Then, a sequence of well-defined well-de·fined
adj.
1. Having definite and distinct lines or features: a well-defined silhouette.

2.
 steps to translate these calculus calculus, branch of mathematics that studies continuously changing quantities. The calculus is characterized by the use of infinite processes, involving passage to a limit—the notion of tending toward, or approaching, an ultimate value.  expressions to a special form, which we call the SQL-Normal-Form, makes the generation of the SQL code automatic.

We found this method extremely helpful for undergraduate students in a third-year course on database systems, and we presume pre·sume  
v. pre·sumed, pre·sum·ing, pre·sumes

v.tr.
1. To take for granted as being true in the absence of proof to the contrary: We presumed she was innocent.
 it is so for practitioners who are involved in this kind of logically twisted queries and for instructors as well.

Before introducing the translation method in the section. "Translation to SQL" some required definitions and preliminaries are reviewed in "Preliminaries." The section "Example Database," contains an example database, on which the example queries of "More Examples" are based. The final section concludes the article.

PRELIMINARIES

In a relational data model (database) relational data model - (Or "relational model") A data model introduced by E.F. Codd in 1970, particularly well suited for business data management. In this model, data are organised in tables. The set of names of the columns is called the "schema" of the table. , a relation schema is a set of attributes [a.sub.i] denoted by [R.sub.s]([a.sub.1], [a.sub.2], ..., [a.sub.n]). The domain [D.sub.i] of attribute (1) In relational database management, a field within a record.

(2) In object technology, a single element of data. See instance attribute and static attribute.
 [a.sub.i] is a specific set of values that can be assigned as·sign  
tr.v. as·signed, as·sign·ing, as·signs
1. To set apart for a particular purpose; designate: assigned a day for the inspection.

2.
 to [a.sub.i]. An [R.sub.s] tuple (1) In a relational database, a tuple is one record (one row). See record and relational database.

(2) A set of values passed from one programming language to another application program or to a system program such as the operating system.
 t is a sequence of values <[v.sub.1], [v.sub.2], ..., [v.sub.n]> where the value [v.sub.i] is taken from [D.sub.i]. A relation R, an instance of relation schema [R.sub.s], is a set of [R.sub.s] tuples. If R = {[t.sub.1], [t.sub.2], ..., [t.sub.m]}, then [t.sub.1], [t.sub.2], ..., [t.sub.m] are said to range on R.

Relational Calculus

Relational calculus is a nonprocedural formal query language. The variant variant /var·i·ant/ (var´e-ant)
1. something that differs in some characteristic from the class to which it belongs.

2. exhibiting such variation.


var·i·ant
adj.
 of relational calculus that is used in this tutorial is the tuple relational calculus. The first formal definition for tuple relational calculus is due to Codd (1972), who also developed an algorithm algorithm (ăl`gərĭth'əm) or algorism (–rĭz'əm) [for Al-Khowarizmi], a clearly defined procedure for obtaining the solution to a general type of problem, often numerical.  to translate from relational calculus to relational algebra (1) The branch of mathematics that deals with relations; for example, AND, OR, NOT, IS and CONTAINS.

(2) In a relational database, a collection of rules for dealing with tables; for example, JOIN, UNION and INTERSECT.
, another theoretical query language. A tuple relational calculus expression is defined by the following series of definitions, starting with the definition of an atom (Elmasri & Navathe, 2000).

Definition. An atom is any of the following:

* R(t) where R is a relation and t is a tuple variable.

* [t.sub.i].a [omega] [t.sub.j].b where [omega] [member of] {=, [not equal to], <, [less than or equal to], >, [greater than or equal to]}, a and b are attributes of the relations on which [t.sub.i] and [t.sub.j] range, respectively.

* t.a [omega] c or c [omega] t.a where t, [omega], and a are as defined, and c is a constant value.

A formula is a condition that consists of n [greater than or equal to] 1 atoms combined by the logical operators: [conjunction] (conjunction), [disjunction disjunction /dis·junc·tion/ (-junk´shun)
1. the act or state of being disjoined.

2. in genetics, the moving apart of bivalent chromosomes at the first anaphase of meiosis.
] (disjunction), [right arrow] (implication), and [logical not] (negation). In addition, [for all], the universal quantifier, and [there exists], the existential quantifier, can occur in formulas. The following is a more precise definition.

Definition. If F, [F.sub.1], and [F.sub.2] are formulas and t a tuple variable, then each of the following is a formula:

* An atom

* (F)

* [F.sub.1] [conjunction] [F.sub.2]

* [F.sub.1] [disjunction] [F.sub.2]

* [F.sub.1] [right arrow] [F.sub.2]

* [logical not] F

* ([for all]t) (F(t))

* ([there exists]t) (F(t))

Next, the formal definition of a tuple relational calculus expression is stated.

Definition. A tuple relational calculus expression N is of the form

N = {[t.sub.1].[a.sub.1], [t.sub.2].[a.sub.2], ..., [t.sub.n].[a.sub.n] | F([t.sub.1], [t.sub.2], ..., [t.sub.n], [t.sub.n+1], [t.sub.n+2], ..., [t.sub.n+m])}

where [t.sub.i] are tuple variables, [a.sub.i] are attributes of the relation on which the tuples [t.sub.i] range, and F is a formula.

SQL

In general, an SQL query has the following form (Date & Darwen Darwen (där`wĭn, dăr`ĕn), town (1991 pop. 30,833), Lancashire, NW England. Engineering and the manufacture of wallpaper, paint, and plastics are the major industries. The importance of textile production in Darwen has declined. , 1993):
    SELECT [a.sub.1], [a.sub.2], ..., [a.sub.n]
    FROM [R.sub.1], [R.sub.2], ..., [R.sub.m]
    WHERE P


where [a.sub.i], [R.sub.j], and P respectively are attributes, relations, and a predicate In programming, a statement that evaluates an expression and provides a true or false answer based on the condition of the data. .

Predicates may consist of constructs that contain further (nested) SQL queries, called correlated cor·re·late  
v. cor·re·lat·ed, cor·re·lat·ing, cor·re·lates

v.tr.
1. To put or bring into causal, complementary, parallel, or reciprocal relation.

2.
 queries. One such construct which is of special interest in this tutorial is the EXISTS construct. EXISTS takes an SQL correlated query as an argument and evaluates to false only if its argument returns no values (the query has an empty result). Otherwise, it evaluates to true.

An SQL query with an EXISTS construct is of the following general form:
    SELECT [a.sub.1], [a.sub.2], ..., [a.sub.n]
    FROM [R.sub.1], [R.sub.2], ..., [R.sub.m]
    WHERE EXISTS
        (SELECT [a'.sub.1], [a'.sub.2], ..., [a'.sub.n]
        FROM [R'.sub.1], [R'.sub.2], ..., [R'.sub.m]
        WHERE P)


where [a'.sub.i], [R.sub.j], and P respectively are attributes, relations, and a predicate. The predicate P possibly consists of further SQL constructs and correlated queries, and henceforth From this time forward.

The term henceforth, when used in a legal document, statute, or other legal instrument, indicates that something will commence from the present time to the future, to the exclusion of the past.
. Since SQL does not have a universal quantification construct, programmers must negate ne·gate  
tr.v. ne·gat·ed, ne·gat·ing, ne·gates
1. To make ineffective or invalid; nullify.

2. To rule out; deny. See Synonyms at deny.

3.
 its EXISTS construct to capture universal quantifiers.

EXAMPLE DATABASE

Figure 1 depicts an ER diagram diagram /di·a·gram/ (di´ah-gram) a graphic representation, in simplest form, of an object or concept, made up of lines and lacking pictorial elements.  of a simple forestry forestry, the management of forest lands for wood, water, wildlife, forage, and recreation. Because the major economic importance of the forest lies in wood and wood products, forestry has been chiefly concerned with timber management, especially reforestation,  database (Bradley, 1982). The database consists of five entity types: Species, Forest, Tree, Employee, and Measurement. It also consists of four relationship types: of, on, in, and works. It is intended to maintain data on forests where trees of different species exist. Employees who work in a certain forest carry measurements on the trees in that forest.

Semantics semantics [Gr.,=significant] in general, the study of the relationship between words and meanings. The empirical study of word meanings and sentence meanings in existing languages is a branch of linguistics; the abstract study of meaning in relation to language or  of Entity Types

* Species attributes are the species name (sname), bark bark, sailing vessel
bark or barque (both: bärk), sailing vessel with three masts, of which the mainmast and the foremast are square-rigged while the mizzenmast is fore-and-aft-rigged.
 color (bcolor), and maximum height (maxht), sname is Species primary attribute.

* A Tree has the attributes tree number (tree#) and the year it was planted (planted). Its primary attribute is tree#.

* Forest is described by a name (fname), area (size), location (loc) and an altitude altitude, vertical distance of an object above some datum plane, such as mean sea level or a reference point on the earth's surface. It is usually measured by the reduction in atmospheric pressure with height, as shown on a barometer or altimeter. . Forest's primary attribute is fname.

* Each Employee has a number (emp#), year employed (year), and a salary. The attribute emp# is the Employee's primary attribute.

* Measurement is described by a measurement number (meas#), year and month performed, trunk A communications channel between two points. It generally refers to a high-bandwidth, fiber-optic line between telephone switching centers (central offices). Telephone "trunks" handle thousands of simultaneous voice and data signals, whereas telephone "lines" are the wires from the  size (trunk), height, and the number of branches (branch). The Measurement's primary attribute is meas#.

[FIGURE 1 OMITTED]

Semantics of Relationship Types

* in is a 1:N relationship type relating Forest to Tree. Several trees could be in a certain forest, but a tree can exist in one forest only.

* of is a 1:N relationship type relating Tree to Species. Many trees could be of a certain species, and a tree is of one species only.

* on is a 1:N relationship type relating Tree to Measurement. A tree can have many measurements performed on it, but a measurement is performed on one tree only.

* works is a 1:N relationship type relating Forest to Employee. Several employees may work in a particular forest, and an employee works in one forest only.

The translation of the ER diagram to relation schema is given in Figure 2.

[FIGURE 2 OMITTED]

Running Example

In the following sections, the following query (Query 1) is used as a running example to illustrate the method introduced in this article. The section "Translation to SQL" will provide more examples of varying complexities.

Query 1: Get the species name of each species with red bark were one and all trees of that species where planted before 1985.

The Relational calculus expression for Query 1, [N.sub.1], is:

[N.sub.1] = {s.sname|Species(s) [conjunction] s.bcolor = RED [conjunction]

([for all]t)(Tree(t) [conjunction] t.sname = s.sname) [right arrow] t.planted < 1985) [conjunction]

([there exists]t)(Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

TRANSLATION TO SQL

This section introduces the systematic procedure to translate tuple relational calculus expressions to SQL queries. The key idea is to rewrite re·write  
v. re·wrote , re·writ·ten , re·writ·ing, re·writes

v.tr.
1. To write again, especially in a different or improved form; revise.

2.
 these expressions in a special form, which we call the SQL-Normal-Form, and abbreviate it SQLNF. Once in SQLNF, a relational calculus expression can be translated to SQL easily.

SQLNF

The main idea in SQLNF is to eliminate universal quantifiers from the relational calculus expression. first, the following equivalences must be recalled where F, [F.sub.1], and [F.sub.2] are formulas and t is a tuple variable.

Logical Equivalences In logic, statements p and q are logically equivalent if they have the same logical content.

Syntactically, p and q are equivalent if each can be proved from the other.
 

* Implication: ([F.sub.1] [right arrow] [F.sub.2]) [left and right arrow] ([logical not] [F.sub.1] [disjunction] [F.sub.2])

* Universal Quantification: ([for all]t)(F(t)) [left and right arrow] ([logical not][there exists]t) [logical not] (F(t))

* DeMorgan's: [logical not]([F.sub.1] [conjunction] [F.sub.2]) [left and right arrow] ([logical not][F.sub.1] [disjunction] [logical not][F.sub.2]) and [logical not]([F.sub.1] [disjunction] [F.sub.2]) [left and right arrow] ([logical not][F.sub.1] [conjunction] [logical not][F.sub.2])

* Double Negation: [logical not] [logical not] F [left and right arrow] F

The highlighted negation in the formula ([logical not][there exists]t)[logical not](F(t)) is referred by a sandwiched negation.

Definition. A formula F is in SQLNF if it does not contain each of the following:

* Double Negation

* Universal Quantification

* Implication

* Sandwiched Negation

Each one of these undesired forms can be eliminated by one of the equivalences previously stated. In particular, the sandwiched negation can be eliminated by applying DeMorgan's (i.e., replacing ([logical not][there exists]t)[logical not](F(t)) by ([logical not][there exists]t)([logical not]F(t))).

Definition. A tuple relational calculus expression

N = {[t.sub.1].[a.sub.1], [t.sub.2].[a.sub.2], ..., [t.sub.n].[a.sub.n]|F([t.sub.1], [t.sub.2], ..., [t.sub.n], [t.sub.n+1], [t.sub.n+2], ..., [t.sub.n+m])}

is in SQLNF if and only if F is in SQLNF.

The following normalization In relational database management, a process that breaks down data into record groups for efficient processing. There are six stages. By the third stage (third normal form), data are identified only by the key field in their record.  procedure puts an tuple relation calculus expression N in SQLNF.

Normalization Procedure

1. Eliminate all implications (by applying Implication).

2. Eliminate all universal quantifiers (by applying Universal Quantification).

3. Eliminate double negation (by applying Double Negation).

4. Eliminate sandwiched negation (by applying DeMorgan's).

This process is referred to as normalization and an expression that is in SQLNF is said to be normalized. This normalization procedure is illustrated through Query 1 given in the previous section.

Normalizing Query 1

[N.sub.1] = {s.sname|Species(s) [conjunction] s.bcolor = RED [conjunction]

([for all]t)((Tree(t) [conjunction] t.sname = s.sname) [right arrow] t.planted < 1985) [conjunction]

([there exists]t)(Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

1. Eliminate implications:

[N.sub.1]'s only implication

(Tree(t) [conjunction] t.sname = s.sname) [right arrow] t.planted < 1985

is replaced by

[logical not] (Tree(t) [conjunction] t.sname = s.sname) [disjunction] t.planted < 1985

which yields the following

[N.sub.1] = {s.sname|Species(s) [conjunction] s.bcolor = RED [conjunction]

([for all]t)([logical not](Tree(t) [conjunction] t.sname = s.sname) [disjunction] t.planted < 1985) [conjunction]

([there exists]t)(Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

2. Eliminate universal quantifiers:

The universal quantifier

([for all]t)([logical not](Tree(t) [conjunction] t.sname = s.sname) [disjunction] t.planted < 1985)

is replaced by

([logical not][there exists]t) [logical not] ([logical not](Tree(t) [conjunction] t.sname = s.sname) [disjunction] t.planted < 1985)

resulting in

[N.sub.1] = {s.sname|Species(s) [conjunction] s.bcolor = RED [conjunction]

([logical not][there exists]t) [logical not] ([logical not](Tree(t) [conjunction] t.sname = s.sname) [disjunction] t.planted < 1985) [conjunction]

([there exists]t)(Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

There are no further universal quantifiers in [N.sub.1].

3. Eliminate sandwiched negation:

The sandwiched negation

([logical not][there exists]t) [logical not] ([logical not](Tree(t) [conjunction] t.sname = s.sname) [disjunction] t.planted < 1985)

is moved inside the brackets brackets: see punctuation.  and DeMorgan's is applied, yielding

([logical not][there exists]t)([logical not] [logical not](Tree(t) [conjunction] t.sname = s.sname) [conjunction] t.planted [greater than or equal to] 1985)

The query becomes

[N.sub.1] = {s.sname|Species(s) [conjunction] s.bcolor = RED [conjunction]

([logical not][there exists]t) ([logical not] [logical not](Tree(t) [conjunction] t.sname = s.sname) [conjunction] t.planted [greater than or equal to] 1985) [conjunction]

([there exists]t) (Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

4. Eliminate double negation:

Finally, the double negation [logical not] [logical not] (Tree(t)...) is simply dropped out, resulting in the following normalized query expression

[N.sub.1] = {s.sname|Species(s) [conjunction] s.bcolor = RED [conjunction]

([logical not][there exists]t) ((Tree(t) [conjunction] t.sname = s.sname) [conjunction] t.planted [greater than or equal to] 1985) [conjunction]

([there exists]t)(Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

SQL Queries

Given an expression N in SQLNF, N = {[t.sub.1].[a.sub.1],[t.sub.2].[a.sub.2], ..., [t.sub.n].[a.sub.n]|F([t.sub.1],[t.sub.2], ...,[t.sub.n],[t.sub.n+1], [t.sub.n+2], ..., [t.sub.n+m])}, the translation to SQL is straightforward. The list [t.sub.1].[a.sub.1],[t.sub.2].[a.sub.2], ...,[t.sub.n].[a.sub.n] is called the left part of N and F([t.sub.1],[t.sub.2], ..., [t.sub.n],[t.sub.n+1],[t.sub.n+2], ...,[t.sub.n+m]) is called the right part of N. Let [R.sub.i](t) and [R.sub.j](t) denote de·note  
tr.v. de·not·ed, de·not·ing, de·notes
1. To mark; indicate: a frown that denoted increasing impatience.

2.
 relations with tuple variable t in F. Translating expressions in SQLNF is accomplished through the following procedure.

Translation Procedure

1. The SELECT clause consists of the left part.

2. The FROM clause consists of each [R.sub.i](t) in the right part, where [R.sub.i](t) is not within the scope of a quantifier (logic) quantifier - An operator in predicate logic specifying for which values of a variable a formula is true. Universally quantified means "for all values" (written with an inverted A, LaTeX \forall) and existentially quantified means "there exists some value" (written with a .

3. The WHERE clause consists of F translated to SQL constructs, excluding each [R.sub.i](t) that is not within the scope of a quantifier. Since F is in SQLNF it must only consist of existential quantifiers and logical operators that exist in SQL. For each occurrence of an [R.sub.j](t), we should expect a correlated SQL query having [R.sub.j] in its FROM clause.

This procedure is best explained by example. Below is the translation of the normalized Query 1. Recall the normalized relational calculus expression of Query 1:

[N.sub.1] = {s.sname | Species(s) [conjunction] s.bcolor = RED [conjunction]

([logical not][there exists]t) ((Tree(t) [conjunction] t.sname = s.sname) [conjunction] t.planted [greater than or equal to] 1985) [conjunction]

([there exists]t)(Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1985)}

The left part of [N.sub.1] is s.sname and the SQL query must start with SELECT s.sname. The FROM clause is FROM Species s since Species(s) is not bound by a quantifier. The WHERE clause consists of the rest of the right part of [N.sub.1], starting with the condition t.planted [greater than or equal to] 1985, and translating to WHERE t.planted [greater than or equal to] 1985. The following part of the query [conjunction] (([logical not][there exists]t) ((Tree(t) [conjunction] t.sname = s.sname) [conjunction] t.planted [greater than or equal to] 1985)) starts with ([logical not][there exists]t), where t is a Tree. This translates to AND NOT EXISTS (SELECT * FROM TREE t WHERE t.sname = s.sname AND t.planted [greater than or equal to] 1985). Similarly the last part translates to AND EXISTS (SELECT * FROM TREE t WHERE t.sname = s.sname AND t.planted < 1985). The complete query and its corresponding relational calculus expression is given next.

MORE EXAMPLES

This section presents more example queries, with an increasing level of complexity. Queries 2 to 5 are stated in plain English Plain English (sometimes known, more broadly, as plain language) is a communication style that focuses on considering the audience's needs when writing. It recommends avoiding unnecessary words and avoiding jargon, technical terms, and long and ambiguous sentences.  and tuple relational calculus. Each is normalized and then systematically translated to SQL, following the procedure outlined in the previous sections.

Query 2

Get the name and location of each forest under 1000 square meters Noun 1. square meter - a centare is 1/100th of an are
centare, square metre

area unit, square measure - a system of units used to measure areas
 in which every tree was planted before 1960 and has had at least one measurement showing a height over 20 meters.

Relational Calculus Expression for Query 2

[N.sub.2] = {f.fname, f.loc|Forest(f) [conjunction] f.size < 1000 [conjunction]

([for all]t)((Tree(t) [conjunction] t.fname = f.fname) [right arrow] (t.planted < 1960 [conjunction]

([there exists]m)(Measeurement(m) [conjunction] m.tree# = t.tree# [conjunction] m.height > 20)))}

Normalizing Query 2

1. Eliminate implications:

[N.sub.2] = {f.fname,f.loc|Forest(f) [conjunction] f.size < 1000 [conjunction]

([for all]t)([logical not](Tree(t) [conjunction] t.fname = f.fname) [disjunction] (t.planted < 1960 [conjunction]

([there exists]m)(Measeurement(m) [conjunction] m.tree# = t.tree# [conjunction] m.height > 20)))}

2. Eliminate universal quantifiers:

[N.sub.2] = {f.fname,f.loc|Forest(f) [conjunction] f.size < 1000 [conjunction]

([logical not][there exists]t) [logical not]([logical not](Tree(t) [conjunction] t.fname = f.fname) [disjunction] (t.planted < 1960 [conjunction]

([there exists]m)(Measeurement(m) [conjunction] m.tree# = t.tree# [conjunction] m.height > 20)))}

3. Eliminate sandwiched negation:

[N.sub.2] = {f.fname,f.loc|Forest(f) [conjunction] f.size < 1000 [conjunction]

([logical not][there exists]t)([logical not][logical not](Tree(t) [conjunction] t.fname = f.fname) [conjunction] [logical not] (t.planted < 1960 [conjunction]

([there exists]m)(Measeurement(m) [conjunction] m.tree# = t.tree# [conjunction] m.height > 20)))}

4. Eliminate double negation:

[N.sub.2] = {f.fname,f.loc|Forest(f) [conjunction] f.size < 1000 [conjunction]

([logical not][there exists]t)((Tree(t) [conjunction] t.fname = f.fname) [conjunction] [logical not] (t.planted < 1960 [conjunction]

([there exists]m)(Measeurement(m) [conjunction] m.tree# = t.tree# [conjunction] m.height > 20)))}

Note that [N.sub.2] is in SQLNF at this stage. It is safe to stop here or apply DeMorgan's one more time to get the following expression:

[N.sub.2] = {f.fname,f.loc|Forest(f) [conjunction] f.size < 1000 [conjunction]

([logical not] [there exists]t)((Tree(t) [conjunction] t.fname = f.fname) [conjunction] (t.planted [greater than or equal to] 1960 [disjunction]

([logical not][there exists]m)(Measeurement(m) [conjunction] m.tree# = t.tree# [conjunction] m.height > 20)))}

Both expressions are in SQLNF and both should translate to SQL systematically.

Query 3

Get the name and bark color for each species with a maximum height exceeding 30 meters such that every tree of that species that was planted before 1960 has had every measurement showing a height greater than 15 meters.

Relational Calculus Expression for Query 3

[N.sub.3] = {s.sname, s.bcolor | Species(s) [conjunction] s.maxht > 30 [conjunction]

([for all]t)((Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1960) [right arrow]

([for all]m)((Measurement(m) [conjunction] m.tree# = t.tree#) [right arrow] m.height > 15))}

Normalizing Query 3

1. Eliminate implications:

[N.sub.3] = {s.sname, s.bcolor | Species(s) [conjunction] s.maxht > 30 [conjunction]

([for all]t)([logical not](Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1960) [disjunction]

([for all]m)([logical not](Measurement(m) [conjunction] m.tree# = t.tree#) [disjunction] m.height > 15))}

2. Eliminate universal quantifiers:

[N.sub.3] = {s.sname, s.bcolor | Species(s) [conjunction] s.maxht > 30 [conjunction]

([logical not][there exists]t)[logical not]([logical not](Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1960) [disjunction]

([logical not][there exists]m)[logical not]([logical not](Measurement(m) [conjunction] m.tree# = t.tree#) [disjunction] m.height > 15))}

3. Eliminate sandwiched and double negation:

[N.sub.3] = {s.sname, s.bcolor | Species(s) [conjunction] s.maxht > 30 [conjunction]

([logical not][there exists]t)((Tree(t) [conjunction] t.sname = s.sname [conjunction] t.planted < 1960) [conjunction]

([there exists]m)((Measurement(m) [conjunction] m.tree# = t.tree#) [conjunction] m.height [less than or equal to] 15))}

Query 4

Get the name and maximum height of each species that occurs in every Alberta Alberta (ălbûr`tə), province (2001 pop. 2,974,807), 255,285 sq mi (661,188 sq km), including 6,485 sq mi (16,796 sq km) of water surface, W Canada.  forest over 1500 meters in altitude and in which there is at least one employee who has been hired in 1993.

Relational Calculus Expression for Query 4

[N.sub.4] = {s.sname, s.maxht | Species(s) [conjunction]

([for all]f)((Forest(f) [conjunction] f.altitude > 1500 [conjunction] f.loc = ALBERTA) [right arrow]

(([there exists]t)(Tree(t) [conjunction] t.fname = f.fname [conjunction] t.sname = s.sname) [conjunction]

([there exists]e)(Employee(e) [conjunction] e.fname = f.fname [conjunction] e.year = 1993)))}

Normalizing Query 4

1. Eliminate implications:

[N.sub.4] = {s.sname, s.maxht | Species(s) [conjunction]

([for all]f)([logical not](Forest(f) [conjunction] f.altitude > 1500 [conjunction] f.loc = ALBERTA)[disjunction]

(([there exists]t)(Tree(t) [conjunction] t.fname = f.fname [conjunction] t.sname = s.sname) [conjunction]

([there exists]e)(Employee(e) [conjunction] e.fname = f.fname [conjunction] e.year = 1993)))}

2. Eliminate universal quantifiers:

[N.sub.4] = {s.sname, s.maxht | Species(s) [conjunction]

([logical not][there exists]f)[logical not]([logical not](Forest(f) [conjunction] f.altitude > 1500 [conjunction] f.loc = ALBERTA) [disjunction]

(([there exists]t)(Tree(t) [conjunction] t.fname = f.fname [conjunction] t.sname = s.sname) [conjunction]

([there exists]e)(Employee(e) [conjunction] e.fname = f.fname [conjunction] e.year = 1993)))}

3. Eliminate sandwiched and double negation:

[N.sub.4] = {s.sname, s.maxht | Species(s) [conjunction]

([logical not][there exists]f) ((Forest(f) [conjunction] f.altitude > 1500 [conjunction] f.loc = ALBERTA) [conjunction]

(([logical not][there exists]t)(Tree(t) [conjunction] t.fname = f.fname [conjunction] t.sname = s.sname) [disjunction]

([logical not][there exists]e)(Employee(e) [conjunction] e.fname = f.fname [conjunction] e.year = 1993)))}

Query 5

Get the name and size of each forest in Alberta in which every tree was planted before 1960 and has had all but one measurements showing a height over 20 meters.

Relational Calculus Expression for Query 5

[N.sub.5] = {f.fname, f.size | Forest(f) [conjunction] f.loc = ALBERTA [conjunction]

([for all]t)((Tree(t) [conjunction] t.fname = f.fname) [right arrow] (t.planted < 1960 [conjunction]

([for all][m.sub.1])((Measurement([m.sub.1]) [conjunction] [m.sub.1].tree# = t.tree# [conjunction] [m.sub.1].height [less than or equal to] 20) [right arrow]

(([for all][m.sub.2])((Measurement([m.sub.2]) [conjunction] [m.sub.2].tree# = t.tree# [conjunction] [m.sub.1].meas# [not equal to] [m.sub.2].meas#) [right arrow]

([m.sub.2].height > 20))) [conjunction] [there exists]m)(Measurement(m) [conjunction] t.tree# = m.tree# [conjunction] m.height [less than or equal to] 20)))}

Normalizing Query 5

1. Eliminate implications:

[N.sub.5] = {f.fname, f.size | Forest(f) [conjunction] f.loc = ALBERTA [conjunction]

([for all]t) ([logical not](Tree(t) [conjunction] t.fname = f.fname) [disjunction] (t.planted < 1960 [conjunction]

([for all][m.sub.1])([logical not](Measurement([m.sub.1]) [conjunction] [m.sub.1].tree# = t.tree# [conjunction] [m.sub.1].height [less than or equal to] 20) [disjunction]

(([for all][m.sub.2])([logical not](Measurement([m.sub.2]) [conjunction] [m.sub.2].tree# = t.tree# [conjunction] [m.sub.1].meas# [not equal to] [m.sub.2].meas#) [disjunction]

([m.sub.2].height > 20))) [conjunction] ([there exists]m)(Measurement(m) [conjunction] t.tree# = m.tree# [conjunction] m.height [less than or equal to] 20)))}

2. Eliminate universal quantifiers:

[N.sub.5] = {f.fname, f.size | Forest(f) [conjunction] f.loc = ALBERTA [conjunction]

([logical not][there exists]t)[logical not]([logical not](Tree(t) [conjunction] t.fname = f.fname) [disjunction] (t.planted < 1960 [conjunction]

([logical not][there exists][m.sub.1])[logical not]([logical not](Measurement([m.sub.1]) [conjunction] [m.sub.1].tree# = t.tree# [conjunction] [m.sub.1].height [less than or equal to] 20) [disjunction]

(([logical not][there exists][m.sub.2])[logical not]([logical not](Measurement([m.sub.2]) [conjunction] [m.sub.2].tree# = t.tree# [conjunction] [m.sub.1].meas# [not equal to] [m.sub.2].meas#) [disjunction]

([m.sub.2].height > 20))) [conjunction] ([there exists]m)(Measurement(m) [conjunction] t.tree# = m.tree# [conjunction] m.height [less than or equal to] 20)))}

3. Eliminate sandwiched and double negation:

[N.sub.5] = {f.fname, f.size | Forest(f) [conjunction] f.loc = ALBERTA [conjunction]

([logical not][there exists]t) ((Tree(t) [conjunction] t.fname = f.fname) [conjunction] [logical not] (t.planted < 1960 [conjunction]

([logical not][there exists][m.sub.1]) ((Measurement([m.sub.1]) [conjunction] [m.sub.1].tree# = t.tree# [conjunction] [m.sub.1].height [less than or equal to] 20) [conjunction]

(([there exists][m.sub.2]) ((Measurement([m.sub.2]) [conjunction] [m.sub.2].tree# = t.tree# [conjunction] [m.sub.1].meas# [not equal to] [m.sub.2].meas#) [conjunction] [logical not]

([m.sub.2].height > 20))) [disjunction] ([logical not][there exists]m)(Measurement(m) [conjunction] t.tree# = m.tree# [conjunction] m.height [less than or equal to] 20)))}

Expression N5 is already in SQLNF and it is safe to stop here. However, it can be normalized (simplified) further by applying DeMorgan's and Double Negation again, yielding:

[N.sub.5] = {f.fname, f.size | Forest(f) [conjunction] f.loc = ALBERTA [conjunction]

([logical not][there exists]t) ((Tree(t) [conjunction] t.fname = f.fname) [conjunction] (t.planted < 1960 [disjunction]

([there exists][m.sub.1] ((Measurement([m.sub.1]) [conjunction] [m.sub.1].tree# = t.tree# [conjunction] [m.sub.1].height [less than or equal to] 20) [conjunction]

(([there exists][m.sub.2]) ((Measurement([m.sub.2]) [conjunction] [m.sub.2].tree# = t.tree# [conjunction] [m.sub.1].meas# [not equal to] [m.sub.2].meas#) [conjunction]

([m.sub.2].height [less than or equal to] 20))) [disjunction] ([logical not][there exists]m)(Measurement(m) [conjunction] t.tree# = m.tree# [conjunction] m.height [less than or equal to] 20)))}

CONCLUSION

This article presented a tutorial to simplify the writing of complex SQL queries. Precisely, it presented a method by which SQL queries that contain mixed and interrelated in·ter·re·late  
tr. & intr.v. in·ter·re·lat·ed, in·ter·re·lat·ing, in·ter·re·lates
To place in or come into mutual relationship.



in
 complex quantification constructs, universal and existential, can be substantially simplified. The method starts by writing the English query in tuple relational calculus, something that students have relatively less trouble coping with. Then, the calculus expression is transformed into a form, called SQL normal form. Calculus expressions that are in this form only contain constructs that exist in SQL. Therefore, the generation of the SQL query is simple. In particular, universal quantification and implication must be eliminated from the expression before it is translated to SQL. These constructs are intuitive and they can make the logical expression easier to comprehend and write. However, since they do not exist in SQL, the normalization procedure must be followed.

We have introduced the method for students in a first course in databases, typically at the third year level, during different academic years. They have been advised to voluntarily follow the approach, if they find it helpful. With the exception of a negligible This article or section is written like a personal reflection or and may require .
Please [ improve this article] by rewriting this article or section in an .
 minority, all students found the method very handy and used it systematically throughout the course, without being required to do so. This is an indication of the usefulness of the method discussed here.
Translating Query 1

Query 1                         [N.sub.1] = {

SELECT s.sname                    s.sname |
FROM Species s                  Species (s)
WHERE s.bcolor = 'RED'          [conjunction] s.bcolor = RED
AND NOT EXISTS                  [conjunction] ([logical not]
                                  [there exists]t)
  (SELECT *                           (
  FROM TREE t                         Tree(t)
  WHERE t.sname = s.sname             [conjunction] t.sname = s.sname)
  AND t.planted                       [conjunction] t.planted
    [greater than or equal to]          [greater than or equal to] 1985)
    1985)
AND EXISTS                      [conjunction] ([there exists]t)
  (SELECT *                           (
  FROM TREE t                         (Tree(t)
  WHERE t.sname = s.sname             [conjunction] t.sname = s.sname)
  AND t.planted < 1985)               [conjunction] t.planted
                                        [greater than or equal to]
                                        1985)}

Translating Query 2

Query 2                         [N.sub.2] = {

SELECT f.fname, f.loc           f.fname, f.loc |
FROM Forest f                   Forest (f)
WHERE f.size < 1000             [conjunction] f.size < 1000
AND NOT EXISTS                  [conjunction] ([logical not]
                                  [there exists]t)
  (SELECT *                           (
  FROM TREE t                         (Tree(t)
  WHERE t.fname = f.fname             [conjunction] t.fname = f.fname)
  AND (t.planted                      [conjunction] (t.planted
    [greater than or equal to]          [greater than or equal to] 1960
    1960
OR NOT EXISTS                       [disjunction] ([logical not]
                                        [there exists]m)
  (SELECT *                                 (
  FROM Measurement m                        (Measurement (m)
  WHERE m.tree# = t.tree#                   [conjunction] m.tree# =
                                              t.tree#)
  AND m.height > 20)))                      [conjunction] m.height >
                                              20)))}

Translating Query 3

Query 3                          N 3 = {
SELECT s.sname, s.bcolor         s.sname, s.bcolor |
FROM Species s                   Species (s)
WHERE s.maxht > 30               [conjunction] s.maxht > 30
AND NOT EXISTS                   [conjunction] ([logical not]
                                   [there exists]t)
  (SELECT *                            (
  FROM TREE t                          (Tree(t)
  WHERE t.sname = s.sname              [conjunction] t.sname = s.sname
  AND t.planted < 1960                 [conjunction] t.planted < 1960)
  AND EXISTS                           [conjunction] ([there exists]m)
  (SELECT *                            (
  FROM Measurement m                   (Measurement (m)
  WHERE t.tree# = m.tree#              [conjunction] t.tree# = m.tree#)
  AND m.height                         [conjunction] m.height
    [less than or equal to] 15)          [less than or equal to]
                                         15))}

Translating Query 4

Query 4                    [N.sub.4] = {
SELECT s.sname, s.maxht    s.sname, s.maxht |
FROM Species s             Species(s)
WHERE NOT EXISTS           [conjunction] ([logical not][there exists]f)
  (SELECT *                    (
  FROM Forest                  (Forest (f)
  WHERE f.altitude > 1500      [conjunction] f.altitude > 1500
  AND f.loc = 'ALBERTA'        [conjunction] f.loc = ALBERTA
  AND NOT EXISTS               [conjunction] ([logical not]
                                 [there exists]t)
  (SELECT *                          (
  FROM TREE t                        (Tree(t)
  WHERE t.fname = f.fname      [conjunction] tfname = s.fname)
  AND t.sname = s.sname)       [conjunction] t.sname = s.sname)
  OR NOT EXISTS                [disjunction] ([logical not]
                                 [there exists]e)
  (SELECT *                          (
  FROM EMPLOYEE e                    (Emplyee (e)
  WHERE e.fname = f.fname      [conjunction] e.fname = f.fname)
  AND e.year = 1993)))         [conjunction] e.year = 1993)))}

Translating Query 5

Query 5                           [N.sub.5] = {
SELECT f.fname, f.size            f.fname, f.size |
FROM Forest f                     Forest(f)
WHERE f.loc = 'ALBERTA'           [conjunction] f.loc = ALBERTA
AND NOT EXISTS                    [conjunction] ([logical not]
                                    [there exists]t)
  (SELECT *                             (
  FROM TREE t                           ( Tree(t)
  WHERE t.fname = f.fname               [conjunction] t.fname = f.fname)
  AND (t.planted                        [conjunction] ( t.planted
    [greater than or equal to]            [greater than or equal to]
    1960                                  1960
  OR EXISTS                             [disjunction] ([there exists]m1)
  (SELECT *                                 (
  FROM Measurement m1                       ( Measurement (m1)
  WHERE m1.tree# = t.tree#                  [conjunction] m1.tree# =
                                              t.tree# )
  AND m1.height                             [conjunction] m1.height
    [less than or equal to] 20)               [less than or equal to]
                                              20 )
  AND EXISTS                            [conjunction] ( ([there exists]
                                          m2)
  (SELECT *                                 (
  FROM Measurement m2                   ( Measurement (m2)
  WHERE m2.tree# = t.tree#              [conjunction] m2.tree# = t.tree#
  AND m1.meas# <> m2.meas#              [conjunction] m1.meas#
                                          [not equal to] m2.meas#
  AND m2.height                         [conjunction] m2.height
    [less than or equal to]               [less than or equal to]
    20) )                                 20) ) )
OR NOT EXISTS                           [disjunction] ([logical not]
                                          [there exists]m)
  (SELECT *                                 (
  FROM Measurement m                        Measurement(m)
  WHERE m.tree# = t.tree#                   [conjunction] t.tree# =
                                              m.tree#
  AND m.height                              [conjunction] m.height
    [less than or equal to] 20))              [less than or equal to]
                                              20 ) ) ) }


Acknowledgements

Many thanks go to James Bradley
This article describes the English astronomer; for other people sharing the name, see James Bradley (disambiguation)


James Bradley (March 1693 – July 13, 1762) was an English astronomer, Astronomer Royal from 1742.
 for his comments on an earlier tutorial version of this work and for his incitement in·cite  
tr.v. in·cit·ed, in·cit·ing, in·cites
To provoke and urge on: troublemakers who incite riots; inciting workers to strike. See Synonyms at provoke.
 to turn the tutorial into an article. The example database is adapted from his work (Bradley, 1982). The example queries are inspired by the assignments of an undergraduate database systems course at The University of Calgary Calgary (kăl`gərē), city (1991 pop. 710,677), S Alta., Canada, at the confluence of the Bow and Elbow rivers. The largest city in Alberta and the fastest-growing major city in Canada, Calgary is a corporate, transportation, and financial .

Note

This work was supported in part by the Natural Science and Engineering Research Council (body) Science and Engineering Research Council - (SERC) Formerly the largest of the five research councils funded by the British Government through the Office of Science and Technology.  of Canada Canada (kăn`ədə), independent nation (2001 pop. 30,007,094), 3,851,787 sq mi (9,976,128 sq km), N North America. Canada occupies all of North America N of the United States (and E of Alaska) except for Greenland and the French islands of .

References

Bradley, J. (1982). File and database techniques. Austin Austin.

1 City (1990 pop. 21,907), seat of Mower co., SE Minn., on the Cedar River, near the Iowa line; inc. 1868. The commercial and industrial center of a rich farm region, it is noted as home to the Hormel meatpacking company, whose Spam Town museum
, TX: Holt holt  
n. Archaic
A wood or grove; a copse.



[Middle English, from Old English.]

holt
Noun

the lair of an otter [from
, Rinehart Rine·hart   , Mary Roberts 1876-1958.

American writer known for her mysteries, including The Circular Staircase (1908) and The Door (1930).
, and Winston Winston is a name deriving from Old English wynnstān, meaning "pleasant stone". Places
Winston is the name of several places in England:
  • Winston, County Durham
  • Winston, Suffolk
- and in the United States of America:
.

Codd, E. (1972). Relational See relational algebra, relational calculus, relational database, relational query and relational operator.  completeness of the data base sublanguages. In R. Rustin Rus·tin   , Bayard 1910-1987.

American civil rights leader and pacifist who organized the 1963 March on Washington.
 (Ed.), Data base systems, Courant Cou`rant´   

a. 1. (Her.) Represented as running; - said of a beast borne in a coat of arms.
n. 1. A piece of music in triple time; also, a lively dance; a coranto.
2.
 computer science symposia sym·po·si·a  
n.
A plural of symposium.
 series 6, (pp. 65-98). Englewood Englewood (ĕng`gəlwd).

1 City (1990 pop. 29,387), Arapahoe co., N central Colo., on the South Platte River, a residential and industrial suburb of Denver; inc. 1903.
 Cliffs, NJ: Prentice Hall Prentice Hall is a leading educational publisher. It is an imprint of Pearson Education, Inc., based in Upper Saddle River, New Jersey, USA. Prentice Hall publishes print and digital content for the 6-12 and higher education market. History
In 1913, law professor Dr.
.

Date, C. (1984). A critique of the SQL database language. ACM (Association for Computing Machinery, New York, www.acm.org) A membership organization founded in 1947 dedicated to advancing the arts and sciences of information processing. In addition to awards and publications, ACM also maintains special interest groups (SIGs) in the computer field.  SIGMOD SIGMOD Special Interest Group On Management of Data  Record, 14(2), 8-54.

Date, C. (1992). Relational calculus as an aid to effective query formulation formulation /for·mu·la·tion/ (for?mu-la´shun) the act or product of formulating.

American Law Institute Formulation
. In C. Date & H. Darwen (Eds.), Relational database relational database

Database in which all data are represented in tabular form. The description of a particular entity is provided by the set of its attribute values, stored as one row or record of the table, called a tuple.
 writings 1989-1991. Boston Boston, town, England
Boston, town (1991 pop. 26,495), E central England, on the Witham River. Boston's fame as a port dates from the 13th cent., when it was a Hanseatic port trading wool and wine. Having recovered from a decline in the 18th and 19th cent.
: Addison-Wesley.

Date, C. (2000). An introduction to database systems (7th ed.). Boston: Addison-Wesley.

Date, C. & Darwen, H. (1993). A guide to the SQL standard (3rd ed.). Boston: Addison-Wesley.

Elmasri, R. & Navathe, S. (2000). Fundamentals of database systems (3rd ed.). San Francisco San Francisco (săn frănsĭs`kō), city (1990 pop. 723,959), coextensive with San Francisco co., W Calif., on the tip of a peninsula between the Pacific Ocean and San Francisco Bay, which are connected by the strait known as the Golden : Benjamin/Cummings.

Korth, H., Silberschatz, A., & Sudarshan, S. (1999). Database system concepts (3rd ed.). New York New York, state, United States
New York, Middle Atlantic state of the United States. It is bordered by Vermont, Massachusetts, Connecticut, and the Atlantic Ocean (E), New Jersey and Pennsylvania (S), Lakes Erie and Ontario and the Canadian province of
: McGraw-Hill The McGraw-Hill Companies, Inc., (NYSE: MHP) is a publicly traded corporation headquartered in Rockefeller Center in New York City. Its primary areas of business are education, publishing, broadcasting, and financial and business services. .

Resiner, P. (1981). Human factor studies of database query languages (database) database query language - A language in which users of a database can (interactively) formulate requests and generate reports. The best known is SQL. : A survey and assessment. ACM Computing Surveys, 13(1), 13-31.

JALAL KAWASH

American University of Sharjah The American University of Sharjah (AUS) (in Arabic: الجامعة الأميركية في الشارقة) is a coeducational higher educational  

UAE (Uninterruptible Application Error) The name given to a crash in Windows 3.0. In subsequent versions of Windows, a crash was called a "General Protection Fault," "Application Error" or "Illegal Operation." See crash in Windows and abend.  

jkawash@ausharjah.ah.edu See .edu.

(networking) edu - ("education") The top-level domain for educational establishments in the USA (and some other countries). E.g. "mit.edu". The UK equivalent is "ac.uk".
 
COPYRIGHT 2004 Association for the Advancement of Computing in Education (AACE)
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2004, Gale Group. All rights reserved. Gale Group is a Thomson Corporation Company.

 Reader Opinion

Title:

Comment:



 

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:Structured Query Language
Author:Kawash, Jalal
Publication:Journal of Computers in Mathematics and Science Teaching
Geographic Code:1USA
Date:Jun 22, 2004
Words:6202
Previous Article:Considering the efficacy of web-based worked examples in introductory chemistry.
Next Article:Working with accurate representations: the case of preconstructed dynamic geometry sketches.
Topics:



Related Articles
CIM systems upgraded. (Focus-2000; computer-integrated manufacturing)
When querying databases, you've got to ask the right question.(relational databases)
ORGANIZATIONS SEEK SOLUTIONS OVER TOOLKITS.(Product Announcement)
FAULTY SQL CODE CAN CAUSE DATABASE PERFORMANCE PROBLEMS.(Computer Associates International's Unicenter SQL-Station 6.0)(Product Announcement)
XQuery download. (Internet Focus).
DataDirect Connect for SQL/XML.(Tools)
QUERY ANALYZER WINDOW SUPPORTS ORACLE DBMS_OUTPUT PACKAGE.
Quilt--an XML query language.(Technote)
MySQL explained.(Standards--Databases)(Relational Database Management System )
Osborne/McGraw-Hill.(Brief Article)

Terms of use | Copyright © 2009 Farlex, Inc. | Feedback | For webmasters | Submit articles