Jump to page: 1 2
Thread overview
[GSOC] Database API
Mar 24, 2011
Christian Manning
Mar 24, 2011
Trass3r
Mar 25, 2011
Christian Manning
Mar 25, 2011
Jonathan M Davis
Mar 25, 2011
Christian Manning
Mar 26, 2011
Trass3r
Mar 26, 2011
Bruno Medeiros
Mar 25, 2011
Piotr Szturmaj
Mar 25, 2011
Christian Manning
Mar 26, 2011
Piotr Szturmaj
Mar 25, 2011
Masahiro Nakagawa
Mar 26, 2011
Christian Manning
Mar 26, 2011
David Nadlinger
Mar 28, 2011
Masahiro Nakagawa
Mar 29, 2011
Daniel Gibson
March 24, 2011
Hi,
I'm a second year student at De Montfort University studying Computer Science. I am very much interested in working on the database API idea that is proposed at http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DatabaseAPI (I was also quite interested in the containers idea, but it looks like someone else wants to do that)

I have limited experience with database libraries but have begun to study the JDBC API (in my small amount of spare time only as term doesn't finish for another 2 weeks for me and I still have assignments).

Has this idea/project been assigned a mentor? I'd like to ask them and the list, what's the best thing for me to do right now to prepare for this?

Thanks
Chris
March 24, 2011
> Has this idea/project been assigned a mentor? I'd like to ask them and the list, what's the best thing for me to do right now to prepare for this?

You could also have a look at http://dsource.org/projects/ddbi
This shows some past efforts to create database interfaces.
March 25, 2011
On 24/03/2011 17:58, Trass3r wrote:
>> Has this idea/project been assigned a mentor? I'd like to ask them and
>> the list, what's the best thing for me to do right now to prepare for
>> this?
>
> You could also have a look at http://dsource.org/projects/ddbi
> This shows some past efforts to create database interfaces.

This can be of some inspiration and also brings up a point about how this project would be executed, ie. is this to be part of phobos or a totally separate project? I'm guessing to be Digital Mars supported it's more likely wanted to be a part of phobos, but could someone clarify on this?

Another question about Digital Mars' GSOC involvement: when it's application time do I submit a proposal to someone directly, to this list, or to the GSOC site at http://www.google-melange.com ?

Thanks
Chris
March 25, 2011
Christian Manning wrote:
> Hi,
> I'm a second year student at De Montfort University studying Computer
> Science. I am very much interested in working on the database API idea
> that is proposed at
> http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DatabaseAPI (I was
> also quite interested in the containers idea, but it looks like someone
> else wants to do that)
>
> I have limited experience with database libraries but have begun to
> study the JDBC API (in my small amount of spare time only as term
> doesn't finish for another 2 weeks for me and I still have assignments).
>
> Has this idea/project been assigned a mentor? I'd like to ask them and
> the list, what's the best thing for me to do right now to prepare for this?
>
> Thanks
> Chris

I'm at finishing stage of my PostgreSQL client, written entirely in D. I will post sources in few days.

Before adding database support to Phobos, there are few important issues which obviously need further discussion. One of this issues are handling NULL values - essential thing in relational databases.

Although, there were some efforts to introduce standard Nullable or Optional type, they were aborted.

Currently I'm using this simple definition:

struct Nullable(T)
{
    Algebraic!(T, void*) Nullable;
    alias Nullable this;

    bool hasValue()
    {
        return cast(bool)Nullable.peek!(T);
    }

    bool isNull()
    {
        return cast(bool)!Nullable.peek!(T);
    }

    string toString()
    {
        T* t = Nullable.peek!T;
        return t ? to!string(*t) : "null";
    }
}

It flawlessy cooperates with Variant, which - I think - should officially support nulls as well. I would propose that standard Nullable type, should be a subtype of Algebraic union as above.

During writing my PostgreSQL interface, I also had some problems with Variant and std.conv.to functions. Currently std.conv doesn't support Variants, f.i. when using to!Variant(5), there are more than one toImpl match.

In case of DB api, Variants are also essential, because field types returned by database server aren't known at compile time.

To sum up, Phobos need some additional changes for database support, mainly addition of Nullable.
March 25, 2011
On 25/03/2011 14:56, Piotr Szturmaj wrote:
> To sum up, Phobos need some additional changes for database support,
> mainly addition of Nullable.

For now, couldn't this just be included with the database module?
March 25, 2011
> On 24/03/2011 17:58, Trass3r wrote:
> >> Has this idea/project been assigned a mentor? I'd like to ask them and the list, what's the best thing for me to do right now to prepare for this?
> > 
> > You could also have a look at http://dsource.org/projects/ddbi This shows some past efforts to create database interfaces.
> 
> This can be of some inspiration and also brings up a point about how this project would be executed, ie. is this to be part of phobos or a totally separate project? I'm guessing to be Digital Mars supported it's more likely wanted to be a part of phobos, but could someone clarify on this?

What I would expect to be the case would be that it would be implemented with the idea that it would ideally be put into Phobos but that it wouldn't necessarily make it into Phobos. Any major new functionality that gets added to Phobos at this point needs to be reviewed by the folks on this newsgroup and get voted in. So, it's possible that a fairly solid solution could be created which would not be acceptable in Phobos for one reason or another, at which point it would have to either be fixed so that it would be acceptable in Phobos or be left as a 3rd party library.

So, ideally stuff like a good database solution for D would make it into Phobos, but whether it actually makes it in depends a great deal on the actual solution.

- Jonathan M Davis
March 25, 2011
On 25/03/2011 18:45, Jonathan M Davis wrote:
>> On 24/03/2011 17:58, Trass3r wrote:
>>>> Has this idea/project been assigned a mentor? I'd like to ask them and
>>>> the list, what's the best thing for me to do right now to prepare for
>>>> this?
>>>
>>> You could also have a look at http://dsource.org/projects/ddbi
>>> This shows some past efforts to create database interfaces.
>>
>> This can be of some inspiration and also brings up a point about how
>> this project would be executed, ie. is this to be part of phobos or a
>> totally separate project? I'm guessing to be Digital Mars supported it's
>> more likely wanted to be a part of phobos, but could someone clarify on
>> this?
>
> What I would expect to be the case would be that it would be implemented with
> the idea that it would ideally be put into Phobos but that it wouldn't
> necessarily make it into Phobos. Any major new functionality that gets added
> to Phobos at this point needs to be reviewed by the folks on this newsgroup
> and get voted in. So, it's possible that a fairly solid solution could be
> created which would not be acceptable in Phobos for one reason or another, at
> which point it would have to either be fixed so that it would be acceptable in
> Phobos or be left as a 3rd party library.
>
> So, ideally stuff like a good database solution for D would make it into
> Phobos, but whether it actually makes it in depends a great deal on the actual
> solution.
>
> - Jonathan M Davis

Understood.

My last deadline is Monday, so after that I should have much more time to concentrate on this to plan out what I'd like to do and submit a proper proposal.

Chris
March 25, 2011
On Fri, 25 Mar 2011 02:48:14 +0900, Christian Manning <cmanning999@gmail.com> wrote:

> Hi,
> I'm a second year student at De Montfort University studying Computer Science. I am very much interested in working on the database API idea that is proposed at http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DatabaseAPI (I was also quite interested in the containers idea, but it looks like someone else wants to do that)
>
> I have limited experience with database libraries but have begun to study the JDBC API (in my small amount of spare time only as term doesn't finish for another 2 weeks for me and I still have assignments).
>
> Has this idea/project been assigned a mentor? I'd like to ask them and the list, what's the best thing for me to do right now to prepare for this?

Currently, many databases exist.

* SQL based: MySQL, PostgresSQL, SQLite, etc..
* KVS: Cassandra, HBase, Kumofs, Redis, etc...
* Document Oriented: MongoDB, CouchDB, etc...

I think next Database API should support these types.
AFAIK, DDBI supports only SQL based interface.

In Ruby, Rails 3 has Arel.
Arel seems to be a good query abstraction.

https://github.com/rails/arel

Arel's concept may help you :)


Masahiro
March 26, 2011
> Another question about Digital Mars' GSOC involvement: when it's application time do I submit a proposal to someone directly, to this list, or to the GSOC site at http://www.google-melange.com ?

You always have to apply via the google site.
I'm sure I read that somewhere in the FAQs.
March 26, 2011
On 25/03/2011 23:44, Masahiro Nakagawa wrote:
> In Ruby, Rails 3 has Arel.
> Arel seems to be a good query abstraction.
> 
> https://github.com/rails/arel
> 
> Arel's concept may help you :)
> 
> 
> Masahiro

Now that's an interesting way of going about things. Although, its description suggests that it's a framework for building frameworks which isn't really what I'm after as the database API should be able to be used by anybody easily. I don't know Ruby at all but in some of those examples, the syntax is quite neat.

Chris
« First   ‹ Prev
1 2