Mai Văn Trí b19dccn688
Mai Văn Trí b19dccn688
Mai Văn Trí b19dccn688
+Lược đồ RDF:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.ptit.edu.vn/profile">
<rdf:Property rdf:ID="has_name">
<rdfs:domain rdfs:Resource="#Person" />
<rdfs:domain rdfs:Resource="#Course" />
<rdfs:range rdfs:Resource="#Literal" />
</rdf:Property>
<rdf:Property rdf:ID="has_students">
<rdfs:domain rdfs:Resource="#Course" />
<rdfs:range rdfs:Resource="#Student" />
</rdf:Property>
<rdf:Property rdf:ID="has_teacher">
<rdfs:domain rdfs:Resource="#Course" />
<rdfs:range rdfs:Resource="#Teacher" />
</rdf:Property>
</rdf:RDF>
+Ví dụ:
<?xml version="1.0" encoding="UTF-8"?>
<Person rdf:ID="nguoi"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.ptit.edu.vn/profile#"
xml:base="http://www.ptit.edu.vn/person#">
<has_name>Con Nguoi</has_name>
</Person>
<Student rdf:ID="trimai"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.ptit.edu.vn/profile#"
xml:base="http://www.ptit.edu.vn/student#">
<has_name>Mai Van Tri</has_name>
</Student>
<Teacher rdf:ID="khanh"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.ptit.edu.vn/profile#"
xml:base="http://www.ptit.edu.vn/teacher#">
<has_name>Nguyen Trong Khach</has_name>
</Teacher>
<Course rdf:ID="dichvu"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.ptit.edu.vn/profile#"
xml:base="http://www.ptit.edu.vn/course#">
<has_name>Dich Vu</has_name>
<has_students rdf:resource="http://www.ptit.edu.vn/student#Loud"/>
<has_teacher rdf:resource="http://www.ptit.edu.vn/teacher#Mariah"/>
</Course>
Bài 2:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:owl ="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.ptit.edu.vn/profile"
xmlns:xsd ="http://www.w3.org/2001/XMLSchema#">
<owl:Class rdf:ID="Sinhvien">
<rdfs:label>Sinhvien</rdfs:label>
</owl:Class>
<owl:Class rdf:ID="Giaovien">
<rdfs:label>Giaovien</rdfs:label>
</owl:Class>
<owl:DatatypeProperty rdf:ID="ten">
<rdfs:domain rdfs:Resource="#Sinhvien" />
<rdfs:domain rdfs:Resource="#Giaovien" />
<rdfs:range rdfs:Resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="day">
<rdfs:domain rdfs:Resource="#Giaovien" />
<rdfs:range rdfs:Resource="#Sinhvien" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="duoc_day_boi">
<rdfs:domain rdfs:Resource="#Sinhvien" />
<rdfs:domain rdfs:Resource="#Giaovien" />
</owl:ObjectProperty>
</rdf:RDF>
Bài 3:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.ptit.edu.vn/profile"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<owl:Class rdf:ID="Customer">
<rdfs:label>Customer</rdfs:label>
</owl:Class>
<owl:Class rdf:ID="Shop">
<rdfs:label>Shop</rdfs:label>
</owl:Class>
<owl:Class rdf:ID="BigShop">
<rdfs:label>BigShop</rdfs:label>
<owl:equivalentClass rdf:resource="#Shop"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#sells" />
<owl:minCardinality rdf:datatype="xsd;nonNegativeInteger">100</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="Product">
<rdfs:label>Product</rdfs:label>
<owl:disjointWith rdf:resource="#Customer"/>
</owl:Class>
<owl:Class rdf:ID="PurchaseAndSale">
<rdfs:label>PurchaseAndSale</rdfs:label>
<owl:equivalentClass rdf:resource="#Shop"/>
<owl:equivalentClass rdf:resource="#Customer"/>
</owl:Class>
<owl:DatatypeProperty rdf:ID="name">
<rdfs:domain rdfs:Resource="#Customer" />
<rdfs:domain rdfs:Resource="#Shop" />
<rdfs:range rdfs:Resource="xsd:string" />
<owl:equivalentProperty rdf:resource="foaf:name" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="email">
<rdfs:domain rdfs:Resource="#Customer" />
<rdfs:domain rdfs:Resource="#Shop" />
<rdfs:range rdfs:Resource="xsd:string" />
<owl:equivalentProperty rdf:resource="foaf:mbox" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="orderNumber">
<rdfs:domain rdfs:Resource="#Product" />
<rdfs:range rdfs:Resource="xsd:int" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="sells">
<rdfs:domain rdfs:Resource="#Shop" />
<rdfs:range rdfs:Resource="#Product" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="soldBy">
<rdfs:domain rdfs:Resource="#Product" />
<rdfs:range rdfs:Resource="#Shop" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="duoc_day_boi">
<rdfs:domain rdfs:Resource="#Sinhvien" />
<rdfs:domain rdfs:Resource="#Giaovien" />
</owl:ObjectProperty>
</rdf:RDF>