Professional Documents
Culture Documents
EXPERIMENT NO : 1 REMARK
DATE SIGN
Experiment no: - 1
Theory: -
• INTRODUCTION TO ORACLE9I:
SQL consists of two models
• Oracle9i Features:
There are two products, Oracle9i Application server (Oracle9iAS – services for all
different server applications) & Oracle9i Database (stores all data). That provide a complete
and simple infrastructure for Internet applications.
2. Design:
- Design database based on the model development in the strategy and analysis phase.
4. Transition
- Refine the prototype & make any modification required.
5. Production
It is derived from business specification & built during the analysis phase of the system
development life cycle.
Key Components:
• SQL STATEMENTS:
Syntax:-
SELECT *| {[DISTINCT] column | expression [alias] …}
FROM table;
1) SELECT *
FROM departments;
DEPT_ID DEPT_NAME MANAGER_ID LOCATION_ID
50 IT 103 1400
FROM departments;
DEPT-ID LOCATION_ID
10 1700
20 1400
FROM employees;
FROM employees;
NAME ANNUAL_SALARY
King 228800
Kochhar 204000
De Haan 204000
FROM employees;
Employees
KingAD_PRES
KochharAD_VP
De HaanAD_VP
HunoldIT_PROG
FROM employees;
DEPT_ID
10
20
30
DESCRIBE employees
FIRST_NAME VARCHAR(20)
PHONE_NUMBER VARCHAR(20)
The Oracle9i Server is the database for Internet computing & based on the object
relational database management system.
You should have learned how to write & execute SELECT statements.
EXPERIMENT NAME :
EXPERIMENT NO : 2 REMARK
DATE SIGN
Experiment no: - 2
Experiment Name: - Ret rival Commands-I
Aim: - Performing practical by using restricting, sorting conditions and single-row functions.
Theory: -
Syntax:-
FROM table
[WHERE condition(s)];
Example:
FROM employees
- Comparison Conditions
1) SELECT last_name, salary
FROM employees
LAST_NAME SALARY
Matos 2600
Vargas 2500
FROM employees
LAST_NAME SALARY
Rajs 3600
Devies 3200
Matos 2600
FROM employees
SELECT last_name
FROM employees
LAST_NAME
Kochhars
Mourgas
- Logical Conditions
FROM employees
OR job_id = ‘AD_PRES’)
FROM employees
WHERE job_id
LAST_NAME JOB_ID
King AD_PRES
Kichhar AD_VP
Morgus AD_VP
Ziofkey ST_MAN
FROM employees
ORDER BY annsal;
• SINGLE-ROW FUNCTION:
1. Character Function
2. Number Function
3. Date Function
4. Conversion Function
5. General Function
Character-Manipulation Functions
FROM employees
Number Functions
FROM DUAL;
45.92 46 50
FROM DUAL;
45.92 45 0
FROM employees
Date Functions
ANS: 19.6774194
- ADD_MONTHS: Add calendar months to date
ADD_MONTHS (’11-JAN-94’, 6)
ANS: ’11-Jul-94’
ANS: ’08-SEP-95’
LAST_DAY (’01-FEB-95’)
ANS: ’28-FEB-95’
ANS: 01-AUG-95
ANS: 01-JAN-95
Conversion Functions
FROM employees
WHERE hire_date < TO_DATE (’01-Jan-90’, ‘DD-Mon-RR’);
LAST_NAME TO_CHAR(HIR
King 17-Jan-1987
Kochhar 21-Sep-1989
Whalen 17-Sep-1987
General Functions
These functions work with any data type and pertain to using nulls.
Conclusion: