Chapter 6
This presentation is the property of its rightful owner.
Sponsored Links
1 / 17

Chapter 6 PowerPoint PPT Presentation


  • 37 Views
  • Uploaded on
  • Presentation posted in: General

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

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

Chapter 6

The Relational Algebra and Relational Calculus


Chapter 6

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


Chapter 6

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 3 results of the union operation result result1 result2

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


Chapter 6

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 5a the cartesian product cross product operation

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


Figure 6 5b the cartesian product cross product operation

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


Figure 6 5c the cartesian product cross product operation

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


Figure 6 6 result of the join operation dept mgr department join mgrssn ssn employee

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


Chapter 6

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


Figure 6 8 the division operation a dividing ssn pnos by smith pnos b t r s

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


Figure 6 9 the aggregate function operation

FIGURE≈6.9The AGGREGATE FUNCTION operation.


Figure 6 10 a two level recursive query

FIGURE≈6.10A two-level recursive query.


Figure 6 11 the result of a left outer join operation

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


Figure 6 12 a relational database schema for a library database

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


Figure 6 13 a database state for the relations t1 and t2

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


  • Login