RDBMS Using Oracle
RDBMS Using Oracle
RDBMS Using Oracle
Oracle
2+1
Relational Database Management System
Using Oracle
E-mail: kamran@niit.edu.pk
1
SQL
PL/SQL
SQL/PLSQL
n Data Types & Oracle RDBMS limits
n Getting information, Adding, Updating & Deleting
information
n SQL Arithmetic, Group, Character and Date
functions
n Creating and using views
n Creating Index
n Functions
n Procedures
n Implicit and Explicit Cursors
n Triggers
n etc.
2
Front-end Development
n Oracle Forms/Reports Development
• Creating front-
front -end forms and menus
• Working with form objects
• Creating buttons, text items, images, blocks etc
• Creating reports and graphs
3
Books
n Oracle 9i PL/SQL
A Developer’s Guide
By Bulusu Lakshman
Reference Books
4
Lets begin………
Installation
5
Oracle 8/8i
Windows NT/2000/xp
6
Oracle 9i
n Oracle 9i Database
n Oracle 9i Development Suite
Oracle Server
Instance
7
SQL
In Oracle
RDBMS
PL/SQL
Lecture 1
1. Overview of the Oracle RDBMS
2. Overview of SQL* Plus
3. Data Types in Oracle SQL Plus
4. Oracle RDBMS limits
5. Getting information from a table
6. Selecting limited rows/columns
7. Comparison Operators
8
SQL queries
n What is query?
SQL
Query
User
Query Analyzer
Output Database
9
Database
n Tables No Limit
n Rows No Limit
n Columns in a table 254
n Characters in a character field 240
n Number Field 105
n Tables joined in a query No limit
n Level of nested sub queries 255
n Characters in a name 30
10
SQL
n SQL (Structural Query Language) is a language which
is used to manipulate data in any RDBMS.
SQL Plus
SQL Plus is a program for working with an ORACLE
database by using SQL language.
11
SQL commands categories
12
ORACLE Sample tables
n EMP
n Bonus
n Dept orcl
n Salgrade
13
The system table “tab”
SELECT statement
14
SELECT statement
e.g.
SQL> select empno from emp
emp;;
SELECT statement
More Examples
SQL> select ename from emp
emp;;
15
Table description command
16
CAR table
CarNo Color
2344 RED
3445 BLACK
3467 RED
9878 BLUE
Suppose we want to select RED cars only.
2- Select car-
car-numbers from car table
whose color is RED?
Comparison Operators
n = Equal to
n ! = or <> Not equal to
n > Grater then
n >= Grater then equal to
n < less then
n <= less then equal to
n BETWEEN …AND… between two values
n IN (list) any of a list of values
n LIKE Match a character
pattern
17
= (Equal to)
18
> Grater then
19
>= Grater then equal to
BETWEEN …AND
NOTE:
Records with salary 200 and 800 are also included.
20
IN (list) any of a list of values
21
and ……. or
n SQL> select * from emp
where sal = 800 or sal = 600
Lab Practice
22
Practice Following SQL Queries
PERFORM THE FOLLOWING QUERIES:
Part 1
Part 2
23
Part 3
n List all departments number from table emp
emp..
Be Happy J
24