Preface

Databases are unavoidable. That's probably the most important lesson I've learned in all my years as a programmer. I never explicitly sought out database-related development work at first; it always seemed to find me. I tried to pursue other technologies and avoid databases, but because of personal and general technological circumstances, was never entirely successful. Finally, I've learned it's best to accept database programming and enjoy it. I'm much happier now.

I was fortunate in that my introduction to databases was gradual as they were introduced slowly into companies and organizations. At the same time, the database programs for personal computers grew in sophistication. Now, standard relational database systems are ubiquitous, and a gradual introduction to their use is no longer a commonly available luxury. If you are a programmer, your programs will likely need to interact with a database sooner or later, but don't worry while databases may be unavoidable, they can also be fun.

It's easy to become overwhelmed when first confronting database programming. First comes the culture shock of entering a well-established, densely populated realm with a distinct culture. The native language, SQL a non-procedural language is entirely alien.

Next comes the shock of realizing, that for any given task, there are at least three distinctly different approaches to accomplishing the task. Advice is easy to come by, but for every confident, well-supported, and well-argued opinion championing each approach, there is an equally confident, well-supported, and well-argued opinion denouncing it.

The answer to culture shock is acclimation: become acquainted with the lay of the land, the local ways, and the language. That is the purpose of the first half of this book: to provide a gentle but serviceable introduction to database design and SQL.

As for the shocks of choice and contradiction that arise from so many available solutions, there is no ready remedy. It is entirely possible for contradictory points of view to be valid, because underlying each conclusion is a unique set of premises, assumptions, priorities, and criteria. The second half of this book presents every major approach to using Java in database programming, outlines the strengths and weaknesses of each approach, and provides a primer for each.

For every point presented, an example is shown. In some cases, such as matters of syntax, this may be nothing but a code snippet. In other cases, demonstrating the use of a particular technology or technique, this may be a complete program. This fulfills two goals: First, providing a working example as a starting point makes learning easier and gives you something to incorporate into your own code. Second, the examples allow you to compare first hand the different approaches.

Throughout, I stress the standards-based, open-source, cross-platform approach that Java encourages. You may therefore justifiably question why this book concentrates solely on Oracle. The answer is that, unfortunately, the standards for relational databases, in particular the SQL standards, are weak. No major database is fully compliant with SQL and all require you to use proprietary extensions in one way or another. Trying to write a book about Java database programming that considered all popular databases would either need to be limited to isolated topics such as JDBC or would require numerous digressions covering the idiosyncrasies of each database.

Choosing to limit myself to Oracle is a practical matter but making it clear throughout what is a proprietary and what is a standard feature is, I believe, a fair compromise. To use quasi-object-oriented terms, you might think of database programming as an abstraction and Oracle database programming as an instantiation of that abstraction.

There are a number of reasons for choosing Oracle over other databases a choice I justify a bit more in Chapter 1 but free, easy availability is a very immediate and practical one for developers seeking to learn database programming. All Oracle software and their documentation are freely available for download on the Internet (or on CD for minimal cost) for evaluation and non-commercial development purposes.



Java Oracle Database Development
Java Oracle Database Development
ISBN: 0130462187
EAN: 2147483647
Year: 2002
Pages: 71

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net