What does relational algebra tell a database exactly?
How to manipulate data
What is the symbol for the selection operation?
σ
What does the projection operation retrieve?
Specific columns
Match the relational algebra operation with its symbol and description.
1️⃣ Selection: σ, Filters rows based on a condition
2️⃣ Projection: π, Retrieves specific columns
3️⃣ Union: ∪, Combines rows from two relations
4️⃣ Set Difference: -, Finds rows present in the first relation but not in the second
5️⃣ Intersection: ∩, Identifies common rows in two relations
6️⃣ Cartesian Product: X, Connects every row from one relation to every row in another
7️⃣ Join: ⋈, Combines tuples from two relations based on a condition
Match the relational algebra operation with its example.
Selection ↔️ σDept="Sales" (Employee)
Projection ↔️ πName,Salary (Employee)
Union ↔️ Student ∪ Instructor
What type of subset does the projection operation create?
Vertical subset
Write the relational algebra expression to find the names of employees in the Sales department with salaries over $50,000.
πName (σDepartment = "Sales" AND Salary > 50000 (Employee))
Arrange the following relational algebra operations in the correct sequence to find the names of employees in the Sales department with salaries over $50,000.
1️⃣ Selection: σDepartment = "Sales" (Employee)
2️⃣ Selection: σSalary > 50000
3️⃣ Projection: πName
What does it mean for two relations to be union-compatible?
Matching attributes
What does the intersection operation identify in two relations?
Common tuples
Steps to use the rename operation
1️⃣ Rename the relation
2️⃣ Rename the attributes
3️⃣ Rename both the relation and attributes
What does a natural join combine relations on?
Common attributes
Match the aggregate function with its purpose in relational algebra:
COUNT ↔️ Counts rows
SUM ↔️ Sums numeric values
AVG ↔️ Calculates average
MIN ↔️ Finds minimum value
Which relational operator is allowed in theta join conditions?
Equality ||| Greater than ||| Less than
What do aggregate functions return in relational algebra?