# Week1.pdf

This preview shows pages 1–13. Sign up to view the full content.

EECS 116 & CS 122A Discussion - Week 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example of a Relation attributes (or columns) tuples (or rows)
Relational Algebra Procedural language Six basic operators select: σ project: union: set difference: Cartesian product: x rename: ρ The operators take one or two relations as inputs and produce a new relation as a result.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Select Operation Notation: σ p ( r ) p is called the selection predicate Defined as: σ p ( r ) = { t | t r and p(t) } Where p is a formula in propositional calculus consisting of terms connected b y : ( and ), ( or ), ¬ ( not ) Each term is one of: <attribute> op <attribute> or <constant> where op is one of: =, , >, , <, Example of selection: σ dept_name=“Physics” ( instructor )
Select Operation – Example Relation r σ A=B ^ D > 5 (r)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document