Reflection

Reflection

by Tianyi Zhang -
Number of replies: 0

In video ‘relation algebra’, Professor Widom talks about relations. Relation has two basic elements: relation name and operators. Relation name refers to the name of data we deal with. Operators are what we do with the data. Having relation name, data is queried with operator and result is returned. In the video, four operators are introduced:

Select: pick certain rows

Project: pick certain columns

Cartesian product: combine two relations. Because DBMS is using sets, combining two relations is the cross product of them.

Natural join: enforce equality on all attributes with same name and eliminate one copy of duplicate attributes.

Theta join: theta condition for cross product of two expressions. Join in DBMS often means theta join

For w3schools, I have learnt all the contents in SQL Tutorial part. In this part, SQL statements which can query for data, such as select, join and some other functions. One thing that I notice is that the statements are operations based on sets, like in Professor Widom’s video.