×
☰ See All Chapters

JDBC Tutorial

Below concepts are mandatory prerequisites concepts to learn JDBC.

  1. Java programming language. 

  2. RDBMS (Database) 

  3. SQL 

Please read Java Tutorial here. Now let us see about RDBMS and SQL.

RDBMS (Database)

Assume we have list of students whose details need to be stored and maintained. Obviously it is better to maintain a data in a table of rows and columns. If the same details are maintained in paragraph or page wise, later it is difficult for maintenance.

ID

First Name

Last Name

Marks

1

Manu

Manjunatha

98

2

Likitha

Tyagraj

97

3

Advith

Tyagraj

100

If it is required to add or remove any student details we can easily remove the rows. Also, if it is required to update the details we can easily update the rows. If we have more number of student we can easily search the details using id.

This data maintenance is done in paper, books, excel, word documents. Can we expect this paperless, something computer software to go paperless? Software to read and write through enterprise applications?

Yes, this can be done. A relational database management system (RDBMS) database is an answer for this.

A relational database management system (RDBMS) is a database management system (DBMS) based on the relational model. Relational model means, data will be split among multiples tables by connecting the tables with relationships. The key difference between RDBMS and DBMS is that RDBMS (relational database management system) applications store data in a tabular form, while DBMS applications store data as files.

SQL Server, Oracle, MySQL, DB2, SQLite are some of the example for RDBMS.  MySQL is an open source RDBMS which we will use for our JDBC tutorials.

Data

  • Data is a value. 

  • Data includes names, numbers, dollar amounts, text, graphics, decimals, figures, calculations, summarization, videos, audios and just about anything else you can possibly imagine.  

Database

  • Database is a repository and is used to store data (especially related to an organization or enterprise). It is an example for secondary memory. 

Popular Database Vendors:

  • Closed source:  Oracle, Microsoft, Informix, Sybase, and IBM. 

  • Open-source: MySQL, PostgresSQL, and SAP.  

Data Base Management System (DBMS)

  • DBMS is a software management system to maintain database. 

  • The software required to perform the task of database management is called as DBMS (Data Base Management System). 

  • Management of data means: 

    1. Providing mechanisms for data manipulation such as adding, updating, deleting or reading of data. 

    2. Providing data security against unauthorized access. 

  • There are many types of DBMS implementation but among which RDBMS and ORDBMS are popular. 

Relational Data Base Management System (RDBMS)

  • A relational database management system (RDBMS) is an implementation of database management system (DBMS) or software that is used to maintain database. 

  • In RDBMS data will be stored in many tables and all the tables will be related with each other with the help of Primary Key and Foreign Key. 

  • RDBMS database use SQL (Structured Query Language) to communicate with the system. 

Object Relational Database Management System (ORDBMS)

  • An object relational database management system (RDBMS) is also a database management system (DBMS). 

  • ORDBMS also has the same features of RDBMS. 

  • ORDBMS database is used to bridge the gap between Relational World and 

  • Object Oriented Programming language like Java, C++, and VB etc. We can map directly any language object with the tables of relational database. 

  • In java applications, we very rarely use ORDBMS support. 

  • In JAVA, application developers generally use RDBMS and the support of ORM (Object Relational Mapping) technologies like Hibernate, Ibatis, Toplink, etc. 

  • Today almost all databases like Oracle, MySQL, DB2, etc. are ORDBMS but we rarely use the object oriented support.  We use only the RDBMS support. 

SQL

SQL stands for Structured Query Language in DBMS and is used to communicate with database. SQL is a standard proposed by ANSI. Some pronounce it as sequel. With each vendor’s SQL implementation, however, you find that there are enhancements that serve the purpose for each database server. These enhancements, or extensions, are additional commands and options that are simply a bonus to the standard SQL package and available with a specific implementation. So when you are working with any particular database you need to check the database manual.

 

 


All Chapters
Author