Description:
Welcome to the comprehensive guide on Relational Database Management System (RDBMS) concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in RDBMS, offering a structured appr...
Description:
Welcome to the comprehensive guide on Relational Database Management System (RDBMS) concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in RDBMS, offering a structured approach to understanding databases in the context of modern computing. PDF content is prepared from the text book Learn Oracle 8I by JOSE A RAMALHO.
Key Topics Covered:
Main Topic : Packages
Sub-Topic :
Definition of packages, Package Specification Section, Package body section, Syntaxt for package and package body creation, Steps for creating and executing a packages, deleting a packages, oracle packages
Target Audience:
Final year B.Sc. Computer Science students at Alagappa University seeking a solid foundation in RDBMS principles for academic and practical applications.
URL for previous slides
Unit V
Chapter 17: https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter17-stored-procedures-and-functions/270844763
Chapter 16 : https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter16-trigger-creation/270631080
Chapter 15 : https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter-15-pl-sql-programming/270383949
About the Author:
Dr. S. Murugan is Associate Professor at Alagappa Government Arts College, Karaikudi. With 23 years of teaching experience in the field of Computer Science, Dr. S. Murugan has a passion for simplifying complex concepts in database management.
Disclaimer:
This document is intended for educational purposes only. The content presented here reflects the author’s understanding in the field of RDBMS as of 2024.
Size: 191.33 KB
Language: en
Added: Aug 07, 2024
Slides: 14 pages
Slide Content
RDBMS -Unit V
Chapter 18
Packages
Prepared By
Dr. S.Murugan, Associate Professor
Department of Computer Science,
AlagappaGovernment Arts College, Karaikudi.
(Affiliated by AlagappaUniversity)
Mailid: [email protected]
Reference Book:
LEARN ORACLE 8i, JOSE A RAMALHO
Package Body Creation
createpackagebodygenemp1is
PROCEDURE increase2(venoINemp2.eno%type,percent
number)IS
BEGIN
updateemp2setsalary=salary*(1+percent/100)
whereeno=veno;
END;
functioncountemp(vdnoinempl.dno%type)returnnumberis
emptotnumber;
begin
selectcount(*)intoemptotfromemplwheredno=vdno;
returnemptot;
end;
end;
/
Referencing a Package Subprogram
To access the procedure specified inside a package, then
use the packagenameassociated with the procedure name.
SQL>Execgenemp.increase2(105,10)
PL/SQL procedure successfully completed.
Toaccessthefunctionspecifiedinsideapackage,then
usethepackagenameassociatedwiththefunctionname.
SQL>Selectgenemp.countemp(101)fromdual;
PL/SQLproceduresuccessfullycompleted.
Deleting a Package
➢To delete the package then use the following
command
SQL>Droppackagepackagename
Ex:Droppackagegenemp;
➢To delete the package body then use the following
command
SQL>Droppackagebodypackagename
Ex:Droppackagebodygenemp;