Proposal: Database Engine for D

tcak via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 31 20:20:19 PST 2015


On Thursday, 31 December 2015 at 17:14:55 UTC, Piotrek wrote:
> The goal of this post is to measure the craziness of an idea to 
> embed a database engine into the D language ;)
>
> I think about a database engine which would meet my three main 
> requirements:
>   - integrated with D (ranges)
>   - ACID
>   - fast
>
> Since the days when I was working on financing data SW I become 
> allergic to SQL. I though that NoSQL databases would fill the 
> bill. Unfortunately they didn't. And I want to have an ability 
> to write a code like this without too much effort:
>
>   struct Person
>   {
>    string name;
>    string surname;
>    ubyte age;
>    Address address;
>   }
>
>  DataBase db = new DataBase("file.db");
>  auto coll = db.collection!Person("NSA.Registry");
>  auto visitationList = coll.filter!(p => p.name == "James");
>  writeln (visitationList);
>
> And other things like updating and deleting from db. I think 
> you get my point.
>
> So I started a PoC project based on SQLite design:
> https://github.com/PiotrekDlang/AirLock/blob/master/docs/database/design.md#architecture
>
> The PoC code: 
> https://github.com/PiotrekDlang/AirLock/tree/master/src/database
>
> Can you please share your thoughts and experience on the topic? 
> Has anyone tried similar things?
>
> Piotrek

You know someone needs to maintain all that code base 
continuously. When SQLite is a separate project, it has its own 
developers and we just bind to its library; it is same for other 
DBs. Your proposal is nice, but creating another standard, and a 
group of people needs to take care of it in both documentation 
and coding wise continuously are biggest issues.


More information about the Digitalmars-d mailing list