What are the steps involved for making a connection with a database or how do you connect to a database

Loading the driver : To load the driver, Class. forName() method is used. Class. forName(”sun. jdbc. odbc. JdbcOdbcDriver”); When the driver is loaded, it registers itself with the java. sql. DriverManager class as an available database driver. b) Making a connection with database: To open a connection to a given database, DriverManager. getConnection() method is … Read more

What are the types of JDBC Driver Models and explain them

There are two types of JDBC Driver Models and they are: a) Two tier model and b) Three tier model Two tier model: In this model, Java applications interact directly with the database. A JDBC driver is required to communicate with the particular database management system that is being accessed. SQL statements are sent to … Read more

What is the difference between JDBC and ODBC

a) OBDC is for Microsoft and JDBC is for Java applications. b) ODBC can’t be directly used with Java because it uses a C interface. c) ODBC makes use of pointers which have been removed totally from Java. d) ODBC mixes simple and advanced features together and has complex options for simple queries. But JDBC … Read more

What is JDBC

JDBC is a set of Java API for executing SQL statements. This API consists of a set of classes and interfaces to enable programs to write pure Java Database applications. JDBC stands for Java Database Connectivity. It is a Java API (Application Programming Interface) that allows Java programs to interact with databases. JDBC provides a … Read more

What is serialization and deserialization?-

Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects. Serialization is the process of converting an object into a stream of bytes, allowing the object to be easily saved to a file, sent over a network, or stored in a database. … Read more