1 / 17

# Chapter 6 - PowerPoint PPT Presentation

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

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about ' Chapter 6' - nowles

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### 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.5aThe CARTESIAN PRODUCT (CROSS PRODUCT) operation.

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

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

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.9The AGGREGATE FUNCTION operation.

FIGURE≈6.10A two-level recursive query.

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

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

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