OrientDB Java Interface - OrientDB

What is OrientDB Java Interface?

Similar to RDBMS, OrientDB helps JDBC. For this, first we want to configure the environment for JDBC programming. Following is the method to create a connection between your application and database.

First, we want to download the JDBC driver. visit the following link https://code.google.com/archive/p/orient/downloads to download OrientDB-JDBC.

Following are the simple five steps to achieve OrientDB-jdbc connectivity.

  • Load JDBC driver
  • Create Connection
  • Create statement
  • Execute statement
  • Close connection

Example

Try the following example to recognize OrientDB-JDBC connectivity. allow us to remember we have an worker table which includes the following fields and its types.

Sr.No.

Field Name

Type

1

Id

Integer

2

Name

String

3

Salary

Integer

4

Join date

Date

You may create a Schema (table) by executing the following instructions.

After executing all of the instructions, you may get the employee table with the following fields, employee name with id, age, and join_date fields.

Save the following code into OrientJdbcDemo.java file.

The following command is used to compile the above program.

If the above command is executed successfully, you will get the following output.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

OrientDB Topics