Most Popular

PL/SQL Cursors in Oracle Database 12c

How do you get data into your programs? Simple—select it from the database. This is the easiest way to use SQL in your program. Thus, inserting a line like the following will provide you with the capability to access data in the database: Let’s break down the statement and look at what it means to […]

Read More

Oracle 12c and the VARCHAR2 Data Type

VARCHAR2 is a variable-length alphanumeric data type. In PL/SQL, it may have a length up to 32,767 bytes. When you define the VARCHAR2 variable in the DECLARE section, remember to terminate the line with a semicolon (;). The following is the form of VARCHAR2 variable declarations: where MAX_LENGTH is a positive integer, as in You […]

Read More

Oracle Database 12c New Feature: Pluggable Databases

Pluggable databases are the new kid on the block, one of the newfangled features of 12c. According to the documentation, a pluggable database (PDB) is a portable collection of schemas, schema objects, and non-schema objects that appear to an Oracle Net client as a separate database. One or more PDBs together are called a container database […]

Read More

3 Key Features of Oracle Database 12c Architecture

This topic could fill an entire book, but for our purposes here, we’ll focus on the most important aspects. This article highlights concepts and provides a general overview of the players that deliver this proprietary database management system. These players fall into three main categories: Shared memory   A section of the host server’s memory through which all […]

Read More

Adding User-defined Functions In Oracle 12c Using WITH Clause

In the last few database versions, Oracle has consistently extended the functionality of the WITH clause. Oracle Database 12c introduces the capability to add user-defined functions and procedures directly to SQL statements instead of creating them as separate objects: The goal of this approach is to decrease the number of context switches between SQL and […]

Read More

SQL, PL/SQL and Oracle Development Best Practices

Understanding how SQL and PL/SQL work together is critical for good database system development. The conceptual differences between these languages are large, but they complement each other in a way that is unique in the industry. SQL does the “heavy lifting” of data retrieval, while PL/SQL handles the procedural logic. Together, they form the backbone […]

Read More

Performance Costs of Oracle Database Denormalization

Throughout the history of relational databases, the issue of denormalization has never been settled. Theoreticians still continue to argue about it, but from the practical point of view, most database systems are denormalized to some extent. For example, about 99.9 percent of address records in the United States have the ZIP code, city, and state […]

Read More

Dangers of Oracle Logical Primary Keys

Sometimes performance problems are initiated by requirements beyond the control of an average database developer. For example, in a number of front-end environments, you cannot use DMLs against a table or view if it does not have a primary key. With tables, that kind of problem is taken seriously and constraints are not added indiscriminately. […]

Read More

Mythbusting Oracle Dynamic SQL: It’s Not Always Slower

The biggest misconception that deters people from using Dynamic SQL is the idea that it will always be slower than regular SQL. Nobody questions the fact that if you compare the execution of a plain query with exactly the same query wrapped with EXECUTE IMMEDIATE, you will see some performance degradation. But this is not […]

Read More

Mythbusting Oracle Dynamic SQL: DDL Statements and DBAs

Too many DBAs insist that DDL commands should never be fired in a production environment. Therefore, they often try to prevent DDLs from happening by any means, whether technical or organizational. In addition to strict internal policies, the authors have encountered database-level triggers that limit the whole system to only basic DML operations. Of course, […]

Read More