














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of database system concepts, focusing on jdbc and gui development. It covers topics such as application architectures, database connectivity, odbc, jdbc, and sql with java. The document also discusses the role of java communication with a web server and servlets in handling complex applications.
Typology: Study notes
1 / 54
This page cannot be seen from the preview
Don't miss anything!















































By
ļ® (^) The software to be designed & developed will control a Simulated Automated Teller Machine (ATM) having;
interaction with the customer,
multiples of Rs.100/),
operated switch to allow an operator to start or stop the machine.
over an appropriate communication link and will interact with Bank Database.
ļ
12/09/14 2
User Interfaces and Tools User Interfaces and Tools
ļ® (^) Most database users in Applications do not use a query
language like SQL for the Data Manipulation. Why?
ļForms
ļGraphical user interfaces
ļData analysis tools
ļ® (^) Many interfaces are Webbased.
ļ® (^) It becomes needful to develop the capabilities at Userlevel
so that a user's commands are delivered to the database, and the results of those statements are sent back to the user via Forms / GUI / Data Analysis tools.
OOM Project: Architecture OOM Project: Architecture
12/09/14 5
The project environment often requires to prepare Program modules and incorporate domain related Business rules at Front endFront end and Data with all its technical specification at the other endother end.
Both the application codes and Data may be on same or different machine.
Database Connectivity Database Connectivity
ļ (^) Native Drivers
ļ (^) ODBC
ļ (^) With Java
ļUsing Web server
ļUsing proprietary Server
ļUsing JDBC
12/09/14 7
Data Base Connectivity : Native Drivers Data Base Connectivity : Native Drivers ļ® (^) Native drivers give you the raw power of talking directly to your database.
ļ® (^) When we make the connection and retrieve data, we are talking right to the file system.
ļ® (^) An example of a native driver is the Oracle Call Interface, or OCI from Oracle Corporation for Oracle databases.
ļ® (^) Native drivers are usually statically or dynamically linked into your software at compile time.
Advantages
ļ® (^) Very fast with the actual database access code linked together with your program, data access is lightning fast.
Disadvantages
ļ® (^) Not portable applications created in this manner are usually not portable to other platforms without code modifications.
ļ® (^) Inflexible because the driver is linked into your application, changes in the driver software require possible recompilation of your application.
8
Software Layers to handle Data Software Layers to handle Data
12/09/14 10
Database traditionally handled through SQL queries requires Data base connectivity ā ODBC. ODBC further needs Native drivers to establish connection
ODBC ODBC
Advantages
ļ® (^) Fast Not as fast as native drivers, but pretty fast. You have
one additional layer of software to go through to get to your data.
ļ® (^) SQL Enabled You can use SQL to query the database.
Disadvantages
ļ® (^) Not portable Applications created in this manner are
usually not portable to other platforms without code modifications.
ļ® (^) Inflexible Because the driver stub is linked into your
application, changes in the driver software API require possible recompilation of your application
12/09/14 11
Databases and Java Databases and Java
ļ® (^) Java is a platform independent programming language. In
order to access a database with Java you need to use a platformindependent method.
ļ® (^) This is easy to accomplish, but might be quite cumbersome.
Usually, you'd have to create a server program that speaks to the database of your choice and then your Java programs would need to interact with your server.
ļ® (^) If you want to abandon your platform independence, you
can write native code to access your data. This would involve C or C++ programming in UNIX or Windows 95/NT. Without the proper tools, this can be a real headache.
12/09/14 13
Databases with Java Databases with Java
ļ® (^) So what does a programmer do when he needs data access
from Java?
ļ® (^) There are several ways to get data to your application. These
database access services include:
ļ (^) Access via Web Server. The client requests data and a CGI
program talks to the database and returns the formatted data to the Java program.
ļ (^) Proprietary Server. The proprietary server knows how to
talk to databases. Your Java program makes requests of this server, which in turn fulfills your requests.
12/09/14 14
Databases with Java Databases with Java
ļ (^) The latest arrival onto the database scene is Sun
Microsystem's own Java Database Connectivity, or JDBC.
ļ® (^) To set an independent database standard API for
Java, Sun Microsystems developed JDBC.
ļ® (^) JDBC is an API for the Java programming language that
defines how a client may access a database. It provides methods for querying and updating data in a database.
ļ
12/09/14 16
JDBC offers JDBC offers
ļ® (^) JDBC offers a generic SQL database access
mechanism that provides a consistent interface to a
variety of RDBMSs.
ļ® (^) This consistent interface is achieved through the use
of "plugin " database connectivity modules, or drivers.
ļ® (^) If a database vendor wishes to have JDBC support, he
or she must provide the driver for each platform that
the database and Java run on.
12/09/14 17
JDBC JDBC
ļ® (^) The latest version of JDBC is 3.0 and is a part of the J2SE
1.4.
ļ® (^) JDBC 3.0 is broken down into two packages:
java.sql. Referred to as the JDBC Core API.
javax.sql. Referred to as the JDBC Optional Package API. (In JDBC 2.0,
ļ® (^) This package was formerly known as the JDBC Standard
Extension API.
ļ® (^) JDBC provides the same capabilities as ODBC, allowing
Java programs to contain databaseindependent code.
ļ® (^) This means that a Java program that accesses a database is
not only portable across JVMs (since itās a Java program), but portable across databases, since it uses JDBC.
12/09/14 19
JDBC drivers JDBC drivers
ļ® (^) To connect to a database and access its contents,
we need a JDBC driver that works with that particular database.
ļ® (^) JDBC drivers fit into four categories referred to as
types, which depend on the applications.
ļ® (^) 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
database in answer to your query
12/09/14 20