Book Image

Oracle Advanced PL/SQL Developer Professional Guide

By : Saurabh K. Gupta
Book Image

Oracle Advanced PL/SQL Developer Professional Guide

By: Saurabh K. Gupta

Overview of this book

PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension language for SQL and the Oracle relational database. Server-side PL/SQL is stored and compiled in the Oracle Database and runs within the Oracle executable. With this guide Oracle developers can work towards accomplishing Oracle 11g Advanced PL/SQL Professional certification, which is the second milestone for developers working at the Associate level. The Oracle Advanced PL/SQL Developer Professional Guide helps you master advanced PL/SQL concepts. Besides the clear and precise explanation on advanced topics, it also contains example code and demonstrations, which gives a sense of application and usage to readers.The book gives a deep insight that will help transform readers from mid-level programmers to professional database developers. It aims to cover the advanced features of PL/SQL for designing and optimizing PL/SQL code.This book starts with an overview of PL/SQL as the programming database language and outlines the benefits and characteristics of the language. The book then covers the advanced features that include PL/SQL code writing using collections, tuning recommendations using result caching, implementing VPD to enforce row level security, and much more. Apart from programming, the book also dives deep into the usage of the development tool SQL Developer, employing best practices in database environments and safeguarding the vulnerable areas in PL/SQL code to avoid code injection.
Table of Contents (22 chapters)
Oracle Advanced PL/SQL Developer Professional Guide
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 1, Overview of PL/SQL Programming Concepts


Question No.

Answer

Explanation

1

c

Currently, SQL Developer doesn't provide backup and recovery features. However, it can be done using a regular database export from SQL Developer.

2

a, c, and d

A function can be called from a SQL expression only if it doesn't hinder the database state and purity level.

3

a

The ALL_DEPENDENCIES dictionary view has been filtered by REFERENCED_TYPE and REFERENCED_OWNER for SYS owned tables and views.

4

c

The local variables are local to the block only. They cannot be referred outside their native PL/SQL block.

5

a, b, and d

An exception variable cannot be simply declared and used with RAISE_APPLICATION_ERROR. It has to be mapped to a self defined error number using PRAGMA EXCEPTION_INIT, and then raised through RAISE_APPLICATION_ERROR with an exception message.

6

a and b

A function must return a value using the RETURN statement while a procedure might return a value through the OUT parameters.

Standalone subprograms (functions and procedures) cannot be overloaded. Only the subprograms declared in a package can be overloaded.

Both procedures and functions can accept parameters in either of the two modes— pass by value and pass by reference.

7

c

For implicit cursors, the %FOUND attribute is set to TRUE, if the SQL statement fetches a minimum of one record.