Skip to main content

DBMS - PL/SQL

DBMS - PL/SQL

Introduction

PL/SQL stands for Procedural Language/Structured Query Language, which is provided by Oracle as a procedural extension to SQL. SQL is a declara- tive language. In SQL, the statements have no control to the program and can be executed in any order. PL/SQL, on the other hand, is a procedural language that makes up for all the missing elements in SQL. PL/SQL arose from the desire of programmers to have a language structure that was more familiar than SQL’s purely declarative nature.

Structure of PL/SQL


PL/SQL is a 4GL (fourth generation) programming language. It offers all fea-tures of advanced programming language such as portability, security, data encapsulation, information hiding, etc. A PL/SQL program may consist of more than one SQL statements, while execution of a PL/SQL program makes only one call to Oracle engine, thus it helps in reducing the database over heads. With PL/SQL, one can use the SQL statements together with the control structures (like if ...then) for data manipulation. Besides this, user can define his/her own error messages to display. Thus we can say that PL/SQL combines the data manipulation power of SQL with data processing power of procedural language.

PL/SQL is a block structured language. This means a PL/SQL program is made up of blocks, where block is a smallest piece of PL/SQL code having logically related statements and declarations. A block consists of three sections namely:

Declare, Begin, and Exception followed by an End statement.

Declare Section

Declare section declares the variables, constants, processes, functions, etc., to be used in the other parts of program. It is an optional section.

Begin Section

It is the executable section. It consists of a set of SQL and PL/SQL statements, which is executed when PL/SQL block runs. It is a compulsory section.

Exception Section

This section handles the errors, which occurs during execution of the PL/SQL block. This section allows the user to define his/her own error messages. This section executes only when an error occurs. It is an optional section.

End Section

This section indicates the end of PL/SQL block.

Every PL/SQL program must consist of at least one block, which may consist of any number of nested sub-blocks.

 Click here PL/SQL NOTES WITH EXAMPLES

Comments

Popular posts from this blog

COMMUNITY SERVICE PROJECT

  NATIONAL DEGREE COLLEGE::NANDYAL Introduction  Community Service Project is an experiential learning strategy that integrates meaningful community service with instruction, participation, learning and community development  Community Service Project involves students in community development and service activities and applies the experience to personal and academic development.  Community Service Project is meant to link the community with the college for mutual benefit. The community will be benefited with the focused contribution of the college students for the village/ local development. The college finds an opportunity to develop social sensibility and responsibility among students and also emerge as a socially responsible institution CSP HAND BOOK DOWNLOAD IT EVERYONE Guidelines from APSHE SAMPLE CSP PROJECTS done by the Students of National Degree College CHILD LABOUR AGRICULTURE PRODUCTS AND MARKETING USAGE OF MOBILE ONLINE PURCHAGE PLANTATION DIABETES WATER POLUTION U...

DATA STRUCTURES USING IN C

  DATA STRUCTURES  Data structures  are the fundamental building blocks of computer programming. They define how data is organized, stored, and manipulated within a program. Understanding data structures is very important for developing efficient and effective algorithms. In this material, we will explore the most commonly used data structures, including  arrays, linked lists, stacks, queues, trees, and graphs. What is Data Structure? A  data structure  is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently. A data structure is not only used for organizing the data. It is also used for processing, retrieving, and storing data. There are different basic and advanced types of data structures that are used in almost every program or software system that has been developed. So we must have good knowledge about data structures.  Classification of Data Structure: Li...