Hi people, As I stated in a earlier message, I am using Rails on my masters degree and soon I will have to port my application from a relational database (MySql) to a RDF semantic database called Sesame. At first, I thought that I could get away with most of the porting only by writing a decent database adapter, but then, examining AR closer, I could see that it has some strong dependencies towards relational mechanics and the SQL language. (The RDF database uses its own query language). So, I was wondering what David and the others AR experts could say about this porting. Is it possible? What would be the biggest challenges? What parts of AR would I have to adapt besides crafting a good db adapter? It is important to point out that I am not concerned with performance or any real world usage as it would serve only to demonstrate my application in a academic setting. Thank you very much, Demetrius
Hi Demetrius, This is a really interesting project. However I don''t believe lifting AR''s close ties to SQL would not be an favor to anyone. Indeed AR''s close tie to SQL is its major advantage over similar frameworks which try to abstract SQL away ( and than come up with something even worse on top like Hibernate ). However what i recommend is to leverage rubys strength by staying DuckType compatible with ActiveRecord. A good example of how this can be done is the ActiveLdap project on rubyforge. This way you can still switch between SQL and RDF on the fly and you can probably reuse a lot of AR code like validation and similar things. Good luck ! On Wed, 15 Dec 2004 14:53:18 -0200, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote:> Hi people, > > As I stated in a earlier message, I am using Rails on my masters degree > and soon I will have to port my application from a relational database > (MySql) to a RDF semantic database called Sesame. > > At first, I thought that I could get away with most of the porting only > by writing a decent database adapter, but then, examining AR closer, I > could see that it has some strong dependencies towards relational > mechanics and the SQL language. (The RDF database uses its own query > language). > > So, I was wondering what David and the others AR experts could say about > this porting. Is it possible? What would be the biggest challenges? What > parts of AR would I have to adapt besides crafting a good db adapter? > > It is important to point out that I am not concerned with performance or > any real world usage as it would serve only to demonstrate my > application in a academic setting. > > Thank you very much, > Demetrius > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://blog.leetsoft.com
Hi Tobi, thanks for your answer. I understand cleary that AR strength comes from the fact that it really acknowledges the database and its language (SQL). I don''t intend to change that. RDF databases have a similar approach and do use query languages like RQL, but the syntax is completely different, as so the database primitives. We are not talking about tables and rows and columns anymore, but triples, subjects, predicates, objects and as for RDF(S) (which is a level of abstraction higher than RDF and which I will rely heavily) there are actual classes and properties more like a object-oriented database. This is actually something I hope will make my job a little easier on one side, because the OO-ER impedance mismatch will be smaller. Anyway, I will follow your advice and try to stay compatible with AR, at the same time trying to reuse most of its funcionality. I was hoping if you could antecipate some of the challenges I will have to undertake to be sucessful in my attempt. What are the critical areas of AR that I should be looking at? PS: would you advise me to start working with Rails 0.9 immediately or stick with 0.8.5? Tobias Luetke wrote: Hi Demetrius, This is a really interesting project. However I don''t believe lifting AR''s close ties to SQL would not be an favor to anyone. Indeed AR''s close tie to SQL is its major advantage over similar frameworks which try to abstract SQL away ( and than come up with something even worse on top like Hibernate ). However what i recommend is to leverage rubys strength by staying DuckType compatible with ActiveRecord. A good example of how this can be done is the ActiveLdap project on rubyforge. This way you can still switch between SQL and RDF on the fly and you can probably reuse a lot of AR code like validation and similar things. Good luck ! On Wed, 15 Dec 2004 14:53:18 -0200, Demetrius Nunes wrote: Hi people, As I stated in a earlier message, I am using Rails on my masters degree and soon I will have to port my application from a relational database (MySql) to a RDF semantic database called Sesame. At first, I thought that I could get away with most of the porting only by writing a decent database adapter, but then, examining AR closer, I could see that it has some strong dependencies towards relational mechanics and the SQL language. (The RDF database uses its own query language). So, I was wondering what David and the others AR experts could say about this porting. Is it possible? What would be the biggest challenges? What parts of AR would I have to adapt besides crafting a good db adapter? It is important to point out that I am not concerned with performance or any real world usage as it would serve only to demonstrate my application in a academic setting. Thank you very much, Demetrius _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Just a quick question, Demetrius, if you don''t mind ... what, perchance, would be the purpose of an RDF adapter? Are you thinking about rolling Rails into Mozilla, or XUL, in some way? I ask because I think that would be a very interesting project. Perhaps what I''m thinking would be finding some way to use Rails to interact with a database and populate a XUL frontend, rather than HTML. Clearly that''s completely different and wouldn''t require using an RDF database, but still, I''m interested. SEAN
Sean, my intensions are solely related to my academic needs, for my masters degree. It is in fact just an experiment with semantic web technologies. That''s why I am doing it. Maybe you should take a look at Rena. Anyway, when I am done I''ll post the results here and you can use it if you wish. Regards Sean Schulte wrote:>Just a quick question, Demetrius, if you don''t mind ... what, >perchance, would be the purpose of an RDF adapter? Are you thinking >about rolling Rails into Mozilla, or XUL, in some way? I ask because I >think that would be a very interesting project. > >Perhaps what I''m thinking would be finding some way to use Rails to >interact with a database and populate a XUL frontend, rather than >HTML. Clearly that''s completely different and wouldn''t require using >an RDF database, but still, I''m interested. > >SEAN >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > >