COSI 127b Lecture Notes - Lecture 2: Relational Algebra

42 views1 pages

Document Summary

Sql, structured query language, is the standard data definition and manipulation language for relational databases. Select from where queries keep duplicates, unless the distinct keyword is added after the select clause. The as keyword is similar to the rename operation in the relational algebra. Select is similar to projection in relational algebra, from is similar to the cartesian product, and where is similar to selection in the relational algebra. Sql has aggregate operations for the average, sum, count, maximum, and minimum. Operations with null usually result in null, except for count which results in zero instead. The evaluation order of sql clauses is: from, where, group by, having, select, order by, into. A correlated nested query is a type of nested query whose inner query references the outer relation, or table. The clause delete can be used instead of select for deletions. The insert into clause is used for inserting data.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents