Review of the Relational Algebra
5DV120 — Database System Principles Ume˚ a University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner
Review of the Relational Algebra 20130526 Slide 1 of 13
Review of the Relational Algebra 5DV120 Database System Principles - - PowerPoint PPT Presentation
Review of the Relational Algebra 5DV120 Database System Principles Ume a University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner Review of the Relational Algebra 20130526 Slide 1 of
Review of the Relational Algebra 20130526 Slide 1 of 13
Review of the Relational Algebra 20130526 Slide 2 of 13
Review of the Relational Algebra 20130526 Slide 3 of 13
Review of the Relational Algebra 20130526 Slide 4 of 13
Review of the Relational Algebra 20130526 Slide 5 of 13
SELECT DISTINCT A1, A2, . . . , Ak FROM R WHERE ϕ;
Review of the Relational Algebra 20130526 Slide 6 of 13
Review of the Relational Algebra 20130526 Slide 7 of 13
SELECT * FROM R_1 JOIN R_2 ON (ϕ);
Review of the Relational Algebra 20130526 Slide 8 of 13
SELECT * FROM instructor JOIN department ON (( instructor .dept_name= department.dept_name) AND (salary >= budget ));
SELECT * FROM instructor JOIN department ON (( instructor .dept_name= department= department .dept_name) OR (salary >= budget ));
Review of the Relational Algebra 20130526 Slide 9 of 13
SELECT * FROM department NATURAL JOIN teaches;
SELECT * FROM department JOIN teaches ON (TRUE );
Review of the Relational Algebra 20130526 Slide 10 of 13
SELECT A.ID , B.ID FROM instructor as A JOIN instructor as B ON (A.dept_name=B.dept_name );
1,A′ 2,...,A′ k)(R) returns a copy of R named R′, with the attributes
1, A′ 2, . . . , A′ k.
Review of the Relational Algebra 20130526 Slide 11 of 13
Review of the Relational Algebra 20130526 Slide 12 of 13
Review of the Relational Algebra 20130526 Slide 13 of 13