Database persistence library

4 views
Skip to first unread message

rraptorr

unread,
Apr 7, 2008, 6:34:11 PM4/7/08
to Nemerle Forum
Hi,
I'm interested in creating a database persistence library for Nemerle
as my MSc thesis subject in The Computer Science Institute, University
of Wroclaw.
I have some practice in C# programming. I'm also familiar with
functional programming (SML, OCaml, Haskell). I've been playing with
Nemerle (also with macros) for a while, I've also looked into how
Hibernate for Java works. So now I'm in the process of thinking how to
make this kind of solution in Nemerle, so I'd like to ask a couple of
questions.

First question. As I understand suggestion about usage of the macros,
I'd need to implement different system than in Hibernate. As I
understand, in Hibernate (hibernate-core to be specific), database to
object mapping is defined by a XML file. Runtime library is then
parsing this file and, based on this, executes needed database
queries. In Nemerle, macros would generate some code during
compilation. It is to be decided if this code would be handling all of
the features (connecting to database and storing/fetching objects) or
it will be used by some code from the library that will have necessary
components for connecting to database.

Second about DB schema. First thing I'd like to make is to create DB
schema from existing classes. But here comes the question what should
I consider a DB schema? In the simplest solution this would be literal
string containing SQL query with "CREATE TABLE" statement. This have
its advantages (generated code does not require special libraries) but
also its disadvantages (generated code is only valid for one DBMS,
reverse operation will be hard). The second approach is to create some
generic DB schema modelled with classes. But there is a general
problem with creating generic DB schema as DBMS's can be very
different so in this case only some common subset could be modelled.
I'd like to hear some opinions about this if anyone would be so kind:)

Ķaмȋļ ๏ Şκaļşκȋ

unread,
Apr 9, 2008, 10:37:32 AM4/9/08
to nemer...@googlegroups.com
Tomasz Wawrzyniak from UWr already did MSc on this subject, however he
did not make the results available on web I guess. I have the thesis
and implementation somewhere on disk, I will send it to you later. It
would be very interesting to see this work continued and made public,
however I'm not sure if you will be able to make this a subject of
another MSc thesis...

--
Kamil Skalski
http://nazgul.omega.pl

Reply all
Reply to author
Forward
0 new messages