Filters tuples from relation R that satisfy the proposition P under 3VL logic.
Relational Algebra Sandbox
ValidSnapshot v1Design schemas below, then evaluate expressions against the active snapshot (Lesson Schema).
Operator palette
Extracts specified attributes and eliminates duplicate tuples from the result.
Assigns an alias to an intermediate relation to prevent ambiguity in self-joins.
Renames specific attributes within relation R while preserving tuple data.
Produces all possible tuple pairings between relations R and S.
Equi-join on all identically named attributes between R and S, projecting duplicate columns.
Combines tuples from R and S that satisfy join condition θ.
Preserves all tuples from the left relation R, padding unmatched right attributes with NULL.
Preserves all tuples from the right relation S, padding unmatched left attributes with NULL.
Preserves all tuples from both relations R and S, padding non-matching sides with NULL.
Combines distinct tuples from union-compatible relations R and S.
Yields tuples appearing in both union-compatible relations R and S.
Yields tuples belonging to relation R that do not appear in union-compatible relation S.
Universal quantification operator: finds tuples in R(A - B) associated with all tuples in S(B).
Each operator inserts a syntax template with editable placeholders. Use Ctrl+Shift+O (⌘⇧O on Mac) to focus this palette from the editor.
Operator reference
Full guide →- σSelection (Restrict)Read
σ <predicate> ( R )
Filter rows before projecting or joining so intermediate results stay small and readable.
- πProjectionRead
π <a1, a2, …> ( R )
Drop unused columns and collapse duplicate rows after joins or unions.
- ρRelation renameRead
ρ Alias ( R )
Self-joins and comparisons between two uses of the same base table.
- ρAttribute renameRead
ρ[old → new] ( R )
Align column names before union or clarify labels after a join.
- ⨯Cartesian Product (Cross Join)Read
R ⨯ S
Build a wide intermediate relation before σ or ⋈_θ when no shared column names exist.
- ⋈Natural JoinRead
R ⋈ S
Foreign-key style links when column names already match (e.g., dept_id on both sides).
- ⋈_θTheta Join (Conditional Join)Read
R ⋈[θ] S
Join predicates that are not limited to identically named columns.
- ⟕Left Outer JoinRead
R ⟕[θ] S
Keep every left row even when the right side has no match (optional relationships).
- ⟖Right Outer JoinRead
R ⟖[θ] S
Mirror of left outer join when the preserved side should be the right operand.
- ⟗Full Outer JoinRead
R ⟗[θ] S
Full coverage when you need unmatched rows from both operands.
- ∪Set UnionRead
R ∪ S
Merge compatible lists (e.g., names drawn from two relations).
- ∩Set IntersectionRead
R ∩ S
Overlap queries (“students in both courses”).
- −Set DifferenceRead
R − S
Anti-join patterns and “rows in A but not B”.
- ÷Relational DivisionRead
R ÷ S
“For all” queries—students who took every required course, suppliers who ship every part, etc.
No issues found for the current snapshot.
Relations: Departments, Employees · Attributes: dept_id, dept_name, emp_id, name
Press Control Space for autocomplete, Control Shift O to focus the operator palette, or Control slash to open keyboard shortcuts help.
Immutable copy v1 · 2 relations