You can now write cursors within a PL/SQL block. You have learned about implicit and explicit cursors that help you build the program logic. In this module, you also discovered the different attributes of a cursor.
In this module, you learned how to:
- Define a cursor
- Review implicit and explicit cursors
- Define the basic structure of a cursor block
- Build a cursor block
- Use a cursor
FOR loop to process records
In this module, you were introduced to the following glossary terms:
- Context area:Oracle creates a memory area, known as the context area, for processing an SQL statement, which contains all the information needed for processing the statement. For example, the number of rows processed. A cursor is a pointer to this context area. The set of rows the cursor holds is referred to as the active set.
- Cursor: A cursor is a server-side mechanism by which you can name that context area and manipulate information within it. The SQL in a cursor can be static or dynamic.
- Data warehouse:In computing, a data warehouse , also known as an enterprise data warehouse (EDW), is a system used for reporting and data analysis, and is considered a core component of business intelligence.
- Exception: The term exception means exceptional condition and is an occurrence that alters the normal program flow. Many factors can lead to exceptions.
- Legacy System
- (PGA) program global area: The PGA is a memory buffer that contains data, process information, session information, and cursors for a server process.
- Package: A package is a schema object that groups logically related PL/SQL types, variables, and subprograms. Packages usually have two parts, a specification (spec) and a body; sometimes the body is unnecessary. The specification is the interface to the package.
It declares the types, variables, constants, exceptions, cursors, and subprograms that can be referenced from outside the package. The body defines the queries for the cursors and the code for the subprograms.
- Virtual table: A virtual table is an object that presents an SQL table interface but which is not stored in the database file, at least not directly.
In the next module, you will learn how to handle exceptions.