1. Trang chủ
  2. » Công Nghệ Thông Tin

apress jdbc metadata mysql and oracle recipes a problem solution approach mar.2006

504 402 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 504
Dung lượng 6,34 MB

Nội dung

[...]... data and metadata stored and manipulated in relational database systems (RDBMSs) Note that each RDBMS has a lot of metadata, and JDBC maps some of those metadata in a uniform and consistent fashion by its API ■ Note In using the word metadata, we must use the exact term when it is a Java API (since Java is a casesensitive language)—for example, DatabaseMetaData, RowSetMetaData, and ResultSetMetaData—but... The main focus of this book is to show how to use database metadata (DatabaseMetaData) and result set metadata (ResultSetMetaData) by JDBC API All of the JDBC s metadata is discussed, and I have provided lots of examples for MySQL and Oracle databases You may use all of these metadata recipes freely (no copyrights attached to these recipes! ) This book focuses on the JDBC metadata API for database application... cut and paste solutions from this book to build your own database metadata applications All the solutions have been compiled and tested against two leading databases: MySQL and Oracle This book is ideal for anyone who knows some Java (can read/write basic Java programs) and some JDBC (can read/write basic queries using JDBC and SQL) and wants to learn more about database and result set metadata Each... a standard API for accessing enterprise data in relational databases (such as Oracle, MySQL, Sybase, PostgreSQL, and DB2) using SQL (Structured Query Language) In this chapter, we will examine the basic aspects of JDBC, and save the details about JDBC metadata for upcoming chapters Data and metadata (data about data/information) are at the heart of most business applications, and JDBC deals with data... efficiently JDBC consists of classes in the package java.sql and some JDBC extensions in the package javax.sql Both of these packages are included in the Java 2 Standard Edition (J2SE) version 1.5 (which covers JDBC 3.0) On the other hand, JDBC metadata (data about data) deals with database metadata and result set metadata Using JDBC s metadata API, you should be able to answer the following questions: • What... assume you already know the basics of Java, JDBC, SQL, and object-oriented programming What Is the Structure of This Book? This book is filled with database metadata recipes: it asks real metadata questions and provides real, compiled working answers You can use Java /JDBC to access many kinds of database metadata (such as database table types and tables/columns names) for relational database management systems... illustrate the overall concepts related to creating and accessing data in a database Here, we assume that a database (MySQL or Oracle) is created and available for use Database creation is DBMS-specific This means that each vendor has a specific set of commands for 6374_c01_final.qxd 1/27/06 12:41 PM Page 5 CHAPTER 1 ■ WHAT IS JDBC PROGRAMMING? creating a database For this obvious reason, database creation... the database server This package has a set of classes and interfaces (such as DatabaseMetaData and ResultSetMetaData) that deal with database metadata, which will be one of the focuses of this book • javax.sql provides the API for server-side data source access According to the Java Development Kit (JDK) documentation, “This package supplements the java.sql package and, as of the version 1.4 release,... interact with one or more relational databases (such as Oracle and MySQL) without knowing about the underlying JDBC driver implementations Figure 1-2 illustrates the core JDBC classes and interfaces that interact with Java and JDBC applications This figure also shows the basic relationships of the DatabaseMetaData and ResultSetMetaData interfaces with other JDBC objects Figure 1-2 Using JDBC database metadata. .. remains an essential part of the Java 2 SDK, Enterprise Edition (J2EE).” This package provides services for J2EE (such as DataSource and RowSets) Also, the package has a set of classes and interfaces (such as RowSetMetaData) that deal with row set metadata In this book we focus on the metadata components of this package In a nutshell, JDBC is a database-independent API for accessing a relational database . class="bi x0 y0 w0 h0" alt="" Mahmoud Parsian JDBC Metadata, MySQL, and Oracle Recipes A Problem- Solution Approach 6374_FM_final.qxd 1/27/06 12:38 PM Page i JDBC Metadata, MySQL, and Oracle Recipes: . set metadata (ResultSetMetaData) by JDBC API. All of the JDBC s metadata is discussed, and I have provided lots of examples for MySQL and Oracle databases. You may use all of these metadata recipes. database metadata (data about data) or annotation-based code recipes for JDBC API for use with Oracle and MySQL. The book provides complete and working solu- tions for performing database metadata

Ngày đăng: 07/04/2014, 15:46

TỪ KHÓA LIÊN QUAN