Book description
In this book, Steven Feuerstein, widely recognized as one of the world's experts on the Oracle PL/SQL language, distills his many years of programming, writing, and teaching about PL/SQL into a set of PL/SQL language "best practices"--rules for writing code that is readable, maintainable, and efficient. Too often, developers focus on simply writing programs that run without errors--and ignore the impact of poorly written code upon both system performance and their ability (and their colleagues' ability) to maintain that code over time.Oracle PL/SQL Best Practices is a concise, easy-to-use reference to Feuerstein's recommendations for excellent PL/SQL coding. It answers the kinds of questions PL/SQL developers most frequently ask about their code:
- How should I format my code?
- What naming conventions, if any, should I use?
- How can I write my packages so they can be more easily maintained?
- What is the most efficient way to query information from the database?
- How can I get all the developers on my team to handle errors the same way?
Table of contents
- A Note Regarding Supplemental Files
- Dedication
- Preface
-
1. The Development Process
- DEV-01: Set standards and guidelines before writing any code.
- DEV-02: Ask for help after 30 minutes on a problem.
- DEV-03: Walk through each other’s code.
- DEV-04: Validate standards against source code in the database.
- DEV-05: Generate code whenever possible and appropriate.
- DEV-06: Set up and use formal unit testing procedures.
- DEV-07: Get independent testers for functional sign-off.
-
2. Coding Style and Conventions
- STYL-01: Adopt a consistent, readable format that is easy to maintain.
- STYL-02: Adopt logical, consistent naming conventions for modules and data structures.
- STYL-03: Standardize module and program headers.
- STYL-04: Tag module END statements with module names.
- STYL-05: Name procedures with verb phrases and functions with noun phrases.
- STYL-06: Self-document using block and loop labels.
- STYL-07: Express complex expressions unambiguously using parentheses.
- STYL-08: Use vertical code alignment to emphasize vertical relationships.
- STYL-09: Comment tersely with value-added information.
- STYL-10: Adopt meaningful naming conventions for source files.
- 3. Variables and Data Structures
- 4. Control Structures
- 5. Exception Handling
- 6. Writing SQL in PL/SQL
- 7. Program Construction
-
8. Package Construction
- PKG-01: Group related data structures and functionality together in a single package.
- PKG-02: Provide well-defined interfaces to business data and functional manipulation using packages.
- PKG-03: Freeze and build package specifications before implementing package bodies.
- PKG-04: Implement flexible, user-adjustable functionality using package state toggles and related techniques.
- PKG-05: Build trace “windows” into your packages using standardized programs.
- PKG-06: Use package body persistent data structures to cache and optimize data-driven processing.
- PKG-07: Insulate applications from Oracle version sensitivity using version-specific implementations.
- PKG-08: Avoid bloating package code with unnecessary but easy-to-build modules.
- PKG-09: Simplify and encourage module usage using overloading to widen calling options.
- PKG-10: Consolidate the implementation of related overloaded modules.
- PKG-11: Separate package specifications and bodies into different source code files.
- PKG-12: Use a standard format for packages that include comment headers for each type of element defined in the package.
- 9. Built-in Packages
- A. Best Practices Quick Reference
- About the Author
- Colophon
- Copyright
Product information
- Title: Oracle PL/SQL Best Practices
- Author(s):
- Release date: April 2001
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596001216
You might also like
book
Python Crash Course, 2nd Edition
This is the second edition of the best selling Python book in the world. Python Crash …
book
Oracle Developer Forms Techniques
Oracle Developer Forms Techniques describes the concepts and techniques needed to build Web-enabled applications with Forms. …
book
Python Crash Course, 3rd Edition
Python Crash Course is the world's best-selling guide to the Python guide programming language, with over …
book
Oracle Internals
If you are a typical Oracle professional, you don't have the luxury of time to keep …