Channel #semsol: Logs

This is a public chat log generated from the #semsol IRC channel.

11:33:17 webholics: do you plan to integrate "typed node elements" into the rdf serializer?
11:33:44 webholics: you can find an example of it under http://www.w3.org/TR/rdf-syntax-grammar
11:33:51 webholics: 2.13 Typed Node Elements
11:34:16 webholics: this would be much more human readable than the rdf:Description tags
11:51:37 bengee: not planned for now
11:53:35 bengee: wouldn't be hard to tweak, but it's not really a priority
11:59:48 bengee: I've put them on my todo list for the release candidate
12:08:39 elbart: yes your right this isn't too important for now, but it would be a nice feature
12:09:18 elbart: did you read the mail in the mailing list about this bug with GRAPH and OPTION?
12:16:08 bengee: no, not yet
16:17:56 elbart: if I delete a triple with "DELETE ..." it is not removed in the mysql database
16:18:42 elbart: do I understand it right that every 50th LOAD or DELETE query the function optimizeTables() does this for me?
16:19:18 bengee: yes
16:19:41 bengee: the DELETE only removes the graph2triple relation, IIRC
16:22:26 elbart: ok great
16:27:36 elbart: I'm testing this right at the moment
16:27:54 elbart: but unfortunately the s2val table doesn't get cleared
16:28:27 elbart: the other tables also
16:28:49 bengee: yes, the val-tables remember values and ids
16:29:27 elbart: but isn't this a problem when the store is growing bigger and bigger?
16:29:50 bengee: is it for you?
16:30:13 elbart: I'm not sure, but maybe in the future
16:30:27 bengee: then let's talk in the future ;)
16:30:28 elbart: I want to load and delete lots of foaf profiles
16:30:58 bengee: should this become a problem, I'll add a cleanup method
16:31:13 elbart: but what is the benefit from rembering those values?
16:31:47 bengee: better performance
16:32:04 elbart: k
16:32:10 elbart: thx
16:33:07 bengee: you can use DUMP + LOAD to create a clean copy of a store
16:33:26 elbart: ok thank you, I'll try that
16:34:34 bengee: it's mostly the o2val tables that can bloat up
16:35:25 elbart: yes absolutely
16:35:40 bengee: e.g. when you use a store to manage sessions, where each request sets a new "last_contact" or somesuch
16:36:22 bengee: if you run into issues, ping me and I'll extend the cleanTableReferences method
16:36:48 elbart: I'm writing a foaf browser, everytime the user want so see a profile it is LOADED, so over the time this could really bloat up the database
16:36:54 elbart: ok
16:37:11 elbart: I'm still in development, so we'll wait ;)
16:37:17 bengee: ;)
16:37:57 bengee: I see
18:48:34 peterdm: hey bengee.
18:48:43 bengee: heya
18:49:19 peterdm: wondering if there's a facility to rename a named graph within a store... I don't think SPARUL supports this.
18:49:42 peterdm: in ARC of course.
18:53:14 peterdm: I can probably just do this by deleting and re-inserting graphs under a new name, but there must be a more efficient way to go about it. (or am I going about this wrong?)
18:53:21 bengee: not in a single command, I think.
18:54:05 bengee: you can do INSERT INTO <new> { ?s ?p ?o } FROM <old> WHERE {?s ?p ?o}
18:54:24 bengee: and then DELETE FROM <old>
18:56:09 peterdm: right. okay, I'll handle it that way. but I was surprised not to see a RENAME in the SPARUL spec. I think in ARCs datamodel this would be fairly trivial, right?
18:56:47 bengee: probably yes
19:00:27 bengee: something like RENAME <URI1> to <URI2> would be nice
19:00:41 bengee: then we could implement resource consolidation more easily
19:01:20 peterdm: oh, a more general RENAME, I see.
19:02:40 peterdm: I'm trying to so something quasi-transactional. E.g. Load a graph under a temporary name, tweak it a bit, and then 'commit' it under it's permanent name (maybe even overwriting a previous one).
19:04:21 bengee: or SET { <#me> ?p ?o } WHERE { ?some_id ?ifp ?o . <#me> ?ifp ?o . ?ifp a owl:InverseFunctionalProperty .}
19:04:28 bengee: hmmm
19:05:21 bengee: that'd be tricky to implement, though, I guess
19:06:04 bengee: I see, re graph pre-processing.
19:06:16 bengee: I have similar problems here, too
19:07:09 bengee: didn't find an ideal solutions yet, was thinking about a fully separate "inbox" store, but for now I'm adding annotations to to graphs to "flag" them as processed
19:07:55 bengee: e.g. I'm adding inferred triples directly to g1, so when g1 gets re-LOADed, the annotations are gone as well
19:08:16 bengee: and the inference bot will re-add them based on the new graph data
19:08:57 bengee: which has limitations, though
19:13:18 peterdm: yes. I'd prefer that the incoming graph stay within it's own 'graph-space' while it was being pre-processed. Then, once that completed, I could insert (or replace an earlier version) in a permanent graph-name.
19:13:37 bengee: yeah, makes sense
19:15:41 peterdm: I can certainly do that with LOAD <prepro>, ...tweak..., DELETE <main>, INSERT INTO <main> FROM <prepro>
19:16:14 peterdm: but the post-tweaking step could be a lot more efficient if it didn't involve reloading a graph.
19:16:52 bengee: right
19:17:18 bengee: and you don't want to DELETE first for some quasi-transactional safety
19:17:47 bengee: any syntax suggestions?
19:18:25 bengee: MOVE GRAPH <a> TO <b>
19:19:00 bengee: REPLACE <a> WITH <b>
19:19:21 bengee: REPLACE GRAPH <a> WITH <b>
19:19:47 bengee: then I should perhaps align SPARQL+ with SPARUL and use INSERT INTO GRAPH instead of INSERT INTO
19:21:50 bengee: RESET GRAPH <a> FROM <b>
19:22:23 bengee: CREATE GRAPH <a> FROM <b>
19:25:50 bengee: bengee wonders if there's a simple UPDATE for triples, too, in there
19:27:32 peterdm: right, the idea would be to keep <main> alive in it's old state until the new one was done preprocessing.
19:27:47 peterdm: ...and then replace it.
19:28:03 bengee: UPDATE <g1> {?s ?p ?o} WHERE { GRAPH <?g2> { ?s ?p ?o }}
19:34:29 peterdm: Seems like there was a concerted effort to keep the UPDATE keyword out of the SPARUL spec. I think sticking to INSERT/DELETE simplifies a lot of implementation issues.
19:34:50 bengee: oh, really?
19:35:00 peterdm: just guessing.
19:35:09 bengee: I've had requests for an UPDATE to bundle DELETE+INSERT
19:35:31 peterdm: it would be nice to have it happen within the same transaction.
19:35:54 bengee: UPDATE in the SQL sense (SET VALUES(?binding1, ?binding2)) would be very hard to implement
19:36:15 bengee: but a triple- or quad-based UPDATE could be doable
19:36:20 peterdm: right, especially if the object being updated was a uri.
19:37:19 bengee: UPDATE <g1> SET {<s> <p> "new o"} WHERE {<s> <p> "old_o"}
19:37:29 bengee: shouldn't be hard
19:38:09 bengee: I wonder if this could be tweaked to also cover your use case
19:38:16 peterdm: right, but what it "new o" is a uri or bnode, do you need to check to make sure it exists?.... (for literals would be easy).
19:38:57 peterdm: well the graph-name is a special case, right? it's not accessible as a triple... or is it?
19:40:19 bengee: UPDATE <g1> SET { ?s ?p ?o } FROM <g2> WHERE {?s ?p ?o}
19:41:23 bengee: but intuitively, this wouldn't clear g1 in advance but just add the triples from g2
19:41:38 peterdm: right: "insert every ?s ?p ?o from <g2> into <g1>?"
19:42:09 bengee: UPDATE <g1> SET * FROM <g2>
19:42:32 bengee: not sure
19:42:49 peterdm: maybe. but from a SQL background, UPDATE shouldn't ever delete anything.
19:43:04 peterdm: (any triples that is)
19:43:08 bengee: true
19:43:24 bengee: then maybe a dedicated REPLACE might be beter
19:43:49 peterdm: well if it's dedicated, I'd vote for RENAME GRAPH
19:44:04 peterdm: but if you want something generic for renaming predicates, REPLACE could work.
19:44:35 peterdm: sorry, subjects.
19:44:36 bengee: RENAME GRAPH makes sense
19:45:17 bengee: a generic REPLACE might have side-effects (with graph URIs appearing as subjects, too, etc)
19:45:49 bengee: so, RENAME GRAPH <g1> TO <g2>
19:45:54 peterdm: sure.
19:46:14 bengee: which would replace a prior g2
19:46:51 peterdm: Hmm. Should that be specific?
19:49:13 bengee: REPLACE <g1> WITH <g2> / REPLACE <g1> WITH {triples here}
19:49:27 bengee: would be pretty obvious, I think
19:49:49 peterdm: right, and it would create <g2> if it didn't already exist?
19:49:56 bengee: yes
19:50:14 bengee: s/g2/g1/
19:50:33 peterdm: right.
19:52:50 peterdm: it might work for your consolidation issues too. you just want to be able to replace <predicate a> with <predicate b>? throughout a the graph?
19:53:19 bengee: rather a subject with some canonical one
19:53:38 peterdm: sorry: s/predicate/subject/
19:53:45 bengee: yep
19:54:11 peterdm: don't know why predicate keeps slipping out... it's just so fun to say.
19:54:16 bengee: heh
19:55:01 peterdm: so then:
19:55:11 peterdm: REPLACE <s1> WITH <s2> FROM NAMED <g>
19:55:15 peterdm: or
19:55:52 peterdm: REPLACE GRAPH <g1> WITH <g2> / REPLACE GRAPH <g1> WITH {triples here}
19:55:54 peterdm: ?
19:57:34 bengee: dunno ;)
19:57:41 peterdm: just a thought.
19:58:49 bengee: hey, what about SET <g1> TO <g2>
19:59:23 bengee: the we don't have the existence issue implied by REPLACE
19:59:34 bengee: s/the we/then we/
20:00:00 peterdm: sure.
20:01:13 bengee: will think about this a little
20:01:19 peterdm: whatever makes the most sense.
20:01:45 peterdm: I'll press on with LOAD, tweak, DELETE, INSERT INTO
20:01:48 bengee: yeah, maybe best to implement *something* first instead of losing time over naming
20:02:02 peterdm: true.
20:02:54 bengee: I'll prolly end up with RENAME GRAPH anyway
20:02:58 peterdm: ;-)
20:04:35 peterdm: nice chatting with you. I'll keep an eye on semsol.org in case you decide to implement something. Thanks for helping me think about my problem.
20:05:23 bengee: likewise, thx for the input
20:05:53 peterdm: np. ttyl.