1 / 15

ΗΥ-566 ΔΙΑΧΕΙΡΙΣΗ ΓΝΩΣΗΣ ΣΤΟ ΔΙΑΔΙΚΤΥΟ Ασκηση 1

ΗΥ-566 ΔΙΑΧΕΙΡΙΣΗ ΓΝΩΣΗΣ ΣΤΟ ΔΙΑΔΙΚΤΥΟ Ασκηση 1. Πεδρο, Κατη και Μπεριτ Ελενη. The zoo ontology. Description and diagram of the domain. RDFS. RDF Data. RQL Queries. Description and diagram. . diagrams_and_concepts.pdf. Description and diagram II. RDFS (1 of 4).

reece
Download Presentation

ΗΥ-566 ΔΙΑΧΕΙΡΙΣΗ ΓΝΩΣΗΣ ΣΤΟ ΔΙΑΔΙΚΤΥΟ Ασκηση 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ΗΥ-566ΔΙΑΧΕΙΡΙΣΗ ΓΝΩΣΗΣ ΣΤΟ ΔΙΑΔΙΚΤΥΟΑσκηση 1 Πεδρο, Κατη και Μπεριτ Ελενη

  2. The zoo ontology • Description and diagram of the domain. • RDFS. • RDF Data. • RQL Queries.

  3. Description and diagram • .diagrams_and_concepts.pdf

  4. Description and diagram II

  5. RDFS (1 of 4) <rdfs:Class rdf:ID="Person"> <rdfs:comment>The class of all the persons.</rdfs:comment> </rdfs:Class> <rdf:Property rdf:ID="firstName"> <rdfs:comment>Implemets the first name of Person.</rdfs:comment> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf- schema#Literal"/> </rdf:Property> <rdf:Property rdf:ID="telephoneNumber"> <rdfs:comment>Person's phone number.</rdfs:comment> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> </rdf:Property>

  6. RDFS (2 of 4) <rdfs:Class rdf:ID="Employee"> <rdfs:comment> The class of Employee is a subclass ofPerson </rdfs:comment> <rdfs:subClassOf rdf:resource="#Person"/> </rdfs:Class> <rdf:Property rdf:ID="EmployeeID"> <rdfs:comment>The id for the Employee.</rdfs:comment> <rdfs:domain rdf:resource="#Employee"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> </rdf:Property>

  7. RDFS (3 of 4) <rdfs:Class rdf:ID="AnimalWorker"> <rdfs:comment> The class AnimalWorker is a sublass of Employee </rdfs:comment> <rdfs:subClassOf rdf:resource="#Employee"/> </rdfs:Class> <rdfs:Class rdf:ID="Animal"> <rdfs:comment>This is the class of the Animals.</rdfs:comment> </rdfs:Class> <rdfs:Class rdf:ID="Cage"> <rdfs:comment> The class of all the Cages for the Animals </rdfs:comment> </rdfs:Class>

  8. RDFS (4 of 4) <rdf:Property rdf:ID="takesCareOf"> <rdfs:comment>Property which makes a relation between an AnimalWorker and an Animal. An AnimalWorker can take care of one or more Animals.</rdfs:comment> <rdfs:domain rdf:resource="#AnimalWorker"/> <rdfs:range rdf:resource="#Animal"/> </rdf:Property> <rdf:Property rdf:ID="cleans"> <rdfs:comment>Property which makes a relation between an AnimalWorker and a Cage. An AnimalWorker can clean one or more Cages.</rdfs:comment> <rdfs:domain rdf:resource="#AnimalWorker"/> <rdfs:range rdf:resource="#Cage"/> </rdf:Property> <rdf:Property rdf:ID="livesIn"> <rdfs:comment>Property which makes a relation between an Animal and a Cage. One Animal lives in one Cage.</rdfs:comment> <rdfs:domain rdf:resource="#Animal"/> <rdfs:range rdf:resource="#Cage"/> </rdf:Property>

  9. RDF Data (1 of 3) <rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:zoo="myZoo"> <zoo:Cage rdf:ID="cage2" zoo:cageID="002" zoo:size="10x10x10" zoo:buildingDate="12/12/2000" /> <zoo:AnimalWorker zoo:firstName="Janis" zoo:lastName="Halkiadakis" zoo:telephoneNumber="123456789" zoo:addressStreet="Dimokratias 22" zoo:addressCity="Iraklion" zoo:addressCountry="Greece" zoo:dateOfBirth="21/11/71" zoo:sex="male"

  10. RDF Data (2 of 3) zoo:employeeID="0004" zoo:salary="1000" zoo:absentDays="44" zoo:hiredDate="12/12/2000" zoo:contractType="Full time" zoo:specialization="land" zoo:freeDay="Tuesday" zoo:animalPreferences="cats“> <zoo:cleans rdf:resource="#cage1“/> <zoo:belongsTo rdf:resource="#dept3“/> <zoo:takesCareOfrdf:resource="#animal1“/> </zoo:AnimalWorker>

  11. RDF Data (3 of 3) <zoo:WaterAnimal rdf:ID="animal2“ zoo:animalID="0002" zoo:latinName="Fishus" zoo:englishName="Fish" zoo:birthDate="12/12/2001" zoo:length="1m" zoo:weight="8kg" zoo:height="10cm" zoo:arrivalDate="12/12/2001" zoo:plantEater="yes" zoo:threatened="no" zoo:dailyFoodAmount="1kg" zoo:temperature="33" zoo:poisonous="no" zoo:saltPercentageInWater=“3" zoo:minVolumeInWater="90“> <zoo:livesIn rdf:resource="#cage2“/> </zoo:WaterAnimal>

  12. RQL (1 of 4) -Find english name of all animals who are threatened: select N from Animal{X}, {Y}englishName{N}, {Z}threatened{P} where X=Y and X=Z and P="true" -Find first and last name of all animal workers who takes care of poisonous animals: select F,L from AnimalWorker{X}, {Y}firstName{F}, {Z}lastName{L}, AnimalWorker{S}.takesCareOf{T}, {U}poisonous{V} where X=Y and X=Z and X=S and T=U and V="true"

  13. RQL (2 of 4) -Find first name, last name and telephone number of employees more than 5 absent days: select F,L,PH from Employee{X}, {Y}firstName{F}, {Z}lastName{L}, {U}telephoneNumber{PH}, {V}absentDays{W} where X=Y and X=Z and X=U and X=V and W>5 -Find all classes: Class

  14. RQL (3 of 4) -Find the animal workers (first and last name), and the animals (animal ID) they take care of: select F,L,AID from AnimalWorker{X}.takesCareOf{Y}, {V}firstName{F}, {W}lastName{L}, {U}animalID{AID} where Y=U and X=V and X=W - Find which animal (animal ID) lives in the cage with id="cage1": select AID from Animal{X}.livesIn{Y}, {Z}cageID{W}, {U}animalID{AID} where Y=Z and W="cage1“ and X=U

  15. RQL (4 of 4) - The employees (first and last name) who works in the department with id="01": select F,L from Employee{X}, {U}belongsTo{B}, {Z}deptID{W},{V}firstName{F}, {S}lastName{L} where X=U and B=Z and W="01 and V=X and S=X - Find the english name for the animal which is taken care of by the animal worker with ID=“0001" select N from animal{A}.isTreatedBy{W}, {C}englishName{N}, {W}employeeID{X} where X=“0001" and A=C

More Related