Skip Headers

Oracle® Database Application Developer's Guide - Fundamentals
10g Release 1 (10.1)

Part Number B10795-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

14
Porting Non-Oracle Applications to Oracle Database 10g

Often, a programming project requires adapting existing code rather than writing new code. When that code comes from some other database platform, it is important to understand the Oracle Database features that are designed to make porting easy.

Topics include the following:

Performing Natural Joins and Inner Joins

When porting queries from other database systems to Oracle Database, you can code Oracle Database queries using ANSI-compliant notation for joins. For example:

SELECT * FROM a NATURAL JOIN b;
SELECT * FROM a JOIN b USING (c1);
SELECT * FROM a JOIN b USING (c1) WHERE c2 > 100;
SELECT * FROM a NATURAL JOIN b INNER JOIN c;

The standard notation makes the relations between the tables explicit, and saves you from coding equality tests for join conditions in the WHERE clause. Support for full outer joins also eliminates the need for complex workarounds to do those queries.

Because different vendors support varying amounts of standard join syntax, and some vendors introduce their own syntax extensions, you might still need to rewrite some join queries.

See Oracle Database SQL Reference for full syntax of the SELECT statement and the support for join notation.

Migrating a Schema and Data from Another Database System

Oracle provides a free product called the Oracle Migration Workbench that can convert a schema (including data, triggers, and stored procedures) from other database products to Oracle Database. Although the product runs on Windows, it can transfer data from databases on other operating systems to Oracle Database running on any operating system.

By using this product, you can avoid having to write your own applications to convert your legacy data when switching to Oracle Database. Related technology lets you convert certain kinds of source code, for example to migrate Visual Basic code to Java.

For the current set of supported databases, see the OTN Web site:

http://otn.oracle.com/

Performing Several Comparisons within a Query

When you want to choose from many different conditions within a query, you can use:

The CASE technique is more portable, and is preferable for new code.