std.database

Piotrek via Digitalmars-d digitalmars-d at puremagic.com
Wed Mar 2 07:41:56 PST 2016


On Tuesday, 1 March 2016 at 21:00:30 UTC, Erik Smith wrote:
> The main focus of this project is to bring a standard interface 
> for database clients.    This is similar to the purpose of JDBC 
> (java) and DBI (perl).  While there is some existing work in 
> place (ddbc, etc.c.odbc.sql, vibe.d and other newer projects), 
> my goal, after a lengthly period of community review/revision, 
> is to achieve Phobos inclusion for the interface standard and 
> also some of the implementations. There is debate on whether 
> the implementations belong there, but I have made the 
> implementation Phobos compatible (by using templates) while 
> this issue is sorted out.
>

My quick comments:

1. In my opinion it should not be called std.database, but let's 
say "std.dbc".
This is because it looks like a wrapper over db clients.  
Moreover one may say it's almost impossible to make a common and 
effective interface which would work with all databases. e.g. 
someone on Wikipedia argues ODBC is obolete (check "ODBC today")

2. I'm not against such a functionality in Phobos. However your 
project seems to be a duplication of the DDBC project. And it was 
not proposed for inclusion so often.

3. What I call a D Database API could be described as:
  - Database object
  - DbCollection object (equivalent to array)
  - ranges + std.algorithm

  And here is my implementation (experimental) of this API:
  
https://github.com/PiotrekDlang/AirLock/tree/master/docs/database/design.md
  https://github.com/PiotrekDlang/AirLock/tree/master/src

Piotrek


More information about the Digitalmars-d mailing list