I'm newbie in JDBC and I was studying about JDBC Driver and I saw this definition of JDBC Driver:
JDBC Driver converts Standard API calls to low level calls.
What are low level calls and standard api calls?
"Standard API" calls are those defined by the JDBC API, basically all the types defined in the java.sql package.
"Low level" calls are whatever calls the JDBC driver need to make in order to actually "communicate" with the database, e.g.
An Oracle OCI driver needs to call the OCI library directly.
An Oracle Thin driver needs to communicate over TCP/IP with the database server.
SQL Server, PostgreSQL, MySQL, etc works like this too.
Embedded database drivers like H2, HSQLDB, Derby, etc. needs to call the Java code implementing the database.
A JDBC driver is used to enable interaction between Java and a database. Each database will have his own driver to interact with the corresponding protocol.
Each JDBC driver are basically translating standard JDBC API calls into native database calls.
(It's a little more complex in reality, if you want all details take at look at the wikipedia page)
Related
Neo4j have recently added a BI connector tool (neo4j.com/bi-connector) which can return relational data from your graph database to your business intelligence tool such as Tableau. The question is can i send SQL queries to this connector assuming i have added the jar file to my java application class path? If yes, which APIs should i use to send this SQL query to the driver?
I'm using Neo4j4.0.
For neo4j.com/bi-connector, if you look at the document PDF that you get when you download it, on page 10 where they show how to establish a connection you'll see that you get a connection object. After you have that, you have a standard JDBC connection which is a Java interface that tells libraries how to talk to a SQL database. There are a lot of different tools that use this interface, it's kind of user preference. A common one is JOOQ.
I am setting up a presto server. I have modified the open source jdbc of presto and developed my presto jdbc jar which is used for authentication. I am using db visualizer tool wherein I can copy the jdbc jar file in the path and use it to authenticate my presto db server. I wanted to switch to a web UI and I see many people recommending apache-superset. I see that the apache-superset is written in python. Is there a way to plugin my jdbc driver for presto in apache-superset so I can connect to my database and start querying the data.
I see that under Sources Tab we an add our database but this won't help me in connecting to my environment.
Apache Superset use PyHive package to communicate with Presto and also supports authentication. So, If this connector is not enough for your case you can use these approaches:
Modify Pyhive package for your usage.
Use JayDeBeApi to use your own JDBC Driver and create your own database connector on superset.
Do you know whether PostgreSQL JDBC driver with on-the-fly data encryption exists?
I use PostgreSQL database on Heroku and have requirement to encrypt some sensitive client data on database level. How it's possible to implement this?
Heroku allows to use PostgreSQL pgcrypto module but it allows only per-column encryption and work with the module looks cumbersome. So I'm thinking about data encryption on Java side.
JDBC driver irrelevant to encrypted storage
For encrypting data “at rest”, that is, when written to storage, the JDBC driver is irrelevant.
A JDBC driver’s job is to mediate between a Java app with Java types and a database with database types. The driver communicates with the database, relying your queries, and then marshaling back the results. The driver converts data between the types used on either side.
The JDBC driver does not affect how the data is stored by the database.
I want to connect to oracle 10g databases in java without help from odbc and jdbc drivers. Is there any way to do that??? Thanks in advance
No. That's exactly what the JDBC drivers are for. To connect to the database.
Strictly speaking you could write your own driver (and call it something else), but that would be an immense amount of work, just because you refuse to do things the correct way.
Yes, it is possible. Oracle can act as a web service provider.
In the 10g version, you can only publish REST XML/JSON services; in 11g, support for SOAP web services was added.
Please note that the services provided by Oracle need to be implemented in PL/SQL; essentially you would be writing stored procedures that wrap the SQL queries you normally send over JDBC. Compared to JDBC, the web service / REST API is a very different tool as it works on a higher level of abstraction. You should only use it when required (e.g. if you don't want to mix SQL with your Java code), not because of false beliefs about security issues with JDBC drivers.
See this Oracle-Base article for more information.
Are there any driver available for JOLAP or Olap4j to access existing OLAP services? I think on OLAP services like Oracle, MS SQL, etc.
We want start a OLAP project with Java? With which of the both API should we start?
olap4j is the perfect Java API for this type of project. It is designed to do for OLAP what JDBC does for relational databases. It allows you to write an application against a server-neutral API, and then run that application against various servers without code changes. Also, the API is easy to learn because it uses the same concepts as JDBC.
Using the XMLA olap4j driver (included with the olap4j distro) you can connect to any OLAP database which has an XMLA driver -- and most of them do. It has been tested against Microsoft SQL Server Analysis Services, SAP BW, and Mondrian, and others. It should work against Oracle's XMLA provider [ http://www.oracle.com/us/corporate/press/173668 ] but I have not tried it.
See www.olap4j.org for more information.
Julian Hyde
(olap4j project founder)
There's an xmla client library by icCube: http://www.iccube.com/products/contributions/xmla-client-library, though I haven't tried it myself.