What is JDBC?

What is JDBC and where can I start learning?

I know this is the way to access databases from Java, but what problems does it solve? Is it an ORM (or is it trying to be)? Does it mean abstracting the differences between databases at the syntax level? What does it do? and what does he not do?

+1


source to share


5 answers


JDBC is a driver that allows you to access the database. It provides you with a very easy way to access your database using SQL. Its main function is to allow you (the user) to execute SQL commands on the database. It is not an ORM and never will be. Sun website http://java.sun.com/docs/books/tutorial/jdbc/ has a good tutorial for JDBC. If you are interested in ORM try http://www.hibernate.org/ .



+5


source


No, JDBC is not an ORM. This is a Java Database Connectivity API , and basically it provides a database agnostic access layer with the provider model (so that new database drivers can be added easily). Vendors can add additional functionality for specific database functionality if they wish, but developers can ignore these functionality if they want to work with multiple databases.



There is no mapping - just modeling connections (and pools), prepared statements, stored procedures, result sets, etc.

+4


source


Java Database Connectivity (JDBC) is an API for the Java programming language that defines how a client can access a database. It provides methods for querying and updating data in the database. JDBC is geared towards relational databases.

+2


source


You have practically answered your own question.

It provides a common interface for accessing databases, which means that no matter the nuances of individual databases or how they are implemented, your API calls are the same. This is not an ORM.

0


source


JDBC is a set of Java interface classes that connect your application to any relational database management system.

-1


source







All Articles