Answer the question
In order to leave comments, you need to log in
How does the driver connect to the database?
How the driver connects to the database. As I understand it, this should be some kind of request, like http, or a connection via TCP, if so, what is contained in this request, where you can read about it in detail, there are some articles, books, or at least open source code where it is can you see?
Answer the question
In order to leave comments, you need to log in
Each database has its own api - it can be both on TCP and HTTP. Usually, it is documented somewhere for driver developers, but not always.
For example, clickhouse has a documented HTTP-api , but not a documented TCP, but this does not really bother people, because the sources are open .
Here, for example, is the implementation of the postgresql driver in C#: https://github.com/npgsql/npgsql/tree/main/src/Npgsql
Here it is, but in Java: https://github.com/pgjdbc/pgjdbc
In 99% of cases, there is no point in developing your own driver, because this is not such an easy task, and DBMS developers are already writing down their implementations for the most popular platforms.
the driver can implement and connect through the physical medium that the server has an implementation of. for example, you can connect to MsSql via shared memory, pipe, or tcp/ip. Accordingly, the native driver from MS implements all three connection methods. Although one, for example, another driver could. The way the driver and the DBMS communicate is the application level, and, for example, MsSql is closed, as far as I know.
There are sources in OpenSource MySql, you can have a look.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question