nrdatalog2sql icon indicating copy to clipboard operation
nrdatalog2sql copied to clipboard

proposal to collaborate

Open pcarbonn opened this issue 11 years ago • 4 comments

After seeing nrdatalog2sql, I thought we might want to collaborate.

I've developped a datalog interpreter in Python, called pyDatalog, which can connect to SQL backends via SQLAlchemy. It has had some success : vanity says that it has been downloaded more 45.000 times (including all previous versions, for what it's worth). The latest version has about 10 downloads per day.

pyDatalog currently invokes the database for every query of the type aTable.anAttribute[X]==Y. It could be much faster if successive datalog literals of a body could be combined into one query. I have some ideas on how to do it, but your help would be greatly appreciated !

Thanks for considering it, and let me know.

pcarbonn avatar Apr 21 '13 19:04 pcarbonn

Thanks for interesting my work. This project is just some small scripts for my research. I am bit surprised that people are interested in it ;)

I quickly looked pyDatalog, which looks very special and certainly interesting. I will be happy to collaborate.

ghxiao avatar Apr 22 '13 09:04 ghxiao

Thanks ! I'm curious as to what your research is : feel free to share your interest with me.

Please note that pyDatalog is a free, open source development : I cannot offer anything except a chance for enjoyment. :-)

Maybe you could spend some time becoming familiar with pyDatalog ?

Next, it would be great to have a discussion on the transformation principles to use. I have found some references on stack overflowhttp://stackoverflow.com/questions/724377/prolog-to-sql-converter. In particular, this thesishttp://www.phonetik.uni-muenchen.de/institut/mitarbeiter/draxler/DraxlThs.pdfexplains some interesting principles in page 103. Then we could prioritize them, so that we start somewhere.

I could also give some explanations on the internals of pyDatalog, and where we could place some hooks to add the logic.

Any other idea ?

PC

On Mon, Apr 22, 2013 at 11:53 AM, Guohui Xiao [email protected]:

Thanks for interesting my work. This project is just some small scripts for my research. I am bit surprised that people are interested in it ;)

I quickly looked pyDatalog, which looks very special and certainly interesting. I will be happy to collaborate.

— Reply to this email directly or view it on GitHubhttps://github.com/ghxiao/nrdatalog2sql/issues/1#issuecomment-16774307 .

pcarbonn avatar Apr 22 '13 19:04 pcarbonn

Hi, I am working on query answering over Description Logic based ontology. Recently I am working on conjunctive query answering over lightweight ontology, which uses database as a backend.

Sure, I need some time to get familiar with pyDatalog and see how exactly I can contribute to the project.

The following facts might be helpful. Theoretically, conversion from datalog to SQL is not that easy, when the datalog has recursion. For example, in SQL you can not express transitive closure of a binary relation. While in datalog, you can express it easily. When datalog is restricted to non-recursive case, the conversion is easy and there are standard methods, which are implemented in my nrdatalog2sql project.

You may interest in the project DLV^DB [1], which combines Datalog and access to relational database.

[1] http://www.dlvsystem.com/dlvdb/

ghxiao avatar Apr 22 '13 20:04 ghxiao

Thanks for the interesting info. I understand your point about recursion in Datalog. I'll have a closer look at your project and at DLV^db

Best regards, Pierre

On Mon, Apr 22, 2013 at 10:01 PM, Guohui Xiao [email protected]:

Hi, I am working on query answering over Description Logic based ontology. Recently I am working on conjunctive query answering over lightweight ontology, which uses database as a backend.

Sure, I need some time to get familiar with pyDatalog and see how exactly I can contribute to the project.

The following facts might be helpful. Theoretically, conversion from datalog to SQL is not that easy, when the datalog has recursion. For example, in SQL you can not express transitive closure of a binary relation. While in datalog, you can express it easily. When datalog is restricted to non-recursive case, the conversion is easy and there are standard methods, which are implemented in my nrdatalog2sql project.

You may interest in the project DLV^DB [1], which combines Datalog and access to relational database.

[1] http://www.dlvsystem.com/dlvdb/

— Reply to this email directly or view it on GitHubhttps://github.com/ghxiao/nrdatalog2sql/issues/1#issuecomment-16819010 .

pcarbonn avatar Apr 25 '13 21:04 pcarbonn