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
Sequential Control Dissimilar to the IF and LOOP statements, the GOTO and NULL statements are not important to the PL/SQL programming. The configuration of PL/SQL is such that th

At times, Brewbean's has changed the id number for existing products. In the past, they have had to add a new product row with the new id to the BB_PRODUCT table, modify all the co

LOOP Statements The LOOP statements execute a series of statements at multiple times. The loops enclose the series of statements that is to be repeated. The PL/SQL provides typ

Assignments in pl/sql The Variables and constants are initialized every time a block or subprogram is entered. By default, the variables are initialized to NULL. Therefore, unle

Third Step at defining type SID in SQL CREATE DOMAIN SID AS VARCHAR(5) CHECK ( VALUE IS NOT NULL AND SUBSTRING(VALUE FROM 1 FOR 1) = 'S' AND CAST('+'||SUBSTRING(VALUE

On occasion, some of Brewbean's customers mistakenly leave an item out of a basket already checked out, so they create a new basket containing the missing items. However, they requ

Synonyms You can create the synonyms to provide location transparency for the remote schema objects like tables, views, sequences, stand-alone subprograms, and packages. Though,

Parameter and Keyword Description: EXIT: An unconditional EXIT statement (i.e., one without a WHEN clause) exits the present loop instantly. The Execution resumes with th

Using Cursor Attributes: Every cursor has 4 attributes: %NOTFOUND, %FOUND, %ISOPEN, and %ROWCOUNT. If appended to the cursor name, they return the helpful information about

Definition of FROM - SQL Recall that the operand of FROM is denoted by a commalist, each element of that commalist being a table expression optionally accompanied by a range v