Saturday, August 31, 2013

DBMS-Relational Algebra-Set Operations

DBMS-Relational Algebra-Set Operations


Set Operations

The following standard operations on sets are also available in relational algebra: union
([), intersection (\), set-di erence (−), and cross-product ( ).
Union: R[S returns a relation instance containing all tuples that occur in either
relation instance R or relation instance S (or both). R and S must be unioncompatible,
and the schema of the result is de ned to be identical to the schema
of R.
Two relation instances are said to be union-compatible if the following conditions
hold:
{ they have the same number of the elds, and
{ corresponding elds, taken in order from left to right, have the same domains.
Note that eld names are not used in de ning union-compatibility. For convenience,
we will assume that the elds of R [ S inherit names from R, if the elds
of R have names. (This assumption is implicit in de ning the schema of R [ S to
be identical to the schema of R, as stated earlier.)
Intersection: R\S returns a relation instance containing all tuples that occur in
both R and S. The relations R and S must be union-compatible, and the schema
of the result is de ned to be identical to the schema of R.
Set-di erence: R−S returns a relation instance containing all tuples that occur
in R but not in S. The relations R and S must be union-compatible, and the
schema of the result is de ned to be identical to the schema of R.
Cross-product: R S returns a relation instance whose schema contains all the
elds of R (in the same order as they appear in R) followed by all the elds of S
(in the same order as they appear in S). The result of R S contains one tuple
hr; si (the concatenation of tuples r and s) for each pair of tuples r 2 R; s 2 S.
The cross-product opertion is sometimes called Cartesian product.
We will use the convention that the elds of R S inherit names from the corresponding
elds of R and S. It is possible for both R and S to contain one or
more elds having the same name; this situation creates a naming conflict. The
corresponding elds in R S are unnamed and are referred to solely by position.

Upload UIImage as base64 String

Upload UIImage as Base64 String (Upload UIImage as string) //Select Pic From Camera or Gallery       @objc func btnPro...