It is not only safe, but completely normal and used much, much more
frequently than solution 1. Remember, RDF is a graph, so you can
connect resource nodes however you like.

Collection could be useful here if you want to maintain the ordering
of Paragraphs in a Document.

On Thu, Sep 22, 2016 at 2:14 PM, Laurent Rucquoy
<laurent.rucq...@telemis.com> wrote:
> I have a "Document" resource which could contain many "Paragraph" resources.
> A same "Paragraph" resource could also be contained by different "Document"
> resources.
>
> What is the most relevant model to translate such a case in RDF ?
> I have two solutions:
>
> Solution 1 (using RDF collections)
> [Document_A] --contains--> ( [Paragraph_1], [Paragraph_2] )
> [Document_B] --contains--> ( [Paragraph_2] )
>
> or
>
> Solution 2 (defining the same predicate several times on the same subject)
> [Document_A] --contains--> [Paragraph_1]
> [Document_A] --contains--> [Paragraph_2]
> [Document_B] --contains--> [Paragraph_2]
>
>
> I think that the Solution 1 requires complex and resource-consuming SPARQL
> update.
> So to keep it simple, I would choose the Solution 2. But, I don't know if
> it's safe and if it's a good practice to define the same predicate several
> times on the same subject ?
>
> Thank you in advance for your help.
>
> Regards,
> Laurent

Reply via email to