1 announcements reading for next week: chapters 6 and 7 next-to-last reading from the text for a...

9
1 Announcements Reading for next week: Chapters 6 and 7 Next-to-Last reading from the text for a little while (I promise) Your database accounts should be ready now See me if you have any trouble accessing your accounts Your first homework will be posted on the website tonight Please pick a partner (or 2) for your class project One person from each team send me an email by next class, cc’ed to the other members of the team.

Upload: howard-preston

Post on 18-Jan-2018

214 views

Category:

Documents


0 download

DESCRIPTION

3 Advanced SQL Topics Oracle Tools Domain Types  Basic: CHAR, VARCHAR, INT, DOUBLE, etc.  Date, Time, and Timestamp  User-defined types  Large OBject (LOB) types: CLOB and BLOB Integrity Constraints Authorization Embedded and Dynamic SQL Stored Procedures The Limits of SQL

TRANSCRIPT

Page 1: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

1

Announcements

Reading for next week: Chapters 6 and 7 Next-to-Last reading from the text for a little while (I

promise) Your database accounts should be ready now

See me if you have any trouble accessing your accounts Your first homework will be posted on the website

tonight Please pick a partner (or 2) for your class project

One person from each team send me an email by next class, cc’ed to the other members of the team.

Page 2: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

2

Advanced SQL Topics

Oracle Tools SQL*Plus (and Worksheet) SQL*Loader

Domain Types Integrity Constraints Authorization Embedded and Dynamic SQL Stored Procedures The Limits of SQL

Page 3: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

3

Advanced SQL Topics

Oracle Tools Domain Types

Basic: CHAR, VARCHAR, INT, DOUBLE, etc. Date, Time, and Timestamp User-defined types Large OBject (LOB) types: CLOB and BLOB

Integrity Constraints Authorization Embedded and Dynamic SQL Stored Procedures The Limits of SQL

Page 4: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

4

Advanced SQL Topics

Oracle Tools Domain Types Integrity Constraints

Basic: Primary Key, not null, unique check clause, assertions Foreign Key

Authorization Embedded and Dynamic SQL Stored Procedures The Limits of SQL

Page 5: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

5

Advanced SQL Topics

Oracle Tools Domain Types Integrity Constraints Authorization

Grant, Revoke Users and Roles

Embedded and Dynamic SQL Stored Procedures The Limits of SQL

Page 6: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

6

Advanced SQL Topics

Oracle Tools Domain Types Integrity Constraints Authorization Embedded and Dynamic SQL

EXEC SQL/END SQL (C style embedding) #SQL { } (Java style embedding) ODBC and JDBC

Stored Procedures The Limits of SQL

Page 7: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

JDBC Exampleimport java.sql.*; // and maybe javax.sql.*;public static void JDBCexample(String dbid, String userid, String pw){

try {Class.forName(“oracle.jdbc.driver.OracleDriver”);Connection conn = DriverManager.getConnection(

“jdbc:oracle:thin:@oracle2.cis.temple.edu:tempdb”,userid, pw);

Statement stmt = conn.createStatement();try {

stmt.executeUpdate(“insert into student values(‘jim’,200,’phd’,’zoran’)”);

catch(SQLException sqle) { … }stmt.close();conn.close();

}catch(SQLException sqle) { … }

}

Page 8: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

8

Advanced SQL Topics

Oracle Tools Domain Types Integrity Constraints Authorization Embedded and Dynamic SQL Stored Procedures

Why Stored Procedures? The Basics of Stored Procedure Syntax

The Limits of SQL

Page 9: 1 Announcements Reading for next week: Chapters 6 and 7  Next-to-Last reading from the text for a little while (I promise) Your database accounts should

9

Advanced SQL Topics

Oracle Tools Domain Types Integrity Constraints Authorization Embedded and Dynamic SQL Stored Procedures The Limits of SQL

What can’t be done with SQL that can be done with Java/C/C#/other programming languages?

Recursive SQL – solution? Event-based programming?