Semijoin and composition - sql, PL-SQL Programming

Semijoin and Composition - SQL

For semijoin, the dyadic relational operator MATCHING, defined thus:

r1 MATCHING r2, where r1 and r2 are relations such that r1 JOIN r2 is defined, is equivalent to

(r1 JOIN r2) {r1-attrs}

where r1-attrs is a commalist containing all and only the attribute names of r1.

and the example

COURSE MATCHING EXAM_MARK

is given as a relational expression for the predicate, "There exist a student StudentId and a mark Mark such that StudentId sat the exam and scored Mark marks for course CourseId and CourseId is entitled Title" (which could be abbreviated to "At least one student sat the exam for Course CourseId, entitled Title"). The resulting relation consists of just those tuples in COURSE that have at least one matching tuple in EXAM_MARK.

Posted Date: 1/18/2013 6:02:00 AM | Location : United States







Related Discussions:- Semijoin and composition - sql, Assignment Help, Ask Question on Semijoin and composition - sql, Get Answer, Expert's Help, Semijoin and composition - sql Discussions

Write discussion on Semijoin and composition - sql
Your posts are moderated
Related Questions
UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

Example of UNWRAP Operator - SQL Example here shows how unwrapping can be done in longhand in SQL. Example: Unwrapping in SQL Letting CONTACT_INFO_WRAPPED denote the res

OPEN-FOR Statement The OPEN-FOR statements execute the multi-row query related with a cursor variable. It also allocates the resources used by the Oracle to process the query a

Enrolment was split - SQL Example shows how relvars IS_CALLED and IS_ENROLLED_ON can be derived from the original ENROLMENT relvar, using projection in the initial assignment

Quantification in SQL To quantify something, as the theory book has it, is to state its quantity, to say how many of it there are. For example, in Tutorial D the expression CO

IN Mode An IN parameter pass the values to the subprogram being called. Within the subprogram, an IN parameter acts like a constant. And hence, it cannot be assigned a value.

Example of Using Aggregation on Nested Tables Example: How many students sat each exam WITH C_ER AS (SELECT CourseId, CAST (TABLE (SELECT DISTINCT StudentId, Mark FROM EXAM

Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati

Ensuring Backward Compatibility   The PL/SQL Version 2 permits some abnormal behavior which Version 8 disallows. Particularly, Version 2 permits you to (i) Make the forw

Parameter and Keyword Description: package_name: This construct identifies the package. AUTHID Clause: This determine whether all the packaged subprograms impleme