Dbs101_flippedclass3
Topic : Null Values and Set Operations in SQL
In this class, I learned what a null value and set operations is and where to apply them. Firstly, set operations are special types of operators which are used to combine the result of two queries. I came to know that for the set operators to perform operations in SQL, the number and order of columns must be the same and the data types must be compatible. So only after following these rules, the operator can perform accurately and ensure that set operations in SQL execute correctly and produce meaningful results. There are 4 operators covered under the set operations. They are; 1. Union, the operator which eliminates the duplicate rows from its result set. 2. Union all, it returns the result without removing the duplicates. 3. Intersect, it returns the common rows from the queries and has no duplicates and it arranges the data in ascending order by default. 4. Minus, used to display rows which are present in the first query but absent in the second query. These also don’t have duplicates and arrange the data in ascending order by default. Next, I learned about the null values. A null value indicates an unknown value. In other words, the NULL value points to an unknown value but this unknown value is not equivalent to a zero value or a field that contains spaces. For instance, if a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value and thereby the null value will be supported by SQL. A null value has three different interpretations, 1.The value exists but is not known. 2. Value exists but is purposely withheld. 3. Attributes not applicable. To test the null values, we have to use IS NULL and IS NOT NULL operators instead of the set operators. This ensures accurate and intuitive handling of null values in SQL queries.
During the class, as usual we formed experts and home groups of 6 members each. Before that Miss Palden gave us 30 mins to read on the set operation. And then when we finished reading about it, I explained to the other group members about what I understood and they also shared what they learned. We returned to the home group where I got to learn about the null values from the other group member.
Flipped class has helped me in many ways and is effective but during the presentation to the home group, there was only one group member who discussed the null values and the rest all discussed the set operations in their experts group. So, there were challenges in effectively communicating ideas and understanding his perspectives and with the majority of members who knew about the set operations, the discussion leaned heavily towards the set operations, potentially overshadowing discussions on null values. Therefore, if there were equal members who had knowledge on each topic, the discussions would be more effective.