Java Database Programming With Jdbc (1996).pdf
(
2711 KB
)
Pobierz
Java Database Programming with JDBC
Java Database Programming with JDBC
(Publisher: The Coriolis Group)
Author(s): Pratik Patel
ISBN: 1576100561
Publication Date: 10/01/96
Search this book:
Go!
Introduction
Chapter 1—JDBC: Databases The Java Way!
What Is The JDBC?
The JDBC Structure
ODBC’s Part In The JDBC
Summary
Chapter 2—SQL 101
The Relational Model And SQL
Understanding The Basics
Putting It Into Perspective: Schema And Catalog
Introducing Keys
Using Multiple Tables And Foreign Keys
Data Definition Language
Declaring Domains
Performing Checks
Creating Tables
Manipulating Tables
Data Maintenance Language
Data Query Language
Coming Up Next
Chapter 3—Using JDBC Drivers
Quick Start Guide
Installing java.sql.*
Registering And Calling JDBC Drivers
The sql.drivers Property
There’s Always A Class For A Name
Just Do It
JDBC URL And The Connection
Using ODBC Drivers
Installing The JDBC-ODBC Bridge
Setting Up ODBC Drivers
Summary
Chapter 4—The Interactive—SQL Applet
Your First JDBC Applet
The Blueprint
Getting A Handle On The JDBC Essentials: The
Complete Applet Source Code
The Look Of The Applet
Handling Events
Opening The Connection
No Guts, No Glory: Executing Queries And
Processing Results
Wrapping It Up
The HTML File That Calls The Applet
The Final Product
Coming Up Next
Chapter 5—Accessing ODBC Services Using
JDBC
Bridge Requirements
The Bridge Is Great, But...
The ODBC URL
JDBC To ODBC Calls: A Roadmap
Chapter 6—SQL Data Types In Java And ORM
Mapping SQL Data To Java
ResultSetMetaData
Understanding The Object Relation Model
Mapping A Table Into A Java Object
Summary
Chapter 7—Working With Query Results
A Basic Java Object For Storing Results
Showing The Results
Charting Your Data
Summary
Chapter 8—The IconStore Multimedia JDBC
Application
IconStore Requirements
Building The Database
Application Essentials
Writing The main Method
Establishing The Database Connection
Creating The Menu
Creating The Lists
Handling Events
Saving The Image
Summary
Chapter 9—Java And Database Security
Database Server Security
Rooting Out The Packet Sniffers
Web Server CGI Holes
Finding A Solution
Applet Security: Can I Trust You?
The Applet Security Manager
I’m A Certified Applet
Summary
Chapter 10—Writing Database Drivers
The JDBC Driver Project: SimpleText
SimpleText SQL Grammar
SimpleText File Format
The DriverManager
JDBC Exception Types
JDBC Data Types
Character Data: CHAR, VARCHAR, And
LONGVARCHAR
Exact Numeric Data: NUMERIC And DECIMAL
Binary Data: BINARY, VARBINARY, And
LONGVARBINARY
Boolean Data: BIT
Integer Data: TINYINT, SMALLINT, INTEGER, And
BIGINT
Floating-Point Data: REAL, FLOAT, And DOUBLE
Time Data: DATE, TIME, And TIMESTAMP
New Data Classes
Numeric
Date
Time
Timestamp
Native Drivers: You’re Not From Around Here, Are
Ya?
Implementing Interfaces
Tracing
Turning On Tracing
Writing Tracing Information
Checking For Tracing
Data Coercion
Escape Clauses
Date, Time, And Timestamp
Scalar Functions
LIKE Predicate Escape Characters
Outer Joins
Procedures
The JDBC Interfaces
Driver
Connection
DatabaseMetaData
Statement
PreparedStatement
ResultSet
ResultSetMetaData
Summary
Chapter 11—Internet Database Issues:
Middleware
Connectivity Issues Involved With Database
Access
Advantages Of Middleware
Disadvantages Of Middleware
The Application Server: A Complete Example With
Code
The Client: A Complete Example With Code
Summary
Chapter 12—The JDBC API
Classes
public class Date
public class DriverManager
public class DriverPropertyInfo
public final class Numeric
public class Time
public class TimeStamp
public class Types
Interfaces
public interface CallableStatement
public interface Connection
public interface DatabaseMetaData
public interface Driver
public interface PreparedStatement
public interface ResultSet
public interface ResultSetMetaData
public interface Statement
Exceptions
public class DataTruncation
public class SQLException
public class SQLWarning
Appendix A
Appendix B
Appendix C
Appendix D
Index
Chapter 1
JDBC: Databases The Java Way!
T
he Internet has spurred the invention of several new technologies in client/server
computing—the most recent of which is Java. Java is two-dimensional: It’s a
programming language and also a client/server system in which programs are
automatically downloaded and run on the local machine (instead of the server machine).
The wide embrace of Java has prompted its quick development. Java includes Java
compilers, interpreters, tools, libraries, and integrated development environments (IDEs).
Javasoft is leading the way in the development of libraries to extend the functionality and
usability of Java as a serious platform for creating applications. One of these libraries,
called Application Programming Interfaces (APIs), is the Java Database Connectivity
API, or JDBC. Its primary purpose is to intimately tie connectivity to databases with the
Java language.
We’ll discuss the reasoning behind the JDBC in this chapter, as well as the design of the
JDBC and its associated API. The Internet, or better yet, the technologies used in the
operation of the Internet, are tied into the design of the JDBC. The other dominant design
basis for the JDBC is the database standard known as SQL. Hence, the JDBC is a fusion
of three discrete computer areas: Java, Internet technology, and SQL. With the growing
implementation of these Internet technologies in “closed” networks, called
intranets
, the
time was right for the development of Java-based enterprise APIs. In this book, intranet
and Internet are both used to describe the software technology behind the network, such
as the World Wide Web.
What Is The JDBC?
As I mentioned a moment ago, JDBC stands for Java Database Connectivity. What is this
JDBC besides a nifty acronym? It refers to several things, depending on context:
•
It’s a specification for using data sources in Java
applets and applications.
Plik z chomika:
darekisap
Inne pliki z tego folderu:
APress - Beginning Java EE 5 - From Novice To Professional (2006).pdf
(18458 KB)
APress - Bluetooth For Java (2003).pdf
(3468 KB)
APress - Enterprise Java for SAP (2003).chm
(4241 KB)
APress - JDBC Recipes A Problem Solution Approach (2005)(1).pdf
(5361 KB)
APress - Java Collections (2001)(1).pdf
(1371 KB)
Inne foldery tego chomika:
156 database ebooks
Ajax
Apache & Tomcat
Apress
ASP.NET
Zgłoś jeśli
naruszono regulamin