0

in ontology A I have a class Person with dataproperty hasName and store some data against it:

<person> hasName "Joe Common" .
 and a class Vehicle with a hasVINnr;
<vehicle> hasVINnr "12345" .

In ontology B I have class Parking_ticket and in this I would like to reference the A:Person and A:Vehicle's dataproperties like:

<parking_ticket> hasVehicleOwner A:<person>.hasName .
<parking_ticket> hasVehicleVIN   A:<vehicle>.hasVINnr .

I.e. I want the new class parking_ticket's dataproperties to "linkto" "pointto" the actual entities data in the ontology A. Like you would do in assebly lang by storing the addressOf for the storage in the parking ticket rather than duplicating the data. This means that when <person>.hasName is updated the <parking_ticket>.hasVehicleOwner data is automatically correct. Is this possible? How can I avoid duplicating the data in parking_ticket and assoc problems? When selecting on the parking_ticket I would like to see the values it points to.

  • I don't get the question nor do I understand how you use your current RDF data? What is the purpose of the SPARQL tag? – UninformedUser Dec 28 '21 at 18:52
  • In general, why would you assign the person's name to the parking ticket? Why not just the person URI? Whenever you change the persons name, the result of a SPARQL query would then just get the most recent name for the ticket. I mean, you just modify the RDF triple with the name, this would not need to rewrite the SPARQL query to get the name of the perosn assigned to the parking ticket. – UninformedUser Dec 28 '21 at 18:53
  • Hello, many thanks for taking the time to answer. The purpose of the SPARQL tag is to indicate that it would be interesting to see a select statement for whatever solution is proposed. I currently use the RDF data to register vehicles and persons. I want to write an app to handle parking tickets using the person and vehicle but not duplicate the data stored against the person and vehicle. Yes, it is of course perfectly possible to link the person and the vehicle through an objectproperty. – RodentOfUnusualSize Dec 30 '21 at 08:32
  • This is what you would do if the purpose was analytical and you were exploring the data. However, when writing a parking ticket app it would be much easier to just ask for all data properties of the ticket and print those out. That way you would not need to understand the vehicle and person properties. The question is general, how to compose new classes with existing classes' data properties. – RodentOfUnusualSize Dec 30 '21 at 08:41
  • "...That way you would not need to understand the vehicle and person properties. The question is general, how to compose new classes with existing classes' data properties." This is exactly what you _don't_ want to do with RDF! you _do_ want to link up Tickets Cars, Persons etc and then traverse the graph from Ticket to, say, Person and then get all the Person information as needed, just as UninformedUser says. If you "compose new classes with existing classes' data properties" you are doing everything RDF was set up to avoid, i.e. duplicative, un-authoratitive data – Nicholas Car Jan 08 '22 at 13:19
  • Many thanks for your reply. I must be communicating the question very badly so I will try again. The purpose is to NOT duplicate any data. I am also using sem tech for all the good reasons you say but for analytical/EA purposes. For application purposes I do NOT want to traverse the whole graph but simply make a list of the things to print on the ticket. What I don't want to do is to hardcode an algorithm that first retrieves the Person, then retrieves some hardcoded properties from it. This becomes like a PL/SQL solution which we all know where it ends. How can I compose this in the graph? – RodentOfUnusualSize Jan 09 '22 at 16:07

0 Answers0