1 / 9

Chapter 4 Relational Algebra

Chapter 4 Relational Algebra. Relational Languages Relational Algebra. Relational Languages. Procedural language Relational algebra Non-procedural language Relational Calculus (pp.101- 107). Relational Algebra Intra Relation. Selection - horizontal partition

vita
Download Presentation

Chapter 4 Relational Algebra

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 4Relational Algebra • Relational Languages • Relational Algebra

  2. Relational Languages • Procedural language • Relational algebra • Non-procedural language • Relational Calculus (pp.101- 107)

  3. Relational AlgebraIntra Relation • Selection - horizontal partition • SELECT relation WHERE condition [GIVING relation] • condition(relation) • Projection - vertical partition • PROJECT relation OVER (attribute, attribute,...)[GIVING relation] • attributes(relation)

  4. Union-Compatible • Union - tuples in either of 2 union compatible relations • relation1 UNION relation2 [GIVING relation] • relation1  relation2 • Difference - tuples in one union compatible relation, but not other • relation1 MINUS relation2 [GIVING relation] • relation1 - relation2

  5. Union-Compatible • Intersection - tuples in both of 2 union compatible relations • relation1 INTERSECT relation2 [GIVING relation] • relation1  relation2

  6. Any 2 Relations • Product - Cartesian product of any two relations • relation1 TIMES relation2 [GIVING relation] • relation1 relation2 • Join - common domain • relation1 JOIN relation2 WHERE condition [GIVING relation] • relation1conditionrelation2 • Division • relation1 divided by relation2 [GIVING relation] • relation1 / relation2

  7. Types of Join • Equi : based on equality with 2 identical attribute columns • Theta : a join based on a relational operator (=,<,>,<=,>=,~=) • Natural : equijoin with no duplicate column • Outer : includes tuples without matches (left, right, full)

  8. Types of Join • Semi-join • relation1 SEMIJOIN relation2 WHERE condition [GIVING relation] • relation1 lxcondition relation2 • Semi-theta-join • Semi-natural join

  9. Assignment • Review chapters 1-4 • Read Chapters 6-5 • Do Exercise 4.12 • Due date:

More Related