Existential quantification - sql, PL-SQL Programming

Existential Quantification - SQL

Existential quantification-stating that something is true of at least one object under consideration-can be expressed by OR(r,c), meaning that at least one object that satisfies a predicate for r also satisfies c, and IS_NOT_EMPTY(r). The names for the aggregate operators AND and OR reflect the facts that when we confine our attention to finite sets, universal and existential quantification are equivalent to repeated invocations of dyadic AND and dyadic OR, respectively. Note that AND(r,c) is equivalent to COUNT(r) = COUNT(r WHERE c), and OR(r,c) is equivalent to COUNT(r WHERE c) > 0 and also to IS_NOT_EMPTY(r WHERE c).

Quantification also appears in various guises in SQL, but its meaning is muddied by those same two violations of relational theory that we have already seen muddying the waters: duplicate rows and NULL. For example, SQL's (SELECT COUNT(*) FROM r), a so-called scalar subquery (because it is an expression denoting a table with one row and one column, enclosed in parentheses), denotes the number of rows in the table r, but can we really say that this represents the number of objects that satisfy a predicate for r, if the same row can be counted more than once, or if NULL appears in place of a column value in some row of r? In fact, what might it mean to say that a row does or does not satisfy a predicate? In 2VL we say that object a satisfies predicate P(x) exactly when P(a) is true. Does this still hold in 3VL, or might SQL deem a to satisfy P(x) also when P(a) is unknown? Well, it turns out that SQL uses both interpretations, depending on the context, as we shall discover.

 

Posted Date: 1/18/2013 4:20:39 AM | Location : United States







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

Write discussion on Existential quantification - sql
Your posts are moderated
Related Questions
TTITLE and BTITLE are commands in Pl-SQL to control report headings and footers. This Ttitle & Btitle are mainly used on creating SQL*PLUS report. Ttitle is used for toptitle headi

Data Types in SQL - Timestamp TIMESTAMP for values representing points in time on a specified uniform scale. DATE is used for timestamps on a scale of one day, such as DATE '2

Need Windows and Linux system Administrator We are seeking a part time system administrator to take care of our servers. Your things to do would add, but not limited to: -

Bitmap Join Indexes - This feature will increase the performance and detains the size and format of your databases in data Character Semantics and Globalization -This featur

Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a

Product-specific Packages The Oracle and different Oracle tools are supplied with the product-specific packages which help you to build the PL/SQL-based applications. For illu

Managing Cursors The PL/SQL uses 2 types of cursors: implicit and explicit. The PL/SQL declares a cursor implicitly for all the SQL data manipulation statements, including th

%TYPE Attribute The %TYPE attribute gives the datatype of a record, field, nested table, database column, or the variable. You can use the %TYPE attribute as the datatype speci

Referencing Records Unlike the elements in a collection, that are accessed using subscripts, the fields in a record are accessed by name. To reference an individual field, you

Row Operators The Row operators return or reference the particular rows. ALL retains the duplicate rows in the result of a query or in an aggregate expression. The DISTINCT el