DEV Community

Cover image for Database Drivers: Chauffeuring Your Data to Where it Needs to Go
Margo McCabe for HarperDB

Posted on • Updated on • Originally published at

Database Drivers: Chauffeuring Your Data to Where it Needs to Go

Most, if not all, companies deal with complications and integration headaches somewhere in their data pipeline due to an inability or difficulty of connecting certain systems to one another. Sometimes you have to add yet another technology to the lineup just to connect different systems and get your data to where it needs to go. However, in this modern day, less is more. Most technologies that emerge are all about being more efficient and providing more functionality in a smaller package. If you can meet your data management needs with less tools, then it’s a win-win for cost effectiveness, efficiency, and ease of use. Enter database drivers.

The Magical Adaptors

To put it plainly, each computer system needs some sort of adaptor or tool to be able to connect to other computer systems that are not the same. You can think about this in the physical or interior (computer system) sense. For a physical example, we all know the major frustration that comes along with upgrading your phone, when your chargers and headphones no longer fit in the ever-shrinking port on the bottom of the phone. However, you can buy an adapter to serve as a “middle man” to enable the connection. With computer systems, it’s the same but different. A database driver works like that physical phone adaptor, but instead of having to invest in an additional product to add to the tech stack, you can develop an adaptor/connector to extend the database functionality. Like an extension to a software package.

Usually the database vendor themselves will provide drivers, which is a smart business move considering it provides ease of use and increased accessibility to their product. Companies might develop these drivers in-house or employ an outside resource to do the development work. The good news is, once the drivers are built, they are simple to work with and can be used in many different integrations. Drivers and standard interfaces enable the user to connect to their favorite BI (business intelligence) and analytics tools, so you won’t have to learn a new system just to work with a new database.

Consider this explanation of database drivers provided by jdatalab:
“Similar to connecting a printer to a computer by using a printer driver, a DBMS (database management system) needs a database driver that enables a database connection in other systems. The driver works like an adaptor which connects a generic interface to a specific database vendor implementation. [For example] To make a database connection in a Java application, we need a JDBC (Java Database Connectivity API) driver. To connect with individual databases, JDBC requires drivers for each specific database type.”

So, the specific driver needs to match the language of the destination system so that the database can speak with and understand the information being transmitted. You can choose from drivers such as JDBC and ODBC based on the language protocol and specs of the application you need to connect to. A driver provides a standardized protocol on one side (such as JDBC or ODBC) for applications to connect with, and a specialized protocol on the other side to speak the appropriate database language. Effectively serving as a translator between the two applications. Under the cover, the database driver converts the language it receives to a language that the application will understand in real time. Standardized drivers and add-ins make it easy to integrate your databases and applications, such as BI tools, ETL tools, and front end applications. Ultimately drivers make everything a lot easier, so you’re not doing custom development work each time you need to complete a new integration.

Types of Database Drivers & Use Cases

As an example, say you’d like to integrate your Excel docs with your database. Whichever vendor you choose will probably (hopefully) have the correct driver for that. You can download the Excel driver (which they technically call an Add-In) or utilize a generic ODBC connection, and once the connection is complete, you can update the data in your database by editing the Excel spreadsheet, and vice versa! The tables and columns in the database are essentially updating in real time with the updates in the spreadsheet.

This example can be extended across different types of languages, systems, and applications. An ODBC (Open Database Connectivity) driver, originally developed by Microsoft (and Simba), enables applications to access the DBMS with standard SQL: “Applications call the functions in these drivers to access data in a DBMS-independent manner. A Driver Manager manages communication between applications and drivers.” Even though Microsoft has provided many ODBC drivers for Windows computers, most ODBC drivers today were written by someone else. Anyone can write a driver, and today ODBC drivers and apps exist on Mac and many other UNIX platforms.

Similarly, JDBC drivers can send SQL statements that allow Java applications to interact with the database. There are actually four to five different types of JDBC drivers in use today, depending on the client/server, use case, and integration needs. For example, Tutorials Point explains a 100% Pure Java driver: “A pure Java-based driver communicates directly with the vendor's database through socket connection. This is the highest performance driver available for the database and is usually provided by the vendor itself. This kind of driver is extremely flexible, you don't need to install special software on the client or server. Further, these drivers can be downloaded dynamically.”

Alt Text
Image Source

While JDBC and ODBC may be the most popular, there are many types of database drivers out there. Drivers for connecting to .NET and SSIS, and adaptors for applications like Tableau, OSIsoft PI, and BizTalk. There are many options, and your database vendor should make it simple to choose the correct driver/adaptor for your use case with clear explanations and examples. If you don’t see the driver you need, you might be able to request a custom driver from your vendor or a third party. These drivers really are a wonderful way that database and application companies work together to provide the most seamless user experience possible, so never hesitate to inquire about what you might need for your specific project!

One small side note; another type of tool that database vendors usually provide to create a more developer friendly experience is SDK’s (software development kits). While drivers enable the connection to other applications, SDK’s provide a guide for writing those applications. An SDK is a “collection of software development tools in one installable package. They facilitate the creation of applications by having a compiler, debugger and perhaps a software framework.” The different types are also based on specific programming languages and the use cases they serve. At first glance, I’m already able to find much more info online about SDK’s than I was about database drivers, but maybe that will have to be the topic of my next article…

We would love to hear from you! Check out the drivers provided by HarperDB for a real-world example, and if you don’t see something you like, request the driver you need on our feedback board.

Top comments (2)

abdurrkhalid333 profile image
Abdur Rehman Khalid

An Excellent Article that Shows Great Importance of Having the Database Drivers. But If we look at the present and what kind of development is being done in the present, we will come to know that modern development is done with the help of Object Relation Mapping, for large scale organizations and for small scale organizations such as startups and small e-commerce business MongoDB is being in use because there is very less hustle related to Relational or SQL databases.

But if we want to work in large and old organizations then it is very important to know how database drivers actually work and how we can use these drivers efficiently as well. By knowing all these things I am pretty sure that we will be able to get a tremendous increase in productivity and also the resources will be utilized in a very well manner as well.

Yes, the tech-stack will get bigger, but it will have advantages in understanding the underhood working of the databases and how database connections work in the different programming languages if the team is full of enthusiasm then this will surely be a fun thing to learn too.

margo_hdb profile image
Margo McCabe

Thanks for sharing, this is great insight! Yes, DB drivers have been around forever, it was interesting that I couldn't find much new info on them so it seemed like a good opening to write about it. :)

Though they're old, there are still plenty of applications that use database drivers today. I do agree that the paradigm has been shifting away in modern application development, but that's not true of all types of applications. For example, BI tools still rely on database drivers as their primary method of interacting with databases of all types ranging from Oracle to MongoDB.