Book Image

Oracle SQL Developer 2.1

By : Susan Harper
Book Image

Oracle SQL Developer 2.1

By: Susan Harper

Overview of this book

As technology rapidly evolves, many developers are looking for valuable tools to assist them with their daily tasks. When dealing with databases, a clean, easy-to-navigate interface for working and browsing is essential. Oracle SQL Developer is a graphical user interface that makes life much easier by allowing you to browse database objects, run SQL statements and scripts, and create, edit, and debug PL/SQL statements in the most efficient way. It enhances productivity and simplifies your database development tasks. Although the SQL Developer journey looks simple and easy, there are many areas that can go undiscovered, leaving you just scratching the surface. It's easy to get started and master this powerful tool with this book to hand. It will provide you with in-depth details about all aspects of using SQL Developer to assist you in your day-to-day database tasks and activities. You will learn to utilize SQL Developer's extensible environment to support your ongoing needs This book offers detailed instructions for installing, configuring, and effectively using Oracle SQL Developer. You will learn how to utilize every feature of this development tool and make the most out of it. While none of the tasks are complex, the book progresses from the easy, most commonly used features, such as browsing objects and writing queries in the SQL Worksheet, to the more involved and possibly less frequently used features, such as Tuning and Testing SQL and PL/SQL, and adding User Extensions, and finally to those features used by a smaller more targeted audience, such as Migrations, Oracle APEX, and the Data Modeler. Throughout the book there are tips and suggestions gathered as a result of working with the current SQL Developer user base. This book will also show you how to assess the health of your database with built-in as well as customized reports. By the end of the book you will be confident in making the best use of SQL Developer, and be able to set up and maintain a productive environment for quick and easy database development.
Table of Contents (19 chapters)
Oracle SQL Developer 2.1
Credits
About the Author
Acknowledgement
About the Reviewers
Preface
12
Working with Application Express

Editing code


The utilities discussed in this section can once again be used in either the SQL Worksheet or the Code editor. While all are not necessarily confined to PL/SQL, such as the Find DB Object search utility, it is useful to discuss them here.

Refactoring code

Refactoring code is the process of redesigning the code to restructure it or improve the performance, without impacting the resulting behavior. SQL Developer 2.1 supports a number of refactoring options, which include:

  • Surrounding the code with the following PL/SQL constructs

    • FOR loop

    • WHILE loop

    • PL/SQL block

  • Extracting a procedure

  • Renaming a local variable

Some of these can assist you while writing your code, such as Surround with…, and so are as much about being productive as they are about refactoring. One feature that is useful when refactoring is Extract Procedure….

When you are creating PL/SQL code, it is often recommended that you create chunks of code that you can call from another program unit. This introduces reusability...