[std.database]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 8 09:19:02 PDT 2011


On 10/8/11 8:36 AM, Adam Burton wrote:
>> I'd also like to get a feel for the magnitude of the task, so I'd like to
>> ask what database systems you think should be supported.
> mysql, postgresql, sqllite are the 3 I am aiming at in my personal
> implementation.

I had lunch yesterday with a database expert and discussed the matter 
with him. He advised that we take a driver-oriented approach in which we 
define a common API for all databases (modeled at high level after e.g. 
JDBC to reuse that accumulated experience), and then define a few 
drivers for popular DBMSs in hope that users interested in supporting 
additional DBMSs will contribute additional drivers using the initial 
drivers as a template. Eventually when D and its database API become 
successful, DBMS providers themselves will write the drivers.

It would be great if we could leverage another already widespread driver 
architecture. There are two that come to mind, and I looked into both: 
JDBC and ODBC. The first requires either bridging into Java or 
translating Java driver code to D. The second is widespread on Windows 
but less so on other OSs. So probably we'll need to define our own 
drivers. (This also brings dynamic linking as a possibility.)


Andrei


More information about the Digitalmars-d mailing list