What is the normal procedure followed by a java client to access the db?
Submitted by: AdministratorThe database connection is created in 3 steps:
1. Find a proper database URL
2. Load the database driver
3. Ask the Java DriverManager class to open a connection to your database
In java code, the steps are realized in code as follows:
1. Create a properly formatted JDBR URL for your database. (See FAQ on JDBC URL for more information). A JDBC URL has the form
jdbc:someSubProtocol://myDatabaseServer/theDatabaseName
2. Class.forName(”my.database.driver”);
3. Connection conn = DriverManager.getConnection(”a.JDBC.URL”, “databaseLogin”,”databasePassword”)
Submitted by: Administrator
1. Find a proper database URL
2. Load the database driver
3. Ask the Java DriverManager class to open a connection to your database
In java code, the steps are realized in code as follows:
1. Create a properly formatted JDBR URL for your database. (See FAQ on JDBC URL for more information). A JDBC URL has the form
jdbc:someSubProtocol://myDatabaseServer/theDatabaseName
2. Class.forName(”my.database.driver”);
3. Connection conn = DriverManager.getConnection(”a.JDBC.URL”, “databaseLogin”,”databasePassword”)
Submitted by: Administrator
Read Online Java Database Job Interview Questions And Answers
Top Java Database Questions
☺ | Is the JDBC-ODBC Bridge multi-threaded? |
☺ | What is 2-phase commit? |
☺ | How do you get Column names only for a table (SQL Server)? |
☺ | What is a “dirty read”? |
☺ | What is cold backup, hot backup, warm backup recovery? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |