Book Image

Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition

By : Saurabh K. Gupta
Book Image

Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition

By: Saurabh K. Gupta

Overview of this book

Oracle Database is one of the most popular databases and allows users to make efficient use of their resources and to enhance service levels while reducing the IT costs incurred. Oracle Database is sometimes compared with Microsoft SQL Server, however, Oracle Database clearly supersedes SQL server in terms of high availability and addressing planned and unplanned downtime. Oracle PL/SQL provides a rich platform for application developers to code and build scalable database applications and introduces multiple new features and enhancements to improve development experience. Advanced Oracle PL/SQL Developer's Guide, Second Edition is a handy technical reference for seasoned professionals in the database development space. This book starts with a refresher of fundamental concepts of PL/SQL, such as anonymous block, subprograms, and exceptions, and prepares you for the upcoming advanced concepts. The next chapter introduces you to the new features of Oracle Database 12c, not limited to PL/SQL. In this chapter, you will understand some of the most talked about features such as Multitenant and Database In-Memory. Moving forward, each chapter introduces advanced concepts with the help of demonstrations, and provides you with the latest update from Oracle Database 12c context. This helps you to visualize the pre- and post-applications of a feature over the database releases. By the end of this book, you will have become an expert in PL/SQL programming and will be able to implement advanced concepts of PL/SQL for efficient management of Oracle Database.
Table of Contents (19 chapters)
Advanced Oracle PL/SQL Developer's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Nested tables


A nested table is a persistent SQL collection that is used as a list to hold elements of the same data type. It can also be created in the database and defined in a PL/SQL program. It is an unbounded collection and the user doesn't have to maintain the cell index. Oracle automatically assigns the cell index as 1 to the first cell and moves onwards incrementally. A nested table collection type initially starts off as a dense collection but it becomes sparse due to delete operations.

Note

A dense collection refers to a collection that is tightly populated which means no empty cells between the lower and upper indexes of the collection. A dense collection may become sparse by performing delete operations.

When a nested table is created as a schema object in the database, it can be referenced in a PL/SQL block as a variable parameter. A column of nested table types can be included in a table. An attribute of nested table types can exist in an object type. In a database schema, a nested...