Relational Operations Show Codd originally defined eight relational operators.
1. SELECT originally called RESTRICT The most important of these are (1), (2), (3) and (8), which, together with some other aggregate functions, are powerful enough to answer a wide range of queries. The eight operators will be described as general procedures - i.e. not in the syntax
of SQL or any other relational language. The important point is that they define the result required rather than the detailed process of obtaining it - what but not how. SELECT item constructs a new,
logical table - an unnamed relation - with one column per row (i.e. item) containing all rows from stock_level that satisfy the WHERE clause. PROJECT stock_item produces a new logical table where each row contains only two columns - item and description. The new table will
only contain distinct rows from stock_item; i.e. any duplicate rows so formed will be eliminated. JOIN stock_item It is not necessary for there to be a one-to-one relationship between entries in two tables to be joined - entries which do not match anything will be eliminated from the result, and entries from one table which match several entries in the other will be duplicated the required number of times. The above definition is actually that of a NATURAL or EQUI-JOIN - i.e. a join in which the values of the matching columns are equal. It has become normal to extend join to include other comparison operators such as less than, greater than, etc. It is important to be clear about one's
intentions here to obtain meaningful results. Join is obviously a very general operation, and the principal source of processing power in relational systems, but it is also costly in time and space. Because no ordering can be guaranteed, a join may require a comparison of every entry in one table with every entry in the other, and create large intermediate results. That is why users of large-scale data bases, while acknowledging the power and flexibility of the relational approach, were slow to
adopt it instead of methods based on more efficient file processing techniques. For example, consider two relations, A and B, consisting of rows: A: a B: d => A product B: a
d UNION For example, consider two relations, A and B, consisting of rows: A: a B: a => A union B: a INTERSECT For example, consider two relations, A and B, consisting of rows: A: a B: a => A intersect B: a DIFFERENCE For example, consider two relations, A and B, consisting of rows: A: a B: a => A - B: b and B - A: e DIVIDE
A: a x B: x => A divide B: a Of the relational operators 3.2.4. to 3.2.8.defined by Codd, the most important is DIVISION. For example, suppose table A contains a list of suppliers and commodities, table B a list of all commodities bought by a company. Dividing A by B produces a table listing suppliers who sell all
commodities. What are the binary operations in relational algebra?Union, intersection, difference, cartesian, join, division comes under binary operation (operate on two tables).
Which of the following relational algebra operation combines the two relation?A JOIN clause is used to combine rows from two or more tables, based on a related column between them.
Which of the following is relational algebra operations?Five basic operations in relational algebra: Selection, Projection, Cartesian product, Union, and Set Difference. These perform most of the data retrieval operations needed.
Which of the following relational algebraic operations is represented by the symbol u?Union(U) The union operation performs the same function as the union operation in the set theory. It is represented by U symbol. If we perform an operation A U B on table A and B, then the result would include all the tuples that are in table A as well as in table B.
|