Anonymous
Asked in
Cars &Transportation
ยท
2 weeks ago
How is Java related to database?
Contents
- How does Java handle database connection?
- What database uses Java?
- How does Java communicate with database?
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.
What database uses 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 communicate with 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.
Related Questions
Relevance
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago
Write us your question, the answer will be received in 24 hours