ORACLE DATABASE ADMINISTRATION
BY
MD.MAHMODUL HASAN
ID: 142-15-3442
This Report Presented in Partial Fulfillment of the Requirements for
the Degree of Bachelor of Science in Computer Science and Engineering
Supervised By
MR. Shah Md. Tanvir Siddiquee
Senior
Lecturer
Department of CSE
Daffodil International University
Co Supervised By
Mr.Ahmed Al Marof
Lecturer
Department of CSE
Daffodil International University
DAFFODIL INTERNATIONAL UNIVERSITY
DHAKA, BANGLADESH
MAY 2018
APPROVAL
This Project titled “ORACLE DATABASE ADMINISTRATION”, submitted by
MD.Mahmodul Hasan to the Department of Computer Science and Engineering, Daffodil
International University, has been accepted as satisfactory for the partial fulfillment of the
requirements for the degree of B.Sc. in Computer Science and Engineering (BSc) and approved
as to its style and contents. The presentation has been held on *07-04-2018*
.
BOARD OF EXAMINERS
Dr. Syed Akhter Hossain Chairman
Professor and Head
Department of Computer
Science and Engineering
Faculty of Science & Information Technology
Daffodil International University
Dr. Sheak Rashed HaiderNoori Internal Examiner
Associate Professorand Associate Head
Department of Computer Science and
Engineering
Faculty of Science & Information Technology
Daffodil International University
Md. Zahid Hasan Internal Examiner
Assistant Professor
Department of
Computer Science
and Engineering
Faculty of Science & Information Technology
Daffodil International University
Dr. Mohammad Shorif Uddin External Examiner
Professor
Department of Computer
Science and Engineering
Jahangirnagar University
© Daffodil international university i2
DECLARATION
We hereby declare that, this project has been done by us under the supervision of MR. Shah
Md. TanvirSiddiquee,Senior Lecturer, Department of CSE Daffodil International University.
We also declare that neither this project nor any part of this project has been submitted elsewhere
for award of any degree or diploma.
Supervised by:
MR. Shah Md.Tanvir Siddiquee
Senior Lecturer
Department of CSE
Daffodil International University
Co Supervised by:
Mr. Ahmed Al Marouf
Lecturer
Department of CSE
Daffodil International University
Submitted by:
MD. Mahmodul Hasan
ID: 142-15-3442
Department of CSE
Daffodil International University
© Daffodil international university ii 3
ACKNOWLEDGEMENT
First we express our heartiest thanks and gratefulness to almighty God for His divine blessing
makes us possible to complete the final year internship successfully.
We really grateful and wish our profound our indebtedness to MR. Shah Md. Tanvir
Siddiquee, Senior Lecturer, Department of CSE Daffodil International University, Dhaka. Deep
Knowledge & keep interest of our supervisor in the field of “Oracle Database Administration”
to carry out this project. His endless patience, scholarly guidance ,continual encouragement,
constant and energetic supervision, constructive criticism , valuable advice ,reading many
inferior draft and correcting them at all stage have made it possible to complete this project.
We would like to express our heartiest gratitude to Dr. Syed Akhter Hossain,Head, Department
of CSE, for his kind help to finish our project and also to other faculty member and the staff of
CSE department of Daffodil International University.
We would like to thank our entire course mate in Daffodil International University, who took
part in this discuss while completing the course work.
Finally, we must acknowledge with due respect the constant support and patients of our parents.
iii
© Daffodil international university 4
ABSTRACT
This internship report is the primary gateway to understand the Oracle Database Software.
Conceptually, Oracle database is large Database software Management System, a place to store
and retrieve information. At the computer level, Oracle is a computer program that manages
many types of database system. I have shown all the steps that are required to solve the database
program.. Finally, my documentation for this internship indicates successful completion of the
tasks that was assigned to me.
© Daffodil international university 5iv
TABLE OF CONTENTS
CONTENTS PAGE
Board of examiner I
Declaration ii
Acknowledgement iii
Abstract iv
CHAPTER
CHAPTER 1: Introduction (1-3)
1.1 Introduction 1
1.2 Motivation 1
1.3 Internship Objectives 1
1.4 Introduction to the Company 1
1.5 Outcome 2
1.6 Objectives of the report 3
CHAPTER 2: Organization (4-7)
2.1 Introduction 4
2.2 Market Situation 4
2.3 Target Group 4
2.4 SWOT Analysis 4
© Daffodil international university 5v
2.5 It Service Offered 5
2.6 Roles in Market 7
CHAPTER 3: Tasks, Projects and Activities (9-43)
3.1 Introduction 9
3.2 Objective 9
3.3Tools to be used 9
3.4 Daily Task & Activities (SQL plus) 9
3.5Daily Task & Activities (PL/SQL ) 12
3.6 Projects Task and Activities 34
3.7 Challenges 43
CHAPTER 4: Competencies and Smart Plan (44-44)
4.1 Competencies Earned 44
4.2 Smart Plan 44
4.3 Reflections 44
CHAPTER 5: Conclusion and Future Career (45-45)
5.1 Discussion and Conclusion 45
5.2 Scope for Further Career 45
APPENDIX 46
REFERENCES 47
© Daffodil international university 7
LIST OF FIGURES
FIGURES PAGE NO
Figure 3.1: Database user cerate 10
Figure 3.2: Table create for database use 11
Figure 3.3: Sum/Sub/Avg 13
Figure 3.4: Procedure Creating 14
Figure 3.5: Department show with null 19
Figure 3.6: If else condition 21
Figure 3.7: Function for getting together last & first name 31
Figure 3.8: Table name 34
Figure 3.9: Module on forms builder 36
Figure 3.10: User interface 36
Figure 3.11: Time slot 37
Figure 3.12: Vehicles entry and list 38
Figure 3.13: pump’s entry 38
Figure 3.14.1: Transaction (Step 1) 39
Figure 3.14.2: Transaction (Step 2) 40
Figure 3.14.3: Transaction (Step 3) 40
Figure 3.15.1: Search (Step 1) 41
Figure 3.15.2: Search (Step 2) 42
Figure 3.15.3: Search (Step 3) 42
© Daffodil international university 8
CHAPTER 1
Introduction
1. Introduction:
An Oracle database is a collection of data treated as a unit. The purpose of a database is to store
and retrieve related information. A database server is the key to solving the problems of
information management. In general, a server reliably manages a large amount of data in a
multiuser environment so that many users can concurrently access the same data. All this is
accomplished while delivering high performance. A database server also prevents unauthorized
access and provides efficient solutions for failure recovery.
2. Motivation:
A database administrator's job involves working with a variety of databases, from banks' account
systems to hospital record management. Oracle is worldwide leader and Oracle database is most
popular globally. Most of the companies are using Oracle database on various platforms. Means
chances of Oracle DBA jobs are more at any type of industry like telecom, finance, banking, etc.
3. Internship Objectives:
Database Administrators work to ensure that databases are secured and that they are performing
properly. They work on development as well. They make sure that data is consistent in the
database and that it is clearly defined. Database Administrators monitor user access, determine
user needs, design databases, perform tests, ensure standards are maintained and work with other
IT professionals and managers to ensure database integrity and security are kept up with.
Important skills include technical, communication, analytical and problem-solving skills.
4. Introduction to the Company:
SYS DEV LTD is one of the most robust and leading End-to-End Software Development,
Professional Skill Development and Support Solutions Company in Bangladesh. Since its
© Daffodil international university 9
inception in 2011, the company is working with a mission to meet the consumer needs and
aspiration in distributing high quality software and hardware products and services through
maintaining high level of customer satisfaction.
SYS DEV LTD has started its journey as a proprietorship company named “DEV NET IT” in
2011. It was very robust and quick growing company in Bangladesh. With good reputation and
full furnished product its form as a company as the name of “SYS DEV LTD” in 2015.
Official Name: SYS DEV LTD.
Type: Private Limited Company registered in Bangladesh
Year of establishment: 2011
Operational Office Address:
House No: 104, Flat No: A-1, 1stFloor, Siddeswari Circular Road, Ramna, Dhaka-1217.Web:
www.sysdevltd.com
Services Provide:
• Software Development
Android and IOS apps Development
• Corporate IT Solution
• IT Consultancy
• Provide Professional and Fundamental Training
• Web Application Design and Development
• Web based and Client Server Application Design Development
• Networking and Automation
• Export/Import of software and hardware
• Hardware and security devices sales and supply
1.5 Outcome:
After completing the internship, I hope it will increase my skill and give me the professional
experience. That will be helpful to build my career and easy to get a job.
© Daffodil international university 10
1.6 Objective of the report:
1. Learn how to install and configure the Electricity Billing Management software.
2. To obtain a wide knowledge about the networking security of a LAN
3. Know more about Database
4. To acquire practical knowledge of Oracle Developing
https://en.wikipedia.org/wiki/Oracle_Database
© Daffodil international university 11
CHAPTER 2
Organization
1. Introduction:
Database administrators works to ensure that databases are secured and they are performing
properly. Database administrators monitor user access, determine user needs, design databases,
perform tests, ensure standards are maintained and work with other it professionals and managers
to ensure database integrity.
2. Market Situation:
A database administrator builds and maintains custom databases to meet the specific data needs
of a company or organization. Increase the demand is expected in computer careers such as this
over the next 10 years, although here are fewer databases administrator jobs anticipated than in
other similar fields, such as network security specialist and telecommunication
specialist.Database administrators who are employed in a permanent position by a company to
maintain an internal database often work full-time.Database administration is a growing field
that should stay relevant for a long time.
3. Target Group:
There are many opportunities in DBA jobs. Because in every sector Database must be need. I
contact with Markentile Bank authority for internship. I hope they will give me the job
opportunity.
4. SWOT Analysis:
Strengths:
1. Low / free license fee.
2. Open source.
© Daffodil international university 12
3. Low product development cost.
Weaknesses:
1. Low reliability
2. Low service support
3. Lack of physical presence
Opportunities:
4. Lucrative market of large organizations.
5. Other emerging market like Saas vendors.
Threats:
1. Dilute its brand image.
2.5 It Service Offered:
Our expertise lies in clearly perceiving the business goals of our customers, choosing the most
appropriate technology and efficiently designing and developing solutions. We strongly believe
that this increases business value much more than the mere development of the software
application. Therefore we design and develop innovative and high quality end-to-end software
and business solutions that help our clients reduce their work time and cost of business operation.
NAME OF SYS DEV LTD’S SOFTWARE / MODULE:
SL Software Name
1 Hospital Management System
2 e-Office Management
3 Online Project Monitoring
© Daffodil international university 13
4 Online HRM with Admin and Payroll
5 Online Sales, Inventory and Account Management System
6 Online Inventory Management
7 Library Management System
8 Asset management system
9 Finance & accounting
10 Vehicle Management
11 House Keeping
12 Food and Beverage Management
13 Holdings Management System
14 Out – patient billing for hospital
15 In patient billing for hospital
16 Pathology/Imaging Management for hospital and diagnostic
17 Pharmacy management system ( Inventory and Procurement )
18 Blood Bank
19 Lab Interface System (LIS)
20 Point of Sale (POS)
21 Mobile Application
22 Export, Import, LC and Trading Inventory with Accounts
© Daffodil international university 14
Development Tools We Use:
Tools We Use In PROGRAMMING LANGUAGES:
Software
C/C++, Visual Basic, Visual C++, Java, Java Server Pages,
JavaScript, Visual Basic Scripting Edition
(VBScript), Java, Active Server Pages (ASP), JavaBeans, SH (KSH,
BASH), Python, PL SQL.
Net .NET Framework, C#, Microsoft Visual Basic .NET, ASP.NET,
Technologies: MVC
Open Source Linux, Unix, MySQL, PHP, Java, Java Script, etc
Tools:
Programming COM/DCOM/COM+, J2EE, J2ME, ActiveX, Cobra, RPC
Standards:
Networks/Web: Perl, CGI Script, HTML/DHTML, Internet Information Server,
Apache, Java
Web Server, XML, Windows NT, DOM/SAX, WAP, SSL
© Daffodil international university 15
Databases/DB Oracle, MS SQL Server, MS Access, MySQL, FoxPro, JDBC,
ODBC, OLE DB, Postgre, Mongodb
GUI: Microsoft Office/Visual Basic for Applications (VBA), KDE
(Linux), Motif (Solaris), Qt, Photon, X Window,
GNU toolkit cross platform development suite
2.6 Roles in Job Market:
Some of our clients:
1. Metropolitan Medical Center - Hospital
2. The Medical Center - Hospital at Chittagong
3. Pearl of Health Hospital - at Zambia[ Africa]
4. Advance Care Hospital - at Zambia[ Africa]
5. Smile Dental at Zambia [ Africa ]
6. Care Bangladesh
7. Exim Bank Hospital, Dhaka
8. LMRF- Hospital at Comilla
9. Advance Hospital Limited - Dhaka.
10.Paedi hope Hospital for Sick Children, Dhaka
11.Barakah Hospital Limited, Madanpur, Narayanganj
© Daffodil international university 16
12. Anwar Khan Modern Hospital, Dhanmondi
13. Ad-din Hospital, Zurain, Dhaka
14. Proper Healthcare Limited
15. Lazz Pharma
16. UNDP
17. Venus Telecom
18. MBM Group, Dhaka
19. Cutting Edge industries ltd.
20. Prochito IMC
21. United export ltd
22. Islamia General Hospital, Dhaka.
23. CRISL, Dhaka
https://en.wikipedia.org/wiki/Oracle_Database
© Daffodil international university 17
CHAPTER 3
Tasks, Projects and Activities
1. Introduction:
The system is fully database application. There is need to install the Database software. All you
have to need a personal ID and password for open the oracle user. To view temporary data the
server gets the request from the user and gate data from the database. And the required
information will appeared in the DB window. The admin can easily add, delete or update data
easily in the database. And users also have the facility to update delete and add command.
2. Objective:
Objective List the features of Oracle. Discuss the theoretical and physical aspects of a relational
database Describe the Oracle implementation of the RDBMS and ORDBMS. The admin can
easily add, delete or update data easily in the database. And users also have the facility to update
delete and add product.
3. Tools to be used:
# Oracle database 11g
# PL/SQL
4. Daily Tasks
and Activities
(SQL plus):
I want to create SELECT statements that can be used again and again. This lesson also covers the
use of SQL commands to execute SQL statements.
1. Create user and password:
If I want to create Database user and password:
CREATE
© Daffodil USER RIPON
international IDENTIFIED BY ABC;
university 18
GRANT DBA TO ABC;
Figure 3.1: Database User Create
2. User Delete:
DROP USER RIPON CASCADE;
3. User Password Change:
ALTER USER RIPONIDENTIFIED BY ABC;
GRANT DBA TO ABC;
4. How to Create Table:
Create table pr5
(ID Number,
Name varchar2(20),
Department_namevarchar2(20),
© Daffodil international university 19
Department_id number,
Salary number);
Figure 3.2: Table create for Database
5. How to Show Table:
If I want to see the table then use this:
Select * from pr5;
6. How to Delete Table:
If need to delete the table then
drop table pr2;
7. How to Insert Row
on Table:
If I want to insert a row on
that table then :
Insert into pr5 (Name,Department_name,Department_id,Salary)
values (RIPON, 'Boss', 001, 17000);
© Daffodil international university 20
8. How to Delete Row from Table:
If I want to delete row from table:
Delete from pr5 where Department_name=’Boss’;
9. How to Modify Column Name:
If I want to modify column name than:
Alter table pr5 modify (Department_idnumber );
// from department _id varchar2(20) to change department _id number
(20)//
5. Daily Tasks and Activities (PL/SQL):
1. Simple Code for PL/SQL: (Sum,Sub,Avg,)
Declare
x number; y number;
Sm number; Sb number; Ag number;
Begin
x:=20; y:=30;
Sm:=x+y; Sb:=x-y;
Ag:=(x+y)/2;
dbms_output.put_line('********* ');
dbms_output.put_line('sum Total '||Sm);
dbms_output.put_line('sub Total '||Sb);
dbms_output.put_line('avg Total '||Ag);
© Daffodil international university 21
dbms_output.put_line('********* ');
end;/
Figure 3.3: Sum/Sub/Avg
3.5.2 Code with Same Variable for 2 Times:
Declare
x number:=100; y Date; z number:=110;
p number; q number;
Begin
p:=x+z;
dbms_output.put_line('Total '||p);
x:=200; z:=300; p:=x+z;
dbms_output.put_line('Total '||p);
end;
© Daffodil international university 22
3.5.3 To Find and Print the Name of Employee and Salary from Employees:
declare
v_namevarchar2(30)
; v_sal number;
begin
selectlast_name,salary into v_name,v_sal from employees
whereemployee_id=120;
dbms_output.put_line('Name ' || v_name);
dbms_output.put_line('Salary ' || v_sal);
end;
Figure 3.4: Procedure Creating
© Daffodil international university 23
4.Find and print The sum(salary) and max(salary)
of DesierdDepartment_id from Employees :
declare
v_sum number;
v_max
number; begin
select sum (salary),max(salary) into v_sum,v_max from employees
wheredepartment_id=30;
dbms_output.put_line('Total ' || v_sum);
dbms_output.put_line('Max ' || v_max);
end;
5. Use Loop Statement:
Here I give some code and how to use
loop on statement:
1. Print Number 1 to 10
Sequentially: (single
loop)
Code:
Begin
fori in 1..10 loop
dbms_output.put_line(i);
© Daffodil international university 24
end loop;
end;/
2. Using Multi Loop:
declare
cursorempcur is select * from employees;
cursordepcur is select * from departments;
v_tax number;
begin
fori in empcur loop
dbms_output.put_line('name'|| i.last_name);
dbms_output.put_line('salary'|| i.salary);
dbms_output.put_line('job'|| i.job_id);
end loop;
fori in depcur loop
dbms_output.put_line(i.department_name);
end loop;
end;
3. Using Single loop & Fixed
Department id:
Declare
cursorempcur is select * from employees
© Daffodil international university 25
department_id in(20,30,40);
v_tax number;
begin
fori in empcur
loop
dbms_output.put_line('name'|| i.last_name);
dbms_output.put_line('salary'|| i.salary);
dbms_output.put_line('job'|| i.job_id);
end loop;
end;
3.5.6
Examp
le of
single
point
and 3
outputs
in each
point:
begin
fori in 1..5 loop
dbms_output.put_line('outer loop');
for j in 1..3 loop
dbms_output.put_line('inner'|| j);
© Daffodil international university 26
end loop;
dbms_output.put_line('out'|| i);
end loop;
7.To show employees department's all department By single identification &
it will use again & again by x called(without null) :
declare
cursordepcur is select * from departments where department_id in ( select department_id from
employees where department_id is not null);
cursorempcur (id number) is select * from employees where department_id=id;
begin
for x in depcur loop
dbms_output.put_line('department'|| x.department_name);
fori in empcur(x.department_id) loop
dbms_output.put_line('name'|| i.last_name);
dbms_output.put_line('salary'|| i.salary);
end loop;
dbms_output.put_line('...........');
end loop;
end;
8. For Full department
show (with null
department) :
declare
cursordepcur is select * from
departments;
© Daffodil international university 27
cursorempcur (id number) is select * from employees where department_id=id;
begin
for x in depcur loop
dbms_output.put_line('department'|| x.department_name);
fori in empcur(x.department_id) loop
dbms_output.put_line('name'|| i.last_name);
dbms_output.put_line('salary'|| i.salary);
end loop;
dbms_output.put_line('...........');
end loop;
end;
Figure 3.5: Department Show with null
© Daffodil international university 28
9. Using if else condition
1. Using if else condition & input value find the result :
declare
x number;
y varchar2(25);
begin
select salary
into x from employees where employee_id=&emp;
if x<200 then
y:='senior officer';
else
y:='jonior officer';
end if;
dbms_output.put_line(y);
dbms_output.put_line(x);
end;
Enter value for emp: 201
Output:
old 6: into x from
© Daffodil international
employees where university 29
employee_id=&emp;
new 6: into x from employees where employee_id=201;
jonior officer
13000
Figure 3.6: If else condition
3.5.9.2 Using multiple if else Condition & input value then find the result:
declare
x number:=&data;
y varchar2(25);
begin
if x= 1 then
y:='Best';
elsif x=2 then y:='Excellent';
elsif x=3 then y:='Good';
elsif x=4 then y:='Bad';
© Daffodil international university 30
elsif x=5 then y:='Sorry';
else y:='out of Range';
end if;
dbms_output.put_line(y);
end;
Enter value for data: 1
Output:
old 2: x number:=&data;
new 2: x number:=1;
Best
3.5.10 Process:
1. to create table:--
create table pr_5
(id number,
lname varchar2(25),
sal number,
dt date,
dep number)
© Daffodil international university 31
2. insert values in the table: --
create or replace procedure x_proc (pid number) is
v_namevarchar2(25);
v_sal number;
v_dt date;
v_dept number;
begin
selectlast_name,salary,hire_date,department_id into v_name,v_sal,v_dt,v_dept from employees
whereemployee_id=pid;
insert into pr_5
values (pid,v_name,v_sal,v_dt,v_dept);
commit;
end;
3. to check... or use we must need to
execute: --
4. executex_proc(120);
5. select * from pr_5;
4. replace current table values by
using procedure:--
create or replace procedure dlp
is
© Daffodil international university 32
begin
delete pr_5;
commit;
end;
5.Another
procedure
by using
cursor in
same table
by
replacing:-
create or replace procedure ins_p
(p_id number)
is
curserxcur is select * from employees
wheredepartment_id = p_id;
begin
fori in xcur loop
insert into pr_5 values (i.employee_id,i.last_name,i.salary,i.hire_date,i.department_id);
end loop;
commit
; end;
/
© Daffodil international university 33
executeins_p(20);
3.5.11Function:
1.create a function & assign the id to find the name:-
create function x_fnc
(pid number)
return varchar2
is
v_namevarchar2(25)
; begin
selectdepartment_na
me into v_name
from departments
where
department_id=pid;
returnv_name;
end;
To Check:
selectx_fn(100
) from dual;
2. Function:
create a
function &
assign the
id to find
the fisrt&
last
Name:-
© Daffodil
create or international university 34
replace
function x_fnc
(pid number)
begin
selectfirst_name || last_name into v_name from employees where employee_id=pid;
returnv_name;
end;/
To Check:
Selectx_fn(100) from dual;
3. Function: create a function & assign the id with if else condition
to find the tax bases on salary:-
create function f_tax
(pid number)
return
number is
v_tax number;
v_sal
number;
begin
select salary into v_sal from employees where employee_id=pid;
ifv_sal<5000 then
v_tax:= v_sal * .05;
elsifv_sal< 10000 then
v_tax:= v_sal * .1 ;
© Daffodil international university 35
elsev_tax:= v_sal * .15;
end if;
returnv_tax;
end;
Tocheck:
selectem
ployee_i
d,salary,f
_tax(100
) from
employe
es;
3.5.12
Find
out
Name
Depart
ment
Name
and
Tax
from
functio
ns:
Need to
create 3
functions
for Name
Departm
ent Name
andDaffodil
© Tax international university 36
Because
we have
no
function
whereemployee_id=id;
return v1;
end;/
Function
2:
create or replace function df2
(pid number)
return varchar2
is
vn varchar2(30);
Begin
selectdepartment_name into vn from departments
wheredepartment_id=pid;
returnvn;
end;
Functio
n 3:
create or replace function tf2
(id number)
return
number is
© Daffodil international university 37
tx number;
sal number;
Begin
select salary into sal from employees
whereemployee_id=id
; ifsal<=5000 then
tx :=sal * .05;
elsifsal<=10000 then
tx:=sal * .1;
elsetx:=sal * .15;
end if;
returnx;
end;
Final
one:
create or replace procedure test82
(vidnumber,did number)
is
v_namevarchar2(30)
;© Daffodil international university 38
v_deptvarchar2(30);
v_tax number;
begin
select
fx2(vid),df2(d
id),tf2(vid)
intov_name,v_dept,v_tax from dual;
dbms_output.put_line('name '||v_name);
dbms_output.put_line('department '||v_dept);
dbms_output.put_line('tax '||v_tax);
end;
Output:
execute test82(110,20)
3.5.13 Need First Name & Last
Name Together By full name from
employees:
create or replace function fx2
(id number)
return
varchar2is v1
varchar2(30);
Begin
© Daffodil international university 39
selectlast_name||'
'||first_name into
v1
from employees
whereemployee_id=id
; return'Full Name: '||
v1; end;
Figure 3.7: Function for getting together last name and first name
3.5.14 Delete one table and also insert another table in one command:
create table aud_1
(id number,
l_namevarchar2(30)
, sal number,
dt date,
usr varchar2(30))
© Daffodil international university 40
create table empxy
as select
employee_id,last_name
, salary from
employees end;/
create or replace trigger audtrig
after delete on empxy
for each row
begin
insert into aud_1
values(:old.employee_id,:old.last_name,
:old.salary,sysdate,USER);
end; /
3.5.15 Inserting or
Deleting in Multiple
Table By Using
Trigger:
create
table t3s
(ids
number,
sals
number,
© Daffodildts
international university 41
date,
coms
varchar2(10
create table t2m
(idm
number,
salm number,
dtm date);
create or replace trigger insdeltrig
after insert or update or delete on t2m
for each row
begin
if inserting then
insert into t2f
values(:new.idm,:new.salm,:new.dtm);
insert into t3s
values(:new.idm,:new.salm,:new.dtm,'My name is new data');
end if;
if deleting then
insert into t2f
values(:old.idm,:old.salm,:old.dtm);
insert into t3s
values(:old.idm,:old.salm,:old.dtm,'I am delete data');
end if;
© Daffodil international university 42
end;/
Now For Check:
insert into t2m
values(100,5000,sysdate);
insert into t2m
values(200,6000,sysdate);
delete from t2m where
idm=100;
http://dbmanagement.info/Books/MIX/Oracle11g_PLSQL_Devel_(1)_PLSQL.pdf
http://dbmanagement.info/Books/MIX/Oracle11g_PLSQL_Devel_(2)_Oracle_PLSQL.pdf
https://www.guru99.com/pl-sql-tutorials.html
http://holowczak.com/oracle-sqlplus-tutorial/
6. Project Task & Activities:
1. Finding Comparatively Idle Petrol Pump Nearby
First of all need to make a table and insert data on SQL Plus. For create this project need to make
some initial table like as Time Slot, Vehicle, Tran details, Transaction and which table we need.
Create table table name (
column1 datatype,
column2 datatype,
column3 datatype,
);
© Daffodil international university 43
Figure 3.8: Table name
Then we use oracle forms builder to design the user interface. We make some module on forms
builder. In those modules we use some button. For each and every button we use different code.
We use some internal system of oracle database to make this project like
LOV WIZARD
DATA BLOCK WIZARD
LAYOUT WIZARD
Module on forms builder:
On forms need to create some module for this project. For this project we need
1. PATINFO
2. VEHICLE
3. TIMESLOT
4. PATMAIN
© Daffodil international university 44
5. TRANDETAIL
6. DATAVW
7. PPCS
Figure 3.9: Module on forms builder
This is user interface for query. All things are linkup with this.
© Daffodil international university 45
Figure 3.10: User interface
1. Time Slot Entry:
Divided 24 hour in six slot .That’s make easy to find all vehicles details. And also we can insert
new time if we want to change or add new time zone.
© Daffodil international university 46
Figure 3.11: Time slot
2. Vehicles Entry:
That’s project is offline project. So that we need to insert new vehicles that we find
All searchable vehicles on that selected time zone.
© Daffodil international university 47
Figure 3.12: Vehicles list and entry
3. Pump Entry:
In our area we need to find all pump station and need to insert all pump station name and id on
that table.
© Daffodil international university 48
Figure 3.13: pump’s entry
4. Transaction:
Reason of offline mood we need to entry all things. Use CTRL + L and select the name or id of
the pump station. Then again we need to select the time slot same process using CTRL+L. Then
we have to entry the vehicles and save.
Figure 3.14.1: Transaction (Step 1)
© Daffodil international university 49
Figure 3.14.2: Transaction (Step 2)
Figure 3.14.3: Transaction (Step 3)
© Daffodil international university 50
5.Search :
This is the main things of this project. Using CTRT+L select pump name and the time slot .Then
we press GO button and that we get the value of selected pump station.
Figure 3.15.1: Search (Step 1)
Select the pump station and time zone.
© Daffodil international university 51
Figure 3.16.2: Search (Step 2)
When press the GO button
Figure 3.16.3: Search (Step 3)
© Daffodil international university 52
Here the output of this selected pump station and time zone
3.6 Challenges:
Need to go back for daily tasks and activities. For my first project its helps to pickup challenge
for finish this project and perfectly work on this oracle database. Helps to pickup new challenges
for new project on oracle database.
© Daffodil international university 53
CHAPTER 4
Competencies and Smart Plan
1. Competencies Earned:
Many things I have earned & learned from my internship. First of all help to know every details
about oracle database. Help to learn about PL/SQL & also SQL plus works. Which is very
important for oracle database. Helps to know difference between SQL plus & PL/SQL. Structure
of the PL/SQL block and also know the different types of PL/SQL blocks. So many things I have
learned from my internship. That makes me know about the details about this oracle database.
Evaluate PL/SQL & SQL plus statement. Experience of real-world. This internship helps me to
develop my communication skill. Know about the database theory and the database designing
skills. Control the database. If anything getting problem in database I can solve this problem.
Learned how to backup database and also recovery skills. Build up a project related in oracle
database. This internship helps to earned many potential skills. Works in under pressure, find out
the right and wrong things and also find out the critical problems. This all things I have learned
from my internship.
2. Smart Plan:
My internship topic is Oracle Database. Last 6 months I’m just learn and working on this topic
and I like it. Its helps me to become a certified OCA &OCP . Certified in oracle database it’s a
big things for my future.“Finding Comparatively Idle Petrol Pump Nearby” this is my first
project in oracle database. Now I’m working on a new project. I think working in oracle database
helps to build my good future and helps to get many opportunities for bright future.
5.3 Reflections:
“Finding Comparatively Idle Petrol Pump Nearby” this is my first project in oracle database.
Now I’m working on a new project.
© Daffodil international university 54
CHAPTER 5
Conclusion and Future Career
1. Discussion and Conclusion:
Working on oracle database it all helps to know every details about oracle database. Help to
learn about PL/SQL & also SQL plus works. Helps to know Structure of the PL/SQL block and
also know the different types of PL/SQL blocks. Control the database. If anything getting
problem in database solve this problem. How to backup database and also recovery skills. Build
up a project related in oracle database. I think working in oracle database helps to build my good
future and helps to get many opportunities for bright future.
2. Scope for Further Career:
Learning and working on this topic and I like it. Its helps me to become a certified OCA &OCP.
Certified in oracle database it’s a big things for my future.“Finding Comparatively Idle Petrol
Pump Nearby” this is my first project in oracle database. Now I’m working on a new project. I
think working in oracle database helps to build my good future and helps to get many
opportunities for bright future.
© Daffodil international university 55
APPENDIX
© Daffodil international university 56
REFERENCES
[1] ‘‘‘Oracle Database 11g: Develop PL/SQL Program Units (Volume 1),” April 2009. [Online] Available:
http://dbmanagement.info/Books/MIX/Oracle11g_PLSQL_Devel_(1)_PLSQL.pdf [Last accessed: 06-04-2018 at
9.47 pm].
2‘‘‘Oracle Database 11g: Develop PL/SQL Program Units (Volume 2),” April 2009. [Online] Available:
http://dbmanagement.info/Books/MIX/Oracle11g_PLSQL_Devel_(2)_Oracle_PLSQL.pdf [Last accessed: 06-04-
2018 at 9.59 pm].
3‘‘‘Oracle Database 11g: Develop PL/SQL Fundamentals,” September 2009. [Online] Available:
http://dbmanagement.info/Books/MIX/4_Oracle_Database_11g_PLSQL_Fundamentals_PLSQL.pdf[Last accessed:
06-04-2018 at 11.16 pm].
4Learn about oracle database, available at <<https://en.wikipedia.org/wiki/Oracle_Database>>, [Last accessed on 07-
04-2018 at 12.49 am].
5Learn about PL/SQL for begineers, available at <<https://www.guru99.com/pl-sql-tutorials.html>>, [Last accessed
on 07-04-2018 at 8.49 am].
6Learn about SQL plus available at <<http://holowczak.com/oracle-sqlplus-tutorial/>>, [Last accessed on 07-04-
2018 at 9.27 am].
© Daffodil international university 57