You are on page 1of 21

Advanced Java Programming

with Database Application


Data are facts concerning
people, places, events or
other objects or concepts.
Information is data that
have been processed and
refined and then given
in the format that is
convenient for decision

making
or
other
organizational
activities.
Data Base concepts
A database is a shared
collection of interrelated data
designed to meet the varied
information needs of an
organization.

BUILDING BLOCKS OF A

DATABASE

COLUMNS- columns are similar to fields that


is individuals items of data that we wish to
store
ROWS rows are similar to records as they
contain data of multiple columns
TABLES table is a logical group of columns

CHARACTERISTICS OF
DATABASE
Organized / related
Shared
Permanent or persistent
Validity / integrity / correctness
Security
Consistency
Non redundancy
Independence
Easily Recoverable
Flexible to change

Benefits of the
Database
approach

Minimum data redundancy


With the data base approach, previously
separate data files are integrated into a
single, logical structure. So each item is
ideally
recorded in only one place in the database.
Hence in a data base system, the data
redundancy is controlled.

Consistency of data
By eliminating data redundancy,
the consistency of data has greatly
improved. If any change in the
data, it can be
incorporated in one place than
the traditional file system.

Integration of data
In a database, data are
organized into a single, logical
structure, with logical
relationships defined between
associated data entities.

Sharing of data
The database is intended to be
shared by all authorized
users in the
organization. Since all the
data are integrated.
Data base Project
Development

Analysis
A CONCEPTUAL DATA MODEL describing the information
which is used inside the
organization but not in computer-related terms. The
conceptual data model provides a context within which more
detailed design specifications can be
produced, and should help in maintaining consistency from one
application
area to another. A CONCEPTUAL PROCESS MODEL describing
the functions of
the organization in terms of events (e.g. a purchase, a
payment, a booking)
and the processes which must be performed within the
organization to
handle them. This may lead to a more detailed functional
specification describing the organizational requirements
which must be satisfied, but not how they are to be achieved.

Design
A LOGICAL DATA MODEL is a description of the data
to be stored in the database, using the
conventions prescribed by the
particular DBMS to be used. This is sometimes
referred to as a
SCHEMA and some DBMS also give facilities for
defining SUBSCHEMA or partitions of the overall
schema. A SYSTEM
SPECIFICATION, describing in some detail what the
proposed system should do. This will now refer to
COMPUTER PROCESSES, but probably in terms of
INPUT and OUTPUT MESSAGES rather than internal
logic.

Development
This is the actual coding phase. Specification of the database
itself must now come down another level, to decisions about
PHYSICAL DATA STORAGE in
particular files on particular devices, etc. Conventional
program development
- coding, testing, debugging etc. may also be done. It will
simply be a matter
of discovering how to use the command and query language
already supplied to store and retrieve data, generate reports
and other outputs. Even here an element of testing and
debugging may be involved, since it is unlikely that the new
user of a system will get it exactly right the first time.

Implementation
This puts the work of the previous three
phases into everyday use of the endures. It

involves such things as loading the database


with live rather than test data, staff training,
probably the introduction of new working
practices.
Maintenance
Systems once implemented generally require further work
done on them as time goes by, either to correct original
design faults or to accommodate
changes in user requirements or in the system level. One of
the objectives of
using a DBMS is to reduce the impact of such changes - for
example the data can be physically re-arranged without
affecting the logic of the programs
which use it. Some DBMS provide utility programs to reorganize the data when either its physical or logical design
must be altered.

JDBC Introduction

The JDBC API is a Java API that can


access any kind of tabular data,
especially data stored in a Relational
Database.
JDBC helps you to write Java applications that
manage these three programming activities:
Connect to a data source, like a database
Send queries and update statements to the
database
Retrieve and process the results received from the
database in answer to your query

JDBC Product FOUR


Components
The JDBC API The JDBC API
provides programmatic access to
relational data from the Java
programming language. Using the
JDBC API, applications can execute
SQL statements, retrieve results, and
propagate changes back to an
underlying data source.

JDBC Product FOUR


Components
JDBC Driver Manager The
JDBC DriverManager class defines
objects which can connect Java
applications to a JDBC driver.
DriverManager has traditionally been
the backbone of the JDBC architecture.
It is quite small and simple.

JDBC Product FOUR


Components
JDBC Test Suite The JDBC driver
test suite helps you to determine
that JDBC drivers will run your
program. These tests are not
comprehensive or exhaustive, but
they do exercise many of the
important features in the JDBC API.

JDBC Product FOUR


Components
JDBC-ODBC Bridge The Java
Software bridge provides JDBC
access via ODBC drivers. Note that
you need to load ODBC binary code
onto each client machine that uses
this driver. As a result, the ODBC
driver is most appropriate on a
corporate network where client
installations are not a major problem,

or for application server code written


in Java in a three-tier architecture.

JDBC CLASSES
TYPE

CLASS / INTERFACE

Driver Management

Java.sql.Driver
Java.sql.DriverManager

Establishing connections

Java.sql.Connection

Processing Statements

Java.sql.Statement

Handling result sets

Java.sql.ResultSet

SQL BASIC QUERY


COMMANDS

You might also like