lecture 7.pptx - DATABASE MANAGEMENT SYSTEMS 1 Lecture 7 BRIEF RECAP Relational Model Relational keys Primary key Foreign key Referential Actions on

# lecture 7.pptx - DATABASE MANAGEMENT SYSTEMS 1 Lecture 7...

• Notes
• 31

This preview shows page 1 - 10 out of 31 pages.

DATABASE MANAGEMENT SYSTEMS Lecture # 7 1
BRIEF RECAP Relational Model Relational keys Primary key Foreign key Referential Actions on Foreign Keys Restrict Cascade Nullify Default 2
RELATIONAL ALGEBRA 3
INTRODUCTION Relational algebra and relational calculus are formal languages associated with the relational model. Informally, relational algebra is a (high-level) procedural language and relational calculus a non-procedural language. However, formally both are equivalent to one another. 4
RELATIONAL ALGEBRA Relational algebra operations work on one or more relations to define another relation without changing the original relations. Both operands and results are relations, so output from one operation can become input to another operation. Allows expressions to be nested, just as in arithmetic. This property is called closure . 5
RELATIONAL ALGEBRA Five basic operations in relational algebra: Selection, Projection, Cartesian product, Union, and Set Difference. These perform most of the data retrieval operations needed. Also have Join, Intersection, and Division operations, which can be expressed in terms of 5 basic operations. 6
7 RELATIONAL ALGEBRA OPERATIONS
- RELATIONAL ALGEBRA OPERATIONS Select Project Rename Union Difference Intersection Assignment Cartesian Product Join Outer Union Composition of Operators Aggregate Functions Null Values 8
SELECTION (OR RESTRICTION) predicate (R) Works on a single relation R and defines a relation that contains only those tuples (rows) of R that satisfy the specified condition ( predicate ).

#### You've reached the end of your free preview.

Want to read all 31 pages?

• Fall '19
• ali

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern