Kingsley,
1- : the second link need a login, can I get the file without account I try
login via facebook but it fail.
2- Do you mean there is really a problem in auto generated virtuoso r2rml
or not  ???

thanks

On Thu, Dec 24, 2015 at 8:53 PM, Kingsley Idehen <kide...@openlinksw.com>
wrote:

> On 12/24/15 1:03 PM, Eng.Bassam wrote:
>
> sorry to send again, forget the attachment :D
>
> thanks again
> waiting a fix a problem
> if you want more simple example (dept & emp) it's in attachment file also,
> as you will see the file has R2RML not same as W3 example
> at http://www.w3.org/TR/r2rml/
>
> if apply the emp & dept example on virtuoso and to get RDF graph, we will
> see the emp triple has reference to department (it's right) but also the
> dept has triples for it's emloyees (wrong sure there is no key in DB from
> Dept to employee)
>
> I wish it's clear description and thanks a lot to answer me :)
>
>
> While we look into this confusing generated syntax matter, here are some
> R2RML docs used in my live RDF Views over ODBC Data Source demos [1]:
>
> [1]
> http://kidehen.blogspot.com/2015/07/conceptual-data-virtualization-across.html
> [2]
> http://kingsley.idehen.net/public_home/kidehen/Public/R2RML%20Demos/oracle_hr_rdf_views_r2rml.ttl
> -- Oracle Demo HR .
>
>
> Kingsley
>
>
>
> On Thu, Dec 24, 2015 at 5:36 PM, Kingsley Idehen <kide...@openlinksw.com>
> wrote:
>
>> On 12/23/15 11:49 PM, Eng.Bassam wrote:
>>
>> Mr. Kingsley
>> another description about my confusing :) :
>>
>> the parent table here in my example is Patient which has ID primary Key
>> the child table is the Diagnoses which has foreign key is Patient ID
>>
>> now the R2RML must make a join condition to link child table (Diagnoses)
>> with it's parent (Patient)
>> the condition is in sql ( Diagnoses,PatientID = Patient.ID)
>>
>> but in generated R2RML by virtuoso is make the child -->parent and make
>> parent-->child
>>
>>
>> We have a issue that we need fix here as the generated R2RML shouldn't be
>> confusing, which is the case right now.
>>
>> The issue is being looked into.
>>
>> Kingsley
>>
>> rr:joinCondition [ r*r:child "ID" ; rr:parent "PatientID" *] ; ]; ]
>> i.e I think the generated r2rml must be opposite:
>> rr:child "PatientID" --- not ID
>> rr:parent "ID" ---- not PatientID
>> because the PatientID is a column in child table(diagnoses) and ID is a
>> column in Parent table (Patient).
>> right???
>> this what I have understood from
>> <http://www.w3.org/TR/r2rml/#example-fk>
>> http://www.w3.org/TR/r2rml/#example-fk
>>
>> sorry again about long questions and thanks :)
>>
>>
>>
>>
>> On Wed, Dec 23, 2015 at 10:33 PM, Kingsley Idehen <
>> <kide...@openlinksw.com>kide...@openlinksw.com> wrote:
>>
>>> On 12/23/15 2:59 PM, Eng.Bassam wrote:
>>>
>>> yes Kingsley
>>> to be my question more clear :)
>>>
>>> Patient (ID, name, country....) -- ID is PK
>>> Diagnose (DiagnosesID, DiseaseID, PatientID,....) DiagnosesID is PK ,
>>> PatientID is FK to patient table
>>>
>>> the r2rml is
>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant
>>> DB:patient_of_diagnoses ] ; rr:objectMap [ rr:parentTriplesMap
>>> <#TriplesMapDiagnoses>;  rr:joinCondition [ r*r:child "ID" ; rr:parent
>>> "PatientID" *] ; ]; ]
>>>
>>> I understand the patient is parent and the diagnose is child
>>> but In r2rml I have noted the opposite make ID column in patient table
>>> is child (r*r:child "ID"*) and make the PatientID Fk in diagnose is
>>> parent (*rr:parent "PatientID"*)
>>> I don't know if I have misunderstood of this syntax
>>> wish it's clear and thanks again :)
>>>
>>> The product of Patient..ID and Diagnose..ParentID will produce a
>>> projection of the records that constitute the parent/child relation. That's
>>> what's important i.e., rr:child "ID" and rr:parent "PatientID" clearly
>>> identified for use in SQL join.
>>>
>>> If the projection from the query join is incorrect, then we have a
>>> problem.
>>>
>>> Kingsley
>>>
>>>
>>> On Wed, Dec 23, 2015 at 9:49 PM, Kingsley Idehen <
>>> <kide...@openlinksw.com>kide...@openlinksw.com> wrote:
>>>
>>>> On 12/23/15 9:51 AM, Eng.Bassam wrote:
>>>>
>>>> Hi
>>>> I'm wonder about child parent in rr:joinCondition in R2RML generated by
>>>> virtuoso, suppose I have tow tables patient and Diagnose
>>>>
>>>> Patient (ID, name, country....) -- ID is PK
>>>> Diagnose (DiagnosesID, DiseaseID, PatientID,....) DiagnosesID is PK ,
>>>> PatientID is FK to patient table
>>>>
>>>> I have imported the tow tables by virtuoso wizard and it generate to me
>>>> R2RML
>>>>
>>>> <#TriplesMapDiagnoses> a rr:TriplesMap; rr:logicalTable [
>>>> rr:tableSchema "emr" ; rr:tableOwner "emr-ODBC" ; rr:tableName "Diagnoses"
>>>> ];
>>>> rr:subjectMap [ rr:termType rr:IRI  ; rr:template "
>>>> <http://localhost:8890/emr/diagnoses/DiagnosesID=>
>>>> http://localhost:8890/emr/diagnoses/DiagnosesID={DiagnosesID}";;
>>>> rr:class DB:Diagnoses; rr:graph < <http://localhost:8890/DB#>
>>>> http://localhost:8890/DB#> ];
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant DB:diagnosesid ]
>>>> ; rr:objectMap [ rr:column "DiagnosesID" ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant
>>>> DB:diagnoses_has_disease ] ; rr:objectMap [ rr:termType rr:IRI ;
>>>> rr:template " <http://localhost:8890/emr/disease/DiseaseID=>
>>>> http://localhost:8890/emr/disease/DiseaseID={DiseaseID}"; ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant
>>>> DB:diagnoses_has_patient ] ; rr:objectMap [ rr:termType rr:IRI ;
>>>> rr:template " <http://localhost:8890/emr/patient/PatientID=>
>>>> http://localhost:8890/emr/patient/PatientID={PatientID}"; ]; ] .
>>>>
>>>> --patient
>>>> <#TriplesMapPatient> a rr:TriplesMap; rr:logicalTable [ rr:tableSchema
>>>> "emr" ; rr:tableOwner "emr-ODBC" ; rr:tableName "Patient" ];
>>>> rr:subjectMap [ rr:termType rr:IRI  ; rr:template "
>>>> <http://localhost:8890/emr/patient/ID=>
>>>> http://localhost:8890/emr/patient/ID={ID}";; rr:class DB:Patient;
>>>> rr:graph < <http://localhost:8890/DB#>http://localhost:8890/DB#> ];
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant DB:id ] ;
>>>> rr:objectMap [ rr:column "ID" ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant DB:firstname ] ;
>>>> rr:objectMap [ rr:column "FirstName" ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant DB:dead ] ;
>>>> rr:objectMap [ rr:column "Dead" ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant DB:dead_date ] ;
>>>> rr:objectMap [ rr:column "Dead_Date" ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant
>>>> DB:patient_has_disease ] ; rr:objectMap [ rr:termType rr:IRI ; rr:template 
>>>> "
>>>> <http://localhost:8890/emr/disease/Cause_Dead=>
>>>> http://localhost:8890/emr/disease/Cause_Dead={Cause_Dead}"; ]; ] ;
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant
>>>> DB:patient_of_diagnoses ] ; rr:objectMap [ rr:parentTriplesMap
>>>> <#TriplesMapDiagnoses>;  rr:joinCondition [ r*r:child "ID" ; rr:parent
>>>> "PatientID" *] ; ]; ] .
>>>>
>>>> the file R2RML attached also by this mail
>>>>
>>>>
>>>>
>>>> Given:
>>>>
>>>> Patient (ID, name, country....) -- ID is PK
>>>> Diagnose (DiagnosesID, DiseaseID, PatientID,....) DiagnosesID is PK ,
>>>> PatientID is FK to patient table
>>>>
>>>> Diagnose is the child while Patient is the parent i.e., one Patient
>>>> Table Record uniquely identified by ID (the PK) is associated with many
>>>> records in Diagnose Table with PatientID as FK.
>>>>
>>>> Hence:
>>>>
>>>> rr:predicateObjectMap [ rr:predicateMap [ rr:constant
>>>> DB:patient_of_diagnoses ] ; rr:objectMap [ rr:parentTriplesMap
>>>> <#TriplesMapDiagnoses>;  rr:joinCondition [ r*r:child "ID" ; rr:parent
>>>> "PatientID" *] ; ]; ]
>>>>
>>>>
>>>> Kingsley
>>>>
>>>>
>>>>
>>>> I want understand why the output R2RML in patient make the child is
>>>> patient and parent is dianoses.?????
>>>> diagnoses table it is has FK so I thinks it is a child and Patient it
>>>> 's a parent, opposite to output !!!
>>>> -----------------------------------
>>>> > Eng.Bassam Najeeb.
>>>> >Software Engineer.
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Virtuoso-users mailing 
>>>> listVirtuoso-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Kingsley Idehen    
>>>> Founder & CEO
>>>> OpenLink Software
>>>> Company Web: http://www.openlinksw.com
>>>> Personal Weblog 1: http://kidehen.blogspot.com
>>>> Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
>>>> Twitter Profile: https://twitter.com/kidehen
>>>> Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
>>>> LinkedIn Profile: http://www.linkedin.com/in/kidehen
>>>> Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Virtuoso-users mailing list
>>>> Virtuoso-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>>>
>>>>
>>>
>>>
>>> --
>>> -----------------------------------
>>> > Eng.Bassam Najeeb.
>>> >Software Engineer.
>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> Kingsley Idehen     
>>> Founder & CEO
>>> OpenLink Software
>>> Company Web: http://www.openlinksw.com
>>> Personal Weblog 1: http://kidehen.blogspot.com
>>> Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
>>> Twitter Profile: https://twitter.com/kidehen
>>> Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
>>> LinkedIn Profile: http://www.linkedin.com/in/kidehen
>>> Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
>>>
>>>
>>
>>
>> --
>> -----------------------------------
>> > Eng.Bassam Najeeb.
>> >Software Engineer.
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> Virtuoso-users mailing 
>> listVirtuoso-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>
>>
>> --
>> Regards,
>>
>> Kingsley Idehen      
>> Founder & CEO
>> OpenLink Software
>> Company Web: http://www.openlinksw.com
>> Personal Weblog 1: http://kidehen.blogspot.com
>> Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
>> Twitter Profile: https://twitter.com/kidehen
>> Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
>> LinkedIn Profile: http://www.linkedin.com/in/kidehen
>> Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>
>
>
> --
> -----------------------------------
> > Eng.Bassam Najeeb.
> >Software Engineer.
>
>
>
> --
> Regards,
>
> Kingsley Idehen       
> Founder & CEO
> OpenLink Software
> Company Web: http://www.openlinksw.com
> Personal Weblog 1: http://kidehen.blogspot.com
> Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
> Twitter Profile: https://twitter.com/kidehen
> Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
> LinkedIn Profile: http://www.linkedin.com/in/kidehen
> Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
>
>


-- 
-----------------------------------
> Eng.Bassam Najeeb.
>Software Engineer.
------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to