Loading topic
SELECT. Division is the relational algebra operator for queries of the form "find the X that are related to all Y.4 min readCOUNT, SUM, AVG, MIN and MAX. Basic relational algebra cannot count anything. This chapter adds one operator that can, and it shows how that oper3 min read{ t | P(t) }. It also assumes you know the quantifiers ∃ and ∀, and that you know the relational algebra operators from earlier chapters. The next chapter uses safety to compare calculus with algebra.4 min readStudent(sid, sname, age), Course(cid, cname), `Enrolled(sid, c4 min readUNION, INTERSECT and EXCEPT in SQL. It assumes you know basic set operations (union, intersection, difference), the relational algebra versions of these operators, and simple SELECT ... FROM ... WHERE queries. The chapter on DISTINCT and duplicates is also useful backgr5 min readSELECT ... FROM ... WHERE statement, know joins, and have seen the three-valued logic rule that a comparison with NULL gives UNKNOWN. The examples use Student(sid, sname, age), Course(cid, cname) and Enrolled(sid, cid).4 min readStudent(sid, sname, age), Course(cid, cname) and Enrolled(sid, cid).3 min read