1 / 17

Chapter 6

Chapter 6. The Relational Algebra and Relational Calculus. FIGURE 6.1 Results of SELECT and PROJECT operations. (a) s (DNO=4 AND SALARY>25000) OR (DNO=5 AND SLARY>30000) (EMPLOYEE). (b) p SEX, SALARY (EMPLOYEE).

nowles
Download Presentation

Chapter 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 6 The Relational Algebra and Relational Calculus

  2. 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).

  3. FIGURE 6.2Results of a sequence of operations. (a) pFNAME, LNAME, SALARY(sDNO=5(EMPLOYEE)). (b) Using intermediate relations and renaming of attributes.

  4. FIGURE≈6.3Results of the UNION operation RESULT € RESULT1  RESULT2.

  5. 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

  6. FIGURE≈6.5aThe CARTESIAN PRODUCT (CROSS PRODUCT) operation.

  7. FIGURE≈6.5bThe CARTESIAN PRODUCT (CROSS PRODUCT) operation.

  8. FIGURE≈6.5cThe CARTESIAN PRODUCT (CROSS PRODUCT) operation.

  9. FIGURE≈6.6Result of the JOIN operation DEPT_MGR  DEPARTMENT JOIN MGRSSN=SSN EMPLOYEE .

  10. FIGURE≈6.7Results of two NATURAL JOIN operations. (a) PROJ_DEPT  PROJECT * DEPT. (b) DEPT_LOCS  DEPARTMENT * DEPT_LOCATIONS.

  11. FIGURE≈6.8The DIVISION operation. (a) Dividing SSN_PNOS by SMITH_PNOS. (b) T R ÷ S.

  12. FIGURE≈6.9The AGGREGATE FUNCTION operation.

  13. FIGURE≈6.10A two-level recursive query.

  14. FIGURE≈6.11The result of a LEFT OUTER JOIN operation.

  15. FIGURE≈6.12A relational database schema for a LIBRARY database.

  16. FIGURE≈6.13A database state for the relations T1 and T2.

More Related