Software Developer
Java database connectivity (JDBC) is the JavaSoft specification of a trendy application programming interface (API) that permits java applications to get entry to database management structures. The JDBC API consists of a set of interfaces and classes written within the Java programming language.
With the use of those popular interfaces and training, programmers can write programs that hook up with databases, ship queries written in based question language (square), and system the consequences.
Because JDBC is a trendy specification, one java program that makes use of the JDBC API can connect with any database management gadget (DBMS), so long as a driving force exists for that particular DBMS.
The JDBC connection properties look as follows:
JDBC Driver oracle.jdbc.OracleDriver
JDBC URL jdbc:oracle:thin:@localhost:1521:orclpdb1
Hibernate Dialect org.hibernate.dialect.Oracle12cDialect
And, if you want to connect using a JDBC DataSource, this is what you need to use:
OracleDataSource dataSource = new OracleDataSource();
dataSource.setDatabaseName("high_performance_java_persistence");
dataSource.setURL("jdbc:oracle:thin:@localhost:1521/orclpdb1");
dataSource.setUser("oracle");
dataSource.setPassword("admin");
The JDBC connection properties look as follows:
JDBC Driver com.mysql.jdbc.Driver
JDBC URL jdbc:mysql://localhost/high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.MySQL8Dialect
And, if you want to connect using a JDBC DataSource, this is what you need to use:
MysqlDataSource dataSource = new MysqlDataSource();
dataSource.set URL(
"jdbc:mysql://localhost/high_performance_java_persistence"
);
dataSource.setUser("mysql");
dataSource.setPassword("admin");
The JDBC connection properties look as follows:
JDBC Driver org.postgresql.Driver
JDBC URL jdbc:postgresql://localhost/high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.PostgreSQL95Dialect
And, if you want to connect using a JDBC DataSource, this is what you need to use:
PGSimpleDataSource dataSource = new PGSimpleDataSource();
dataSource.setDatabaseName("high_performance_java_persistence");
dataSource.setServerName("localhost");
dataSource.setUser("postgres");
dataSource.setPassword("admin");
The JDBC connection properties look as follows:
JDBC Driver com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL jdbc:sqlserver://localhost;instance=SQLEXPRESS;databaseName=high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.SQLServer2012Dialect
And, if you want to connect using a JDBC DataSource, this is what you need to use:
SQLServerDataSource dataSource = new SQLServerDataSource();
dataSource.set URL(
"jdbc:sqlserver://localhost;instance=SQLEXPRESS;" +
"databaseName=high_performance_java_persistence;"
);
dataSource.setUser("sa");
dataSource.setPassword("adm1n");
The JDBC connection properties look as follows:
JDBC Driver org.mariadb.jdbc.Driver
JDBC URL jdbc:mariadb://localhost/high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.MariaDB53Dialect
The JDBC connection properties look as follows:
JDBC Driver com.ibm.db2.jcc.DB2Driver
JDBC URL jdbc:db2://localhost/high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.DB2Dialect
The JDBC connection properties look as follows:
JDBC Driver com.sap.db.jdbc.Driver
JDBC URL jdbc:sap://localhost/high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.HANAColumnStoreDialect
The JDBC connection properties look as follows:
JDBC Driver com.informix.jdbc.IfxDriver
JDBC URL jdbc:informix-sqli://localhost:9088/sysuser:INFORMIXSERVER=hpjp
Hibernate Dialect org.hibernate.dialect.InformixDialect
The JDBC connection properties look as follows:
JDBC Driver org.hsqldb.jdbc.JDBCDriver
JDBC URL jdbc:hsqldb:mem:high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.HSQLDialect
And, if you want to connect using a JDBC DataSource, this is what you need to use:
JDBCDataSource dataSource = new JDBCDataSource();
dataSource.setUrl("jdbc:hsqldb:mem:test");
dataSource.setUser("sa");
dataSource.setPassword("");
The JDBC connection properties look as follows:
JDBC Driver org.h2.Driver
JDBC URL jdbc:h2:mem:high_performance_java_persistence
Hibernate Dialect org.hibernate.dialect.H2Dialect
The JDBC connection properties look as follows:
JDBC Driver org.apache.derby.jdbc.EmbeddedDriver
JDBC URL jdbc:derby:target/tmp/derby/hpjp;databaseName=high_performance_java_persistence;create=true
Hibernate Dialect org.hibernate.dialect.DerbyTenSevenDialect