Abstract
This chapter discusses relational algebra. Relational algebra is a data manipulation language that provides a set of operators, each of which processes a complete table or tables at a time. In comparison with record-at-a-time languages, a table-at-a-time language offers more powerful, more concise commands that simplify data manipulation and are better suited to automatic optimization. The three most important operations in relational algebra are those for constructing a new table by selecting rows from an existing table, by selecting columns from an existing table, and by linking together tables on the basis of values in specified columns of each. These operations are explained in the chapter with examples and examples of queries that require a succession of operations are provided. The join operations links tables together on the basis of specified columns in each, and they are discussed in the chapter. The join operation could be extended to allow operators other than equals. The union, intersection, and difference operations apply only to tables that have compatible layouts—that is, they must have the same number of columns and the values in the corresponding columns of each table must be drawn from the same domain. These operations are discussed in the chapter with the help of examples and the division operation is also explained with examples. The chapter also delves into extended Cartesian product and nested operations.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have