learn.zybooks.com/zybook/WEBERCS2550ShaikhSpring2023/chapter/3/section/9
1 Users
0 Comments
23 Highlights
0 Notes
Tags
Top Highlights
Codd's operations, called relational algebra, have since been refined and are the theoretical foundation of SQL.
The select operation selects table rows based on a logical expression.
is equivalent to SELECT * FROM Table WHERE expression.
The project operation selects table columns.
is equivalent to SELECT Column1, Column2, ... FROM Table.
The product operation combines two tables into one result.
SELECT * FROM Table1 CROSS JOIN Table2.
The join operation, denoted with a "bowtie" symbol,
The join operation is equivalent to SELECT * FROM Table1 INNER JOIN Table2 ON expression.
the join operation is sometimes called a theta join.
Compatible tables have the same number of columns with the same data types.
Union, intersect, and difference operate on compatible tables and, collectively, are called set operations
The union operation combines all rows of two compatible tables into a single table.
SELECT * FROM Table1 UNION SELECT * FROM Table2.
Intersect operates on two compatible tables and returns only rows that appear in both tables.
SELECT * FROM Table1 INTERSECT SELECT * FROM Table2
The difference operation removes from a table all rows that appear in a second compatible table.
SELECT * FROM Table1 MINUS SELECT * FROM Table2
The rename operation specifies new table and column names.
The aggregate operation applies aggregate functions like SUM(), AVG(), MIN(), and MAX().
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.