Database Design

The design of an overall database system, including the choice of data structures, identifying data relationships and defining models on the basis of these relationships.

Thumbnail image for Conditional Unique Index on Multiple Columns

Conditional Unique Index on Multiple Columns

Oracle’s function-based indexes can be used to build conditional uniqueness on table columns. Here’s a working example of a conditional unique index on multiple columns.

Read the Full Article →
Thumbnail image for Unique Constraint vs Unique Index in Oracle

Unique Constraint vs Unique Index in Oracle

Unique constraints and unique indexes, on the surface, seem very alike. Dig deeper, and you will see that they differ. Let’s see how.

Read the Full Article →
JSON in the database

Storing JSON Data in Oracle: Why and How

Storing JSON data in Oracle has been made easy in version 12c. A demo of how JSON can be stored in Oracle and validated using the IS JSON check.

Read the Full Article →
DBMS_REDEFINITION for online table redefinition

DBMS_REDEFINITION: Convert Non-Partitioned Table to Partitioned [pre 12.2]

Partitioning a non-partitioned table in an Oracle pre-12.2 database, using DBMS_REDEFINITION built-in methods. Scripts and demo.

Read the Full Article →
Thumbnail image for In Which Package Is This Procedure Placed?

In Which Package Is This Procedure Placed?

Given that a stored procedure (whose name you know) sits in *some* PL/SQL package in the database, how will you find out the package in which the procedure is placed?

Read the Full Article →
Thumbnail image for Storing XML Data in Oracle: Binary XML, Object-Relational, CLOB

Storing XML Data in Oracle: Binary XML, Object-Relational, CLOB

Binary XML, object-relational, or CLOB? An overview of approaches for storing XML data in Oracle to best fit the nature of the data and its expected use.

Read the Full Article →
Convert VARCHAR2 to DATE

DATE Format SQL for Dates Stored as Strings

Convert VARCHAR2 to DATE with appropriate format masks, for comparing two dates stored as strings with different DATE formats in the database.

Read the Full Article →
Thumbnail image for Oracle Partitioning: Range Interval Partitioning

Oracle Partitioning: Range Interval Partitioning

Create Oracle table partitions on-the-fly using range interval partitioning, a beautiful Oracle partitioning feature that obviates the need to pre-create database table partitions.

Read the Full Article →
Thumbnail image for Oracle Total Recall for Tracking History

Oracle Total Recall for Tracking History

Most applications need an audit trail or history of changes for important entities in the database. This requirement is easily implemented with Oracle Total Recall, a tool that tracks all transactional changes to a table.

Read the Full Article →
Thumbnail image for 10 Important Lessons in Data Modeling

10 Important Lessons in Data Modeling

Follow these ten data modeling guidelines to make sure that your application database design is accurate, usable and scalable.

Read the Full Article →