5.2 Basic Operations in the Relational Model


According to Codd's theory, several operations on a relational model are defined. These operations are one fundamental of relational databases. Knowing these operations will help you to understand what your database does internally:

  • SELECT This operation is used to extract a list of tuples from a table. These tuples have to fulfill certain conditions in order to be selected.

  • PROJECT To retrieve certain columns from a relation, a PROJECT operation has to be performed.

  • PRODUCT PRODUCT builds the Cartesian product of two tables. Whenever a join is performed, the database will (at least theoretically) compute the Cartesian product of two objects. After that the result will in most cases be reduced to the desired records by using certain conditions.

  • UNION In many cases the result of two queries has to be combined. Therefore an operation called UNION has to be performed.

  • INTERSECT To build the set-theoretical intersection of the result of two queries, the database has to perform a so-called INTERSECT operation.

  • DIFFERENCE The DIFFERENCE operation finds all records that do not belong to both sets being processed.

  • JOIN Joining two tables means to connect two tables using a common attribute that occurs in both tables you want to join.

With the help of these basic operations, the database can perform all basic operations on a relational database model.



PHP and PostgreSQL. Advanced Web Programming2002
PHP and PostgreSQL. Advanced Web Programming2002
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net