
- •Objectivesj i
- •System Developmentl Lifei Cyclele
- •Data Storage on Differenti Mediaia
- •Relationall i l Database Concept
- •Relationall i l Database Definitioni i i
- •Data Modelsls
- •Entityi Relationshipl i ip Modell
- •Entityi Relationshipl i ip Modelingli Conventionsi
- •Entityi Relationshipl i ip Modelingli Conventionsi
- •Relationall i l Database Terminologyi l
- •Relatingl i Multiplel i le Tablesl
- •Relationall i l Database Propertiesi
- •Communicatingi i withi a RDBMS Usingi SQL
- •Relationall i l Database
- •Oracle8:l Objectj Relationall i l
- •Definingi i an Objectj
- •Usingi an Objectj Modell
- •Characteristicsi i of Objectj systems
- •Oraclele Completel Solutionl i
- •SQL Statements
- •About PL/SQL/
- •PL/SQL/ Environmenti
- •Benefitsi of PL/SQL/
- •Benefitsi of PL/SQL/
- •Benefitsi of PL/SQL/
- •Benefitsi of PL/SQL/
- •Benefitsi of PL/SQL/
- •Summary

About PL/SQL/
•• PL/SQL/ isis an extensiont i toto SQL withith designi featuresf t r off programmingr r i languagesl ..
•• Datata manipulationi l ti and queryry statementst t ts off SQL arere includedi l withinit in proceduralr r l unitsits off code..
I-23

PL/SQL/ Environmenti
PL/SQL block
|
PL/SQL engine |
|
|
PL/SQL |
PL/SQL |
Procedural |
|
|
|||
SQL |
Statement |
||
block |
|||
|
|
Executor |
SQL Statement Executor |
Oracle Server |
I-24

Benefitsi of PL/SQL/
Integration
Application
Shared |
Oracle Server |
|
|
library |
|
I-25

Benefitsi of PL/SQL/
Improve Performance
|
SQL |
|
Application |
SQL |
|
SQL |
||
|
||
|
SQL |
SQL
IF...THEN
SQL
Application ELSE SQL
END IF; SQL
OtherDBMSs
Oraclewith
PL/SQL
I-26

Benefitsi of PL/SQL/
Modularize program development
Anonymous |
Anony ous |
block |
block |
Application |
Application |
trigger |
trigger |
Database |
Database |
trigger |
trigger |
DECLARE
BEGIN
EXCEPTION
END;
Stored |
Stored |
procedure/ |
procedure/ |
function |
function |
Application |
Application |
procedure/ |
procedure/ |
function |
function |
Packaged |
Packaged |
procedure |
procedure |
I-27

Benefitsi of PL/SQL/
•• ItIt isis portablert le..
•• You can declarel re identifiersi tifi rs..
•• You can programr r withith proceduralr r l languagel controltr l structurestr t r ..
•• ItIt can handlele errorsrr rs..
I-28

Benefitsi of PL/SQL/
•• ItIt isis portablert le..
•• You can declarel re identifiersi tifi rs..
•• You can programr r withith proceduralr r l languagel controltr l structurestr t r ..
•• ItIt can handlele errorsrr rs..
I-29

|
|
|
|
Tablesl |
Used inin the Course |
|
|
|
|
||||||||
|
|
EMP |
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
EMPNO |
ENAME |
JOB |
|
|
MGR HIREDATE |
|
|
SAL |
COMM |
DEPTNO |
|
|
|
|
|
|
--------- |
---------- --------- --------- --------- --------- --------- --------- |
|
|
|
||||||||||
|
|
|
|
7839 |
KING |
PRESIDENT |
17-NOV-81 |
5000 |
|
10 |
|
|
|
||||
|
|
|
|
7698 |
BLAKE |
MANAGER |
7839 01-MAY-81 |
2850 |
|
30 |
|
|
|
||||
|
|
|
|
7782 |
CLARK |
MANAGER |
7839 09-JUN-81 |
1500 |
|
10 |
|
|
|
||||
|
|
|
|
7566 |
JONES |
MANAGER |
7839 02-APR-81 |
2975 |
|
20 |
|
|
|
||||
|
|
|
|
7654 |
MARTIN |
SALESMAN |
7698 28-SEP-81 |
1250 |
1400 |
30 |
|
|
|
||||
|
|
|
|
7499 |
ALLEN |
SALESMAN |
7698 20-FEB-81 |
1600 |
300 |
30 |
|
|
|
||||
DEPT |
7844 |
TURNER |
SALESMAN |
7698 08-SEP-81 |
1500 |
0 |
30 |
|
|
|
|||||||
7900 |
JAMES |
CLERK |
7698 03-DEC-81 |
950 |
|
30 |
|
|
|
||||||||
|
|
|
|
|
|
|
|
|
7698 22-FEB-81 |
1250 |
500 |
30 |
|
|
|
||
|
DEPTNO DNAME |
LOC |
|
|
|
|
|
||||||||||
|
|
|
7566 03-DEC-81 |
3000 |
|
20 |
|
|
|
||||||||
|
--------- -------------- ---------- |
|
|
|
|
|
|||||||||||
|
|
7902 17-DEC-80 |
SALGRADE |
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 ACCOUNTING |
NEW |
|
|
|
GRADE |
LOSAL |
HISAL |
|
|
|
||
|
|
|
|
|
|
7566 09-DEC-82 |
|
|
|
|
|
||||||
|
YORK |
|
|
|
|
|
|
|
--------- --------- --------- |
|
|
|
|||||
|
|
|
|
|
|
7788 12-JAN-83 |
|
|
|
|
|
||||||
|
|
|
|
20 RESEARCH |
DALLAS |
|
|
|
1 |
700 |
1200 |
|
|
|
|||
|
|
|
|
|
7782 23-JAN-82 |
|
|
|
|
|
|||||||
|
|
|
|
30 SALES |
CHICAGO |
|
|
|
2 |
1201 |
1400 |
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 OPERATIONS |
BOSTON |
|
|
|
|
3 |
1401 |
2000 |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
4 |
2001 |
3000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
3001 |
9999 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I-30

Summary
•• Relationall ti l databasest arere composed off relations,r l ti , managed by relationalr l ti l operations,r ti , and governedr by datata integrityi t rity constraintstr i ts..
•• Oracler le Serverr r allowsll you toto storet re and manage informationi f r ti by usingi thet SQL languagel and PL/SQL/ enginei ..
•• PL/SQL/ isis an extensiont i toto SQL withith designi featuresf t r off programmingr r i languagesl ..
I-31