Anonymous Asked in Cars &Transportation · 2 weeks ago

Can Java be connect to database?

As a developer, you can use JDBC to interact with a database from within a Java program. JDBC acts as a bridge from your code to the database, as shown in Figure 1. Figure 1. JDBC connects Java programs to databases. 5 дней назад


Which database we can use with Java?

You can use any relational database that has a JDBC driver. These would include PostgreSQL, Hypersonic SQL, MySQL, SQLLite on the free side and Oracle, MS SQL Server, and others on the paid side.

How does Java handle database connection?

4 Answers1remove the public getConnection method, if it used outside the Database class you really have a design problem.2remove the commit method. ... 3remove the instance variable connection , instead obtain a connection per call.4and properly close this connection in the finally block of each call.Proper way of handling database connections in a medium sized web ...

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours