Table of Contents
Achieving PL/SQL Excellence
The BIG Picture
An EvenBIGGER Picture
Code in Layers
The Usual Layers: AKA, The OOBLECK Method
Optimal Layering:The Iceberg Method
Why/When I Layer
Dealing with TO_DATE
Empowering Users with Smarter Software
Build Generic Solutions
Encapsulate Logic
A Different SUBSTR
Thou Shalt Not Repeat Thyself
Avoid All Kinds of Hard-Coding
A Magic Values Package
Impact of theConfig Package
Flexible Software with Anchored Declarations
Different Layers and Types of Anchoring
Benefits of Anchoring
Consolidate Your SQL
Advantages of Consolidated SQL
A Packaged Interface to Your Data
Embed PL/SQL Functions in SQL
Simple Example
Where/How to Leverage Embedded PL/SQL
Combining Scalars and Aggregates in SQL
The PL/SQL-based Solution
Reduce Code Volume
Use Cursor FOR Loops
Code Savings with Cursor FOR Loop
Streamline Code with PL/SQL Records
Use Cursor Records
Use Local Modules
Benefits of Local Modules
Avoid Redundancy with Local Modules
Local Modules Consolidates Logic
Local ModulesDrive Top-Down Design
Streamline Decision-Making
Pick a Coding Style
Decision-making for Cursors in PL/SQL
Applying Best Practices
|