[GSOC] Database API draft proposal

Christian Manning cmanning999 at gmail.com
Sat Apr 2 13:03:00 PDT 2011


Hello all,

This is my first draft proposal for a Database API for Google Summer Of 
Code. I have never written a document such as this so any and all 
feedback is welcome.

Thanks
---------------------------------

Synopsis
--------
An API for databases is a common component of many languages' standard 
library, though Phobos currently lacks this. This project will remedy 
this by providing such an API and also begin to utilise it with 
interfaces for some Database Management Systems (DBMS). I believe this 
will benefit the D community greatly and will help bring attention and 
developers to the language.

Details
-------
This project takes influence from the Java Database Connectivity API 
(JDBC), the Python Database API v2 and other similar interfaces. The 
idea is that any database interface created for use with D will follow 
the API so that the only thing to change is the database back-end being 
used. This will make working with databases in D a much easier experience.

I plan to have several interfaces in a database module which are then 
implemented for specific DBMSs.
For example:

module database;

interface Connection {
     //method definitions for connecting to databases go here.
}

Then in an implementation of MySQL for example:

module mysql;

import database;

class Connect : Connection {
     //implement defined methods tailoring to MySQL.
}

What goes in to these interfaces will be decided in conjunction with the 
D community so that there is minimal conflict and it will benefit as 
many circumstances as possible. I believe this to be the best route to 
take as I cannot speak for everyone who will be using this.

Using the API created I plan to create an example implementation, 
initially wrapping around the MySQL C API. This will be a good starting 
point for this project and more can be created, time permitting.

About Me
--------
My name is Christian Manning and I am a second year undergraduate 
studying Computer Science at De Montfort University.
I've become interested in D over time after reading about it several 
years ago. I got myself "The D Programming Language" and went from 
there. Although I've not done anything useful in D as I've learnt mainly 
C and Java and am unable to use D for my university projects, I think 
I'm capable of achieving the goals of this project.


More information about the Digitalmars-d mailing list