Hi,<br><br>I would like to work on improving the HDBC as a GSOC project 2012. <br><br>I have a previous working experience with Django and its ORM and I had a look at Amnesia (<a href="http://amnesia.sourceforge.net/user_manual/manual.html" target="_blank">http://amnesia.sourceforge.net/user_manual/manual.html</a>) which is a SQL database interface for Erlang.<br>


Few of the features of both include:<br>1 ) Database operation are supported through Language Native types.<br>2 ) Direct table creation from native language constructs. (models.py in Django and <i>tablename</i>.hrl in Amnesia)<br>


<br>I would like to make developement in HDBC so that all Database interactions are made through Haskell Native data type.<br><br>For eg -<br>In using Erlang Database interface through Amnesia on would write (Quoting example from Amnesia Documentation) <br>


<br><pre>populate() -&gt;<br>   {ok, Pid} = amnesia:open(sales),<br><br>   %% adding customer<br>   {ok, Cust1} = amnesia:add_new (Pid, #customer {customer_code = 102341, name = &quot;John&quot;, address = &quot;XXXXX&quot;, email = &quot;john@xxx&quot;}),<br>

<br>   %% adding product<br>   {ok, P1} = amnesia:add_new (Pid, #product { product_code = &quot;001&quot;, description = &quot;CPU Intel&quot;, price = 231.10 }),<br><br>   %% now let&#39;s add an order for customer &quot;Cust2&quot;<br>

   {ok, Order} = amnesia:add_new (Pid, #orders { order_number = 30, order_date = {2008, 7, 17}, customer = Cust1 }),<br><br></pre>Here each Erlang record (#customer, #product and #orders) are responsible for different Database Tables. So writing the first statement inserts into database and return an object Cust1 that can be used late down the line to create an order table object.<br>


<br>In Django through Python one would have written:<br><br>customer = Customer.objects.create(customer_code=102341, name = &quot;John&quot;, address = &quot;XXXXX&quot;, email = &quot;john@xxx&quot; )<br>order = Orders.objects.create(order_number = 30, order_date = {2008, 7, 17}, customer = customer)<br clear="all">

<br><br>Writing everything through Language type increases more readability inside the code. Additionally this helps in abstracting the logic in code from the underlying SQL being executed. In addition to the support for select, insert, update queries the my work would extend support for Joins, aggregations etc all in Haskell Native Types. <br>

<br>I would also like to work to handle the database queries from wire formats/ binaries instead of strings as is the case currently. I would like to close down these two features as a GSOC project during the summer of 2012 and I would your feedback on the same.<br>

<br>-- <br>Regards<br>Pranjal Pandit<br><br><br>Don&#39;t communicate by sharing memory; share memory by communicating.<br>