Writing for 10/23

Writing for 10/23

by Charlie Benck -
Number of replies: 0

This evening I spent the majority of my time watching and attempting to understand Professor Widom's course on Relational Algebra. While she hints at the material being particularly simple (often comparing her topics to those covered by elementary school students) I struggled with visualizing the results and hope for an opportunity to try the commands with my own data.

Professor Widom's videos were broken into 7 parts, each covering various "operators" within relational algebra. Ultimately, conveying a lot of the material is a struggle without the use of subscripts or her visual aids, but the general uses of these operators can be communicated.  In the first section, the select operator, signified with σ, is identified. This operator can be used to pick specific rows of a relation. Next, the project operator, signified with π, is identified. This operator can be used to pick specific columns of a relation. Finally, Professor Widom reveals that operators can be used on other operators through the use of parentheses, allowing the selection of specific rows & columns. In the second section, Professor Widom begins with explaining that relational algebra eliminates duplicates (so queries which have multiple duplicate answers will return only one value for each result). Next, the cross-product (or Cartesian product) operator, signified with x, is identified. This operator combines two relations and forms a new schema that is the first two schema combined, populated with every possible combination of tuples from the initial relations. Widom also explains that the operator is primarily used in conjunction with other operators, where its functionality is most prevalent. In the third section of her course, Widom introduces the natural join operator, signified by ⋈, which performs the same function as the cross product operator, but "enforces equality on all attributes with the same name" (essentially combining only tuples which share attribute names). In the fourth part of her course Widom introduces the Theta-Join operator, identified by ⋈ ϴ (imagine that the theta is in the subscript of the natural join), where theta is some condition. Widom states that most database management systems use the theta join as the basic combining operation for combining relations. The fifth section introduces the union operator, represented by ∪, which allows for the creation of lists of attributes from different relations. Additionally, the difference operator, represented with a -, allows for the creation of the difference in attributes between relations. Finally, the intersection operator, represented by , is introduced. This operators function is isolating identical answers across relations and producing a new relation composed of those isolated tuples. In the sixth section of her course, Widow introduces the rename operator, represented by , which allows for the renaming of relations and/or attributes produced by an expression as well as the disambiguation of "self-joins". In the final section of the video, Professor Widow closes by covering some alternate notations that people prefer to use to "modularize" their expressions, and then gives a brief overview of all material covered in previous videos.