Relational Algebra Operations

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does the electrical symbol with 'Wh' inside a square represent?

Energy meter

What electrical component is represented by two parallel lines?

Condenser

What does the electrical symbol that looks like a button represent?

Button

What is the symbol of two intersecting perpendicular lines?

<p>Crossing Pipes</p> Signup and view all the answers

What electrical component is designated by the letters 'RV'?

<p>Voltage regulator</p> Signup and view all the answers

What is the name of the electrical symbol that has the letters 'CF' inside a circle?

<p>Photoelectric cell</p> Signup and view all the answers

What does the electrical symbol of a circle with an X inside represent?

<p>Light point</p> Signup and view all the answers

What is the symbol of a line that has various zig-zags connected to a triangle?

<p>Electric lock</p> Signup and view all the answers

What does the 'COS' symbol inside a circle represent?

<p>Power factor meter</p> Signup and view all the answers

What does the symbol that looks like scissors cutting a line represent?

<p>Fuse</p> Signup and view all the answers

Flashcards

Energy Meter

Device that measures electrical energy consumption over time.

Fuse

An electrical safety device that protects circuits from overcurrent by interrupting the circuit when a fault is detected.

Lightning Arrester

Protects against voltage surges, diverting excess voltage to ground.

Alarm

A device used to indicate or signal an alert.

Signup and view all the flashcards

Capacitor/Condenser

Electrical component that stores energy in an electrical field.

Signup and view all the flashcards

Electrical Outlet

An item of equipment connected to a building's electrical system to utilize electricity.

Signup and view all the flashcards

Ammeter

An instrument for measuring electric current in amperes.

Signup and view all the flashcards

Voltmeter

Device that measures the potential difference between two points in a circuit.

Signup and view all the flashcards

Socket Plug

An output point for electrical connection.

Signup and view all the flashcards

Switch

Device used to control the flow of electricity

Signup and view all the flashcards

Study Notes

Relational Algebra Overview

  • Relational algebra expressions take relations as input and return a relation as output.
  • Relational algebra expressions can be combined into a relational algebra query.

Selection Operation

  • Selects tuples from a relation based on a predicate.
  • Notation: $\sigma_{predicate}(relation)$
  • Predicates can involve $=, \neq, <, >, \geq$ and connectives like $\land$ (and), $\lor$ (or), $\lnot$ (not).
  • Example: $\sigma_{branch_name = "Perryridge"}(account)$ finds accounts in the Perryridge branch.

Projection Operation

  • Selects specified attributes from a relation.
  • Notation: $\Pi_{attribute1, attribute2,...}(relation)$
  • Example: $\Pi_{branch_name, amount}(account)$ eliminates the account_number attribute.

Union Operation

  • Notation: $r \cup s$
  • Conditions for validity: same arity, compatible attribute domains.
  • Example: $\Pi_{customer_name}(borrower) \cup \Pi_{customer_name}(depositor)$ finds customers with an account or loan.

Set-Intersection Operation

  • Notation: $r \cap s$
  • Conditions for validity: same arity, compatible attribute domains.
  • Example: $\Pi_{customer_name}(borrower) \cap \Pi_{customer_name}(depositor)$ finds customers with both an account and loan.

Set-Difference Operation

  • Notation: $r - s$
  • Conditions for validity: same arity, compatible attribute domains.
  • Example: $\Pi_{customer_name}(depositor) - \Pi_{customer_name}(borrower)$ finds customers with an account but not a loan.

Cartesian-Product Operation

  • Notation: $r \times s$
  • Requires disjoint attributes between r and s; renaming is needed if not disjoint.

Rename Operation

  • Renames a relational algebra expression.
  • Notation: $\rho_{x(A1, A2,..., An)}(E)$
  • Renames expression $E$ to $x$ with attributes $A_1, A_2,..., A_n$.
  • Example: $\rho_{cust_borrower}(\Pi_{customer_name}(borrower))$.

Theta-Join

  • $r \Join_{\theta} s = \sigma_{\theta}(r \times s)$
  • Involves a predicate $\theta$

Equijoin

  • A type of theta join where the predicate only consists of equalities.
  • Example: $depositor \Join_{depositor.account_number = account.account_number} account$

Natural Join

  • Notation: $r \Join s$
  • Forms a cartesian product, selects tuples with matching values for attributes in $R \cap S$, and removes duplicate attributes in $S-R$.

Outer Join

  • Retains information by adding tuples with null values when there are no matches.

Left Outer Join

  • $r \Join^{\text{left}} s$

Right Outer Join

  • $r \Join^{\text{right}} s$

Full Outer Join

  • $r \Join^{\text{full}} s$

Division Operator

  • Notation: $r \div s$
  • Used for queries with "for all."
  • $r \div s$ results in tuples of $r$ restricted to $R-S$.
  • For every tuple in $s$, there is a tuple in $r$ with the same value as $t$ in attributes in $S$.
  • Example: $\Pi_{customer_name, branch_name}(account \Join depositor) \div \Pi_{branch_name}(\sigma_{branch_city = "Brooklyn"}(branch))$ finds customers with accounts at all Brooklyn branches.

Lecture 24: Interference

Interference

  • Waves interfere when overlapping in space.
  • The resulting wave is the sum of individual waves and produces constructive or destructive outcomes

Constructive Interference

  • Waves are in phase.
  • The amplitude of the resultant wave exceeds that of each source wave.

Destructive Interference

  • Waves are out of phase.
  • The amplitude of the resultant wave is lower than that of each source wave.

Two-Source Interference

  • Two wave sources are in phase.
  • Path difference: $\Delta r = r_2 - r_1$
  • Constructive interference: $\Delta r = m\lambda$, where $m = 0, 1, 2,...$
  • Destructive interference: $\Delta r = (m + \frac{1}{2})\lambda$, where $m = 0, 1, 2,...$

Thin-Film Interference

  • Light wave reflection happens on both top and bottom surfaces of a thin film, causing interference.
  • Interference outcome depends on film thickness ($t$), refractive index ($n$), Light wavelength (${\lambda}$) and incidence angle

Phase Shift

  • Reflection from a higher refractive index surface causes a $180^\circ$ (${\lambda/2}$) phase shift.
  • No phase shift occurs when reflecting from a lower refractive index.

Constructive Interference Condition

  • $2nt = m\lambda$, where $m = 0, 1, 2,...$

Destructive Interference Condition

  • $2nt = (m + \frac{1}{2})\lambda$, where $m = 0, 1, 2,...$

Interference Example 1

  • Oil film ($n = 1.45$) on water with strongest reflection at $520 \ nm$.
  • Minimum thickness: $t = \frac{\lambda}{2n} = \frac{520 \ nm}{2(1.45)} = 179 \ nm$

Interference Example 2

  • Magnesium fluoride ($MgF_2$) film on glass ($n = 1.38$) to reduce reflection at $550 \ nm$. Film's refractive index $n = 1.38$.
  • Minimum thickness: $t = \frac{\lambda}{4n} = \frac{550 \ nm}{4(1.38)} = 99.6 \ nm$

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Relational Algebra Flashcards
33 questions
Relational Algebra Overview
17 questions
Slide 6 - Relational Algebra V2
39 questions

Slide 6 - Relational Algebra V2

ReliableBlueLaceAgate7739 avatar
ReliableBlueLaceAgate7739
Use Quizgecko on...
Browser
Browser