170 likes | 283 Vues
This chapter explores critical operations in relational algebra and relational calculus, focusing on SELECT, PROJECT, UNION, INTERSECTION, and JOIN operations. It presents various figures illustrating the results of these operations, including examples of queries such as extracting specific attributes and applying filters. Additionally, the chapter covers Cartesian products, natural joins, and the division operation in detail. These foundational concepts are essential for effectively managing and querying relational databases, providing a comprehensive understanding of their functionality.
E N D
Chapter 6 The Relational Algebra and Relational Calculus
FIGURE 6.1Results of SELECT and PROJECT operations. (a) s(DNO=4 AND SALARY>25000) OR (DNO=5 AND SLARY>30000)(EMPLOYEE). (b) pSEX, SALARY(EMPLOYEE).
FIGURE 6.2Results of a sequence of operations. (a) pFNAME, LNAME, SALARY(sDNO=5(EMPLOYEE)). (b) Using intermediate relations and renaming of attributes.
FIGURE≈6.3Results of the UNION operation RESULT € RESULT1 RESULT2.
FIGURE≈6.4The set operations UNION, INTERSECTION, and MINUS. (a) Two union-compatible relations. (b) STUDENT INSTRUCTOR. (c) STUDENT INSTRUCTOR. (d) STUDENT – INSTRUCTOR. (e) INSTRUCTOR – STUDENT
FIGURE≈6.6Result of the JOIN operation DEPT_MGR DEPARTMENT JOIN MGRSSN=SSN EMPLOYEE .
FIGURE≈6.7Results of two NATURAL JOIN operations. (a) PROJ_DEPT PROJECT * DEPT. (b) DEPT_LOCS DEPARTMENT * DEPT_LOCATIONS.
FIGURE≈6.8The DIVISION operation. (a) Dividing SSN_PNOS by SMITH_PNOS. (b) T R ÷ S.
FIGURE≈6.12A relational database schema for a LIBRARY database.