I have an in-memory database embedded in my application and I want other applications to be able access it via ODBC.
After searching for an hour, I think I have 2 options.
- Write my own ODBC Driver which knows how to talk my application via the network.
- Implement MySQL or Postgres wire protocol in my application so that the client application can use MySQL/Postgres drivers.
According to Creating a custom ODBC driver writing my own driver is a huge task and should not be taken lightly.
So here are my questions.
- If I have to implement the wire protocol, am I correct in assuming that I can just create a thread which talks to database and communicates with the clients over the network? That sounds fairly simple to me.
- Do you know of any reasons why I should choose one of MySQL/Postgres/Some other wire protocol over the others? My queries will be basic SELECT statements.
- Is there any simpler way to access my in-memory sqlite DB via ODBC?
I'm new to the world of databases and would appreciate any pointers for further reading.