Projection and existential quantification - sql, PL-SQL Programming

Projection and Existential Quantification - SQL

Intuitively it might seem that projection in SQL is simply a matter of specifying the required columns in the SELECT clause, as in Example.

Example: Projection (incorrect)

Student StudentId is enrolled on some course.

SELECT StudentId FROM IS_ENROLLED_ON

Unfortunately, though, if some student is currently enrolled on more than one course (as indeed student S1, Anne, is in our example database), then the row giving that student's id appears twice in the result, which because of that duplicate appearance does not represent a relation. To avoid multiple appearances of the same row SQL requires you to write the word DISTINCT. (The key word ALL can be given instead of DISTINCT, clarifying that duplicate rows are not to be eliminated. As ALL is the default option).

Posted Date: 1/18/2013 5:09:17 AM | Location : United States







Related Discussions:- Projection and existential quantification - sql, Assignment Help, Ask Question on Projection and existential quantification - sql, Get Answer, Expert's Help, Projection and existential quantification - sql Discussions

Write discussion on Projection and existential quantification - sql
Your posts are moderated
Related Questions
SQL outer join SELECT * FROM IS_CALLED NATURAL LEFT JOIN IS_ENROLLED_ON Note that adding LEFT to an invocation of CROSS JOIN has no effect unless the right-hand operand

Advantages of PL/SQL The PL/SQL is a high-performance transaction processing, completely portable language that offers the following advantages as shown: 1) Support for SQL

Data Types in SQL - Interval, Boolean INTERVAL for values denoting, not intervals (!) but durations in time, such as 5 years, 3 days, 2 minutes, and so on. BOOLEAN, con

Aggregate Operators SQL Supports all of the aggregate operators mentioned in the theory book and many more besides. The syntax, however, involves an unusual trick that SQL cal

If two relations R and S are joined, then the non matching tuples of both R and S are ignored in __________________.

Initializing and Referencing Collections Until you initialize a collection, a nested table or varray is automatically null (i.e. the collection itself is null, not its elements)

Updating a Variable Assignment of an attribute value in a variable of a structured type Synatx: SET SN.C = 'S2'; As in Example the entire statement is equivalent to a

UNION and OR - SQL SQL supports UNION explicitly but differently from the way it supports JOIN explicitly. As we have seen, JOIN is used exclusively within the FROM clause, su

Parameter Modes: You do not require to specify a parameter mode for the input bind arguments (those used, for illustration, in the WHERE clause) as the mode defaults to IN. Th

Data Types in SQL - Integer INTEGER or  synonymously INT, for integers within a certain range. SQL additionally has types SMALLINT and BIGINT for certain ranges of integers. T