Copyright © 2004 Pearson Education, Inc.. Chapter 9 More SQL: Assertions, Views, and Programming...
-
Upload
dane-callaway -
Category
Documents
-
view
221 -
download
1
Transcript of Copyright © 2004 Pearson Education, Inc.. Chapter 9 More SQL: Assertions, Views, and Programming...
Copyright © 2004 Pearson Education, Inc.
Copyright © 2004 Pearson Education, Inc.
Chapter 9
More SQL: Assertions, Views, and Programming
Techniques
Slide 9-3Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.1Two views specified on the database schema of Figure 5.5.
Slide 9-4Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.2C program variables used in the embedded SQL examples E1 and E2.
Slide 9-5Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.3Program segment E1, a C program segment with embedded SQL.
Slide 9-6Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.4Program segment E2, a C program segment that uses cursors with embedded SQL for update purposes.
Slide 9-7Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.5Program segment E3, a C program segment that uses dynamic SQL for updating table.
Slide 9-8Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.6Importing classes needed for including SQLJ in JAVA programs in ORACLE, and establishing a connection and default context.
Slide 9-9Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.7JAVA program variables used in SQLJ examples J1 and J2.
Slide 9-10Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.8Program segment J1, a JAVA program segment with SQLJ.
Slide 9-11Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.9Program segment J2A, a JAVA program segment that uses a named iterator to print employee information in a particular department.
Slide 9-12Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.10Program segment J2B, a JAVA program segment that uses a positional iterator to print employee information in a particular department.
Slide 9-13Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.11Program segment CLI1, a C program segment with SQL/CLI.
Slide 9-14Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.12Program segment CLI2, a C program segment that uses SQL/CLI for a query with a collection of tuples in its result.
Slide 9-15Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.13Program segment JDBC1, a JAVA program segment with JDBC.
Slide 9-16Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.14Program segment JDBC2, a JAVA program segment that uses JDBC for a query with a collection of tuples in its result.
Slide 9-17Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
FIGURE 9.15Declaring a function in SQL/PSM.