Notes
Slide Show
Outline
1
 
2
Chapter 8
  • SQL-99: Schema Definition, Basic Constraints, and Queries
3
FIGURE 8.1
SQL CREATE TABLE data definition statements for defining the COMPANY schema from Figure 5.7.
4
FIGURE 8.1 (continued)
SQL CREATE TABLE data definition statements for defining the COMPANY schema from Figure 5.7.
5
FIGURE 8.1
(continued)
SQL CREATE TABLE data definition statements for defining the COMPANY schema from Figure 5.7.
6
FIGURE 8.2
Example illustrating how default attribute values and referential triggered actions are specified in SQL.
7
FIGURE 8.3
Results of SQL queries when applied to the COMPANY database state shown in Figure 5.6.
(a) Q0. (b) Q1. (c) Q2. (d) Q8. (e) Q9. (f) Q10. (g) Q1C.
8
FIGURE 8.4
Results of additional SQL queries when applied to the COMPANY database state shown in Figure 5.6. (a) Q11. (b) Q11A. (c) Q16. (d) Q18.
9
FIGURE 8.5
The results of SQL multiset operations. (a) Two tables, R(A) and S(A). (b) R(A) UNION ALL S(A). (c) R(A) EXCEPT ALL S(A). (d) R(A) INTERSECT ALL S(A).
10
FIGURE 8.6
Results of GROUP BY and HAVING. (a) Q24. (b) Q26.
11
FIGURE 8.6 (continued)
Results of GROUP BY and HAVING. (b) Q26.
12
FIGURE 8.6 (continued)
Results of GROUP BY and HAVING. (b) Q26.