Traditional Culture Encyclopedia - Traditional festivals - What are the five basic relational algebra operations of SQL

What are the five basic relational algebra operations of SQL

The five basic operations: merge, difference, product, select, and project; form a complete set of operations for relational algebra. Other non-basic operations: all operations that can be synthesized using the above five basic operations. Union (U), Intersection (⌒), Projection (π) Selection (σ) and Cartesian Product (×).

Traditional set operations

1, and (UNION) has two relations R and S, which have the same structure. and of R and S is a set consisting of tuples belonging to R or belonging to S. The operator is ∪[1]? Noted as T=R∪S.

2. Difference (DIFFERENCE) The difference between R and S is a set consisting of tuples that belong to R but not to S. The operator is -[1]? The operator is -[1]?, which is written as T=R-S.

3. The intersection of R and S is a set of tuples that belong to both R and S. The operator is ∩[1]? Noted as T = R ∩ S. R ∩ S = R - (R - S).