[Nepomuk] Re: First problems with query API

Ignacio Serantes kde at aynoa.net
Thu Mar 3 22:03:24 CET 2011

On Thu, Mar 3, 2011 at 8:22 PM, Sebastian Trüg <trueg at kde.org> wrote:

> >
> > When you told me that I must use the API, I did a try and found this
> > problem. You can't add a class with a constructor that supports 6 terms
> > but if you use it you crash DBMS or, when you use more than 3 terms dbms
> > freezes, at least with my data. I don't need to explain you the reasons
> > why this kind of stuff must be controlled at API level ;).
> There is not only LiteralTerm. You can combine all sorts of terms with
> AndTerm. And only because it is possible to create a crazy query this
> way does not mean it needs to be removed completely.

Not removed, but controlled. As I told you there is a constructor with 6
terms so is easy to guess that you can add 6 terms without problem and this
is not true.

A basic control is easy to implement. For example, if you need to generate
30 variables to construct the query probably the query execution will kill
the dbms. It's so simple put this control and, if developers whats to use
this queries they must add and additional parameter.

This kind of control is easily override but it's useful to stop bad, not
tested code and, commonly, developer mistakes. With this additional security
check bad programs will obtain empty results and an error but, the important
is that virtuoso is safe.

> > By the way, as always I need to do more tests, understand how db is
> > organised and where users need to do a search before I obtain
> > conclusions that could be useful to you but, sadly, I'm very short in
> > free time and Ksoprano is useful but annoying. I think I must write my
> > own tool to work with sparql and be more productive.
> Give Nepomukshell a try and please, before you write your own tool,
> consider contributing to that or at least tell us what needs to be
> improved.
> I did it but is worst to me than ksoprano. These are the requirements that
Nepomukshell don't cover:
1) Error handling. I do a mistake but no error is displayed so is difficult
to wonder what is happening and this is a big problem if you are trying to
learn Sparql. This is the main reasons why I choose Ksoprano.
2) Load and save queries.
3) Load and save sessions or, at least, last session. I can finish a session
perfectly with over 20 different queries opened so I need to manually save
all to next day.
3) Before and after are confusing, and I have many queries opened at same
time. I'm a tab guy and the other reason I'm using Ksoprano.
4) Batch testing and test substitution to test the same query with different
terms. I'm doing this with a text file with all queries I want to test and
an python script but is far to be comfortably.

by the way, syntax coloring and auto-completion are really cool :). As you
can see my requirements are very specific and probably outside the scope of
the Nepomuk Shell. But I confess you that even for other stuff I prefer
Ginkgo over Nepomuk Shell. I'm really comfortably with Ginkgo interface and
remembers my last session.

Of course I would be happy to contribute whatever I can to Nepomuk, I like
very much some aspects of this project, and I really want that works because
I'm trying to using it for long time ago, but I'm not interested in learn
C/C++ and even less in develop in it. I never have any pleasure writing
C/C++ code and I'm doing this as a hobby in my free time. With pleasure I
will try to contribute with sparql knowledge, when I have knowledge to
share, or contributing with Python, Ruby, Lua or any high level language you
can imagine.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20110303/0338aa61/attachment.htm 

More information about the Nepomuk mailing list