Introduction to PL-SQL and Environment setup

Last updated on Sep 27 2021
Nitin Bajabalkar

Table of Contents

Introduction to PL-SQL and Environment setup

The PL/SQL programing language was developed by Oracle Corporation within the late 1980s as procedural extension language for SQL and therefore the Oracle electronic database. Following are certain notable facts about PL/SQL −
• PL/SQL may be a completely portable, high-performance transaction-processing language.
• PL/SQL provides a built-in, interpreted and OS independent programming environment.
• PL/SQL also can directly be called from the command-line SQL*Plus interface.
• Direct call also can be made up of external programing language calls to database.
• PL/SQL’s general syntax is predicated thereon of ADA and Pascal programing language .
• Apart from Oracle, PL/SQL is out there in TimesTen in-memory database and IBM DB2.
Features of PL/SQL
PL/SQL has the subsequent features −
• PL/SQL is tightly integrated with SQL.
• It offers extensive error checking.
• It offers numerous data types.
• It offers a spread of programming structures.
• It supports structured programming through functions and procedures.
• It supports object-oriented programming.
• It supports the event of web applications and server pages.
Advantages of PL/SQL
PL/SQL has the subsequent advantages −
• SQL is that the standard database language and PL/SQL is strongly integrated with SQL. PL/SQL supports both static and dynamic SQL. Static SQL supports DML operations and transaction control from PL/SQL block. In Dynamic SQL, SQL allows embedding DDL statements in PL/SQL blocks.
• PL/SQL allows sending a whole block of statements to the database at just one occasion . This reduces network traffic and provides high performance for the applications.
• PL/SQL gives high productivity to programmers because it can query, transform, and update data during a database.
• PL/SQL saves time on design and debugging by strong features, like exception handling, encapsulation, data hiding, and object-oriented data types.
• Applications written in PL/SQL are fully portable.
• PL/SQL provides high security level.
• PL/SQL provides access to predefined SQL packages.
• PL/SQL provides support for Object-Oriented Programming.
• PL/SQL provides support for developing Web Applications and Server Pages.
PL/SQL – Environment Setup
In this blog, we’ll discuss the Environment Setup of PL/SQL. PL/SQL isn’t a standalone programming language; it’s a tool within the Oracle programming environment. SQL* Plus is an interactive tool that permits you to type SQL and PL/SQL statements at the prompt. These commands are then sent to the database for processing. Once the statements are processed, the results are sent back and displayed on screen.
To run PL/SQL programs, you ought to have the Oracle RDBMS Server installed in your machine. this may look out of the execution of the SQL commands. the foremost recent version of Oracle RDBMS is 11g. you’ll download an attempt version of Oracle 11g from the subsequent link −
Download Oracle 11g Express Edition
You will need to download either the 32-bit or the 64-bit version of the installation as per your OS. Usually there are two files. we’ve downloaded the 64-bit version. you’ll also use similar steps on your OS, doesn’t matter if it’s Linux or Solaris.
• win64_11gR2_database_1of2.zip
• win64_11gR2_database_2of2.zip
After downloading the above two files, you’ll got to unzip them during a single directory database and thereunder you’ll find the subsequent sub-directories −

sql
sql

Step 1
Let us now launch the Oracle Database Installer using the setup file. Following is that the first screen. you’ll provide your email ID and check the checkbox as shown within the following screenshot. Click subsequent button.

sql 1
sql

Step 2
You will be directed to the subsequent screen; uncheck the checkbox and click on the Continue button to proceed.

sql 2
sql

Step 3
Just select the primary option Create and Configure Database using the radio button and click on subsequent button to proceed.

sql 3
sql

Step 4
We assume you’re installing Oracle for the essential purpose of learning which you’re installing it on your PC or Laptop. Thus, select the Desktop Class option and click on subsequent button to proceed.

sql 4
sql

Step 5
Provide a location, where you’ll install the Oracle Server. Just modify the Oracle Base and therefore the other locations will set automatically. you’ll even have to supply a password; this may be employed by the system DBA. Once you provide the specified information, click subsequent button to proceed.

sql 5
sql

Step 6
Again, click subsequent button to proceed.

sql 6
sql

Step 7
Click the Finish button to proceed; this may start the particular server installation.

sql 7
sql

Step 8
This will take a couple of moments, until Oracle starts performing the specified configuration.

sql 8
sql

Step 9
Here, Oracle installation will copy the specified configuration files. this could take a flash −

sql 9
sql

Step 10
Once the database files are copied, you’ll have the subsequent dialogue box. Just click the OK button and are available out.

sql 10
sql

Step 11
Upon installation, you’ll have the subsequent final window.

sql 11
sql

Final Step
It is now time to verify your installation. At the prompt , use the subsequent command if you’re using Windows −
sqlplus “/ as sysdba”
You should have the SQL prompt where you’ll write your PL/SQL commands and scripts −

sql 12
sql

Text Editor
Running large programs from the prompt may land you in inadvertently losing a number of the work. it’s always recommended to use the command files. To use the command files −
• Type your code during a text editor, like Notepad, Notepad+, or EditPlus, etc.
• Save the file with the .sql extension within the home directory.
• Launch the SQL*Plus prompt from the directory where you created your PL/SQL file.
• Type @file_name at the SQL*Plus prompt to execute your program.
If you’re not employing a file to execute the PL/SQL scripts, then simply copy your PL/SQL code and right-click on the black window that displays the SQL prompt; use the paste choice to paste the entire code at the prompt. Finally, just press Enter to execute the code, if it’s not already executed.
So, this brings us to the end of blog. This Tecklearn ‘Introduction to PL-SQL and Environment setup’ blog helps you with commonly asked questions if you are looking out for a job in Oracle Pl-SQL. If you wish to learn Oracle PL-SQL and build a career in Database domain, then check out our interactive, Oracle PL-SQL Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

Oracle PL SQL Training

Oracle PL-SQL Training

About the Course

Oracle PL/SQL online training course provides you the complete skills needed to create, implement and manage robust database applications using the Oracle Database tools. Our expert instructors will help you to master PL SQL advanced features, from performance to maintainability to the application code architecture. Our best online classes will help you to gain a precise knowledge of PL SQL language, architecture, interactions with the SQL engine, data types, and much more. The entire training is in line with the Oracle PL/SQL certification.

Why Should you take Oracle PL-SQL Training?

• The Average salary of a Senior Oracle PL-SQL Developer is $131,878 per annum – ZipRecuiter.com
• PL-SQL has a market share of 23% globally.
• IBM, TCS, Tech Mahindra, Oracle, Wipro & other MNCs worldwide use Pl-SQL for their database deployments.

What you will Learn in this Course?

Introduction to Oracle SQL
• Database Models
• RDBMS
• Components of SQL
• DataTypes
• DDL-Create, Alter, Rename, Drop, Truncate
Manipulating Data using SQL
• Constraints –Unique, Not Null, Primary Key, Check Constraint, Foreign Key
• DML Commands-Insert, Update, Delete
• Order by Clause
• Group Functions
• SET Operators- Union All, Union, Intersect, Minus
• TCL Commands-Commit, RollBack, Savepoint
Oracle Views and Synonyms
• Types of Views
• Synonyms
• Types of Synonyms
• Indexes
• Types of Indexes
Using Subqueries to Solve Queries
• Subqueries
• Co-Related Subquery
OLAP Functions
• OLAP Features
• Roll Up
• Model Clause
• Dimension Modelling
Conditional Statement
• Block
• Variable Attributes
• Nested Blocks
• Conditional Control Statements
• Iterative Controls (Loop)
Cursor Management
• Types of Cursor
• Writing Explicit cursors
• Explicit cursor functions
• Advance Explicit cursor
• Cursor with parameters
Exception Handling
• Handling Exception
• Handling Exception with PL/SQL Predefined Exceptions,
• User Defined Exceptions
• Non-Predefined Error
• Function for trapping Exception
• Trapping user-defined Exception
Subprogram, Procedure and passing parameters and Advance Package Concepts and functions
• Important Features of Sub-Programs
• Procedure
• Functions
Trigger Management
• Introduction to Triggers
• Types of Triggers
• Compound Triggers
Oracle Job Scheduling
Large Object Functions
• Large object functions – BFILENAME, EMPTY_BLOB, EMPTY_CLOB etc
Important Features of Oracle
Advance level- Scripting

 

0 responses on "Introduction to PL-SQL and Environment setup"

Leave a Message

Your email address will not be published. Required fields are marked *