what is jdbc?

Answer Posted / nagendar.m

Hi ammu the interviewer doesn't mean to ask the abrivation
of the jdbc.
see, i can justify my ans for this Q? hav a look.

jdbc is an API provided to connet various DB's from a java
program and as part of jdbc there are 4 types of drivers
avilable to connect DB.
>Type-I to Type-IV
>in projects we use Type-IV driver which is called Thin
driver OR we use the combination of thin and Type-III
driver.
>Sample code: Using Thin driver and Oracle DB.

Class.forName("Oracle.jdbc.driver.OracleDriver");

String url="jdbc:oracle:thin:@localhost:1521:server";

Connection connection=DriverManager.getConnection
(url,"SCOTT","TIGER");

PreparedStatement ps=connection.prepareStatement("SELECT *
FROM EMPLOYEE");

ResultSet rs=ps.executeQuery();

i think this Explination is fine...

Is This Answer Correct ?    28 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the authentication modes in asp.net? : java security

489


Can we install jre without jdk?

508


If you’re overriding the method equals() of an object, which other method you might also consider?

514


What is mdb in java?

506


What is rxjava2?

471






Why is class forname used in java?

489


What is cdi bean in java?

523


What is a stream in programming?

448


Is php faster than java?

482


What services can invoke lambda?

477


how can we create the ui using netbeans,having the code?

1623


Explain working of java virtual machine (jvm)?

507


What is optional in java 8? What is the use of optional?advantages of java 8 optional?

495


What is stateless and stateful in java?

490


What is jpa used for?

481