In-Class Exercises
Fri Jan 26, 2018
Please refer to lecture notes for Day 4.
- Problem: Given the tables shown on Page 9 of Lecture 4,
Table T
A | B | C |
1 | 3 | 6 |
2 | 4 | 7 |
3 | 5 | 8 |
- Write and execute the SQLite3 commands to generate the result
- Write and execute the SQLite3 commands to generate the result of cross product of R and S.
Table Cross-Product
A | B | C |
1 | 2 | 3 |
1 | 3 | 4 |
1 | 3 | 5 |
3 | 2 | 3 |
3 | 3 | 4 |
3 | 3 | 5 |
- Write and execute the SQLite3 commands to generate the result of selection (R.A == S.B).
Table Selection
A | B | C |
3 | 3 | 4 |
3 | 3 | 5 |
- Problem Using the tables created in the above Problem, R,S, and T, write and execute the SFW query examples on Pages 10, 21, 22, and 24 of Lecture 4.
- Problem Down load the Excel file sample_data.xslx which contains similar information of company and product shown in Pages 25, 28, and 30. Try out those queries.