"If you are only interested in running SPARQL, nor want to annotate triples, using managed triples makes most sense."
Why does it make the most sense? What is the advantage of doing it this way? "If you are using document data as well, then you could still consider not embedding them in the docs." How do I include document data without embedding the triple in a document? "A second option could be to store the triples in document properties, instead of the body. Consider using a triples property that has an array-node with triple objects." I did notice before I went to bed last night that the example of embedded triples in an xml doc on the MarkLogic documents was displayed inside a 'triples' object. I guess I haven't really found a strong advantage to using managed triples, which it seems like there should be (why do they call them managed anyway?), but I'm still not sure that I like that I have to strip my triples out of my document every time so the end user does not see them or that I have to update the document just to update the triple (I wanted to use Document Library Services to store changes to documents, but I did not want to store a new version every time a triple was added, edited, or deleted so the embedded triples seem like it will take more code to do that). On Wed, Nov 18, 2015, 3:35 AM Geert Josten <[email protected]> wrote: > Hi Robert, > > If you are only interested in running SPARQL, nor want to annotate > triples, using managed triples makes most sense. If you are using document > data as well, then you could still consider not embedding them in the docs. > A second option could be to store the triples in document properties, > instead of the body. > > I don’t think there are performance implications. The triple index will be > equally fast, and I have not heard that ingest speed of the triples will be > different because of this. I think it mostly comes down to what helps your > application best, which solution to select. > > Regarding node-replace, that sounds like you are working with triple data > embedded in json. Consider using a triples property that has an array-node > with triple objects.. > > Kind regards, > Geert > > From: <[email protected]> on behalf of "Robert Del > Toro Jr." <[email protected]> > Reply-To: MarkLogic Developer Discussion <[email protected]> > Date: Wednesday, November 18, 2015 at 7:21 AM > To: "[email protected]" <[email protected]> > Subject: [MarkLogic Dev General] Managed vs Unmanaged Triples > > Could someone please explain the pros and cons of using managed vs > unmanaged triples? I understand that with managed triples, I can update or > delete the triple without having to update the document, and with unmanaged > triples I can include extra information that I could then search with, > however, when trying to use triples stored in my documents I seem to run > into complications. For instance, when I try to read my document from an > API, my triples come with it. So in order to ensure that the user does not > have access to the triples, I have to use a transform with every request to > remove the triples. Also, when trying to update a document with more than > one embedded triple using '*xdmp:node-replace*', I get the error > '*XDMP-CHILDDUPNAME: > Object nodes cannot have two children with the same name*'. I'm assuming > because I have multiple nodes with the name 'triple'. Since using managed > triples removes the ability to add meta-data to the triples, what are the > advantages? (Speed?) > > Robert > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
