Chapter 3 - Relational Database Model

Topics: Relational database, Relational algebra, Relational model Pages: 6 (1097 words) Published: March 3, 2014
Topic#6: Relational Database Operators
6.1 Significance of Relational Operators


Relational database supports basic database operations in order to provide useful means for retrieving or manipulating data in tables.



Because the relational model has its mathematical basis upon the relational theory (by thinking tables as sets or relations), the supported database operators conform to existing operators in relational algebra.



In fact, a relational database software implementation, called DBMS, is said to have higher degree of relational completeness depending upon the extent to which relational algebra operators are supported.



In total there are eight operators are found in relational theory, namely SELECT, PROJECT, JOIN, INTERSECT, UNION, DIFFERENCE, PRODUCT and DIVIDE.



Minimally speaking, a DBMS implementation is said to be relational if it supports at least the key relational operators, namely SELECT, PROJECT, and JOIN.



Very few DBMSs are capable of supporting all eight relational operators.



Use of relational algebra operators on existing tables (relations) results in outcomes look like new relations. This characteristic lets the user recursively applying the operators among the operator outcomes. Figure

6.2 Operator: UNION:
• Needs two tables as its operands
• Combines all rows from two tables, excluding duplicate rows. • Tables, used as operands, must be UNION compatible with each other. (Tables must have the same attribute characteristics for all columns i.e. the columns and domains must be identical).

• Figure-6.1 demonstrates an example of UNION operation.

Popped up Questions
Choose the right answer for the UNION Operation shown in the figure. 6.3 Operator: INTERSECT:
• Needs two tables as its operands
• Yields only the rows that appear in both the tables
• Operand tables must be UNION compatible with each other
• Figure-6.2 demonstrates an example of INTERSECT operation.

Popped up Questions
Choose the right answer for the INTERSECT Operation shown in the figure. 6.4 Operator: DIFFERENCE
• Needs two tables as its operands
• Yields all rows in one table not found in the other table—that is, it subtracts one table from the other.
• Requires the UNION compatibility of the operand tables.
• Figure-6.3 demonstrates an example of DIFFERENCE operation.

Popped up Questions
Choose the right answer for the DIFFERENCE Operation shown in the figure.

6.5 Operator: PRODUCT
• Needs two tables as its operands
• Yields all possible pairs of rows from the two tables.





The operand tables are not necessarily UNION compatible with each other. The yielded result is also known as the Cartesian product.
Figure-6.4 demonstrates an example of PRODUCT operation.

Popped up Questions
Choose the right answer for the SELECT Operation shown in the figure.

6.6 Operator: SELECT
• Needs a single table as its operand
• Yields values for all rows found in the table
• Can be used to list either all row values or it can yield only those row values that match a specified criterion
• Yields a horizontal subset of a table
• Figure-6.5 demonstrates an example of SELECT operation.

Popped up Questions
Choose the right answer for the SELECT Operation shown in the figure. 6.7 Operator: PROJECT
• Uses a single table as its operand
• Yields all values for selected attributes
• Yields a vertical subset of a table
• Figure-6.6 demonstrates an example of PROJECT operation.

Popped up Questions
Choose the right answer for the PROJECT Operation shown in the figure. 6.8 Operator: JOIN
• Allows us to combine information from two tables
• Uses two table having a common attribute as its operands • Join operation is considered as the real power behind the relational database implementations (RDBMS)
• JOIN allows the use of independent tables, linked by common attributes, resulting in minimal redundancy possible.


Possible types of JOIN...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Relational Database Model Essay
  • Database Models and Legacy Systems Essay
  • History of Relational Databases Research Paper
  • Relational Databases Essay
  • Database: Relational Model and Code Essay
  • Relational Databases Essay
  • Relational Database Essay
  • Relational Model Essay

Become a StudyMode Member

Sign Up - It's Free