Week1.pdf

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

View Full Document Right Arrow Icon
EECS 116 & CS 122A Discussion - Week 1
Image of page 1

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

View Full Document Right Arrow Icon
Example of a Relation attributes (or columns) tuples (or rows)
Image of page 2
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.
Image of page 3

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

View Full Document Right Arrow Icon
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 )
Image of page 4
Select Operation – Example Relation r σ A=B ^ D > 5 (r)
Image of page 5

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

View Full Document Right Arrow Icon