What is the difference between RDF Schema and Ontology? - semantic-web

I am new to Semantic Web and confused regarding RDFs and Ontology. Can someone explain the difference between RDF Schema and Ontology?

RDF Schema (RDFS) is a language for writing ontologies.
An ontology is a model of (a relevant part of) the world, listing the types of object, the relationships that connect them, and constraints on the ways that objects and relationships can be combined.
A simple example of an ontology (though not written in RDFS syntax):
class: Person
class: Project
property: worksOn
worksOn domain Person
worksOn range Project
which says that in our model of the world, we only care about People and Projects. People can work on Projects, but not the other way around.

Do you mean 'what is the difference between RDF Schema' and 'Web Ontology Language (OWL2)'. If so then there are a few main differences. Both are ways to create vocabularies of terms to describe data when represented as RDF. OWL2 and its subsets (OWL DL, OWL Full, OWL Lite) contain all the terms contained in RDFS but allow for greater expressiveness, including quite sophisticated class and property expressions. In additional, one of the subsets of OWL2 (OWL Full) can be modelled in such a way that when reasoned using an OWL Full reasoner, is undecidable. Both are representable as RDF and both are W3C Web Standards.
If you want to compare RDFS and ontology, not specifically in the context above, but in the context of Semantic Web, then my advice would be to very careful. Careful because you will find several distinct and not necessarily mutually exclusive camps; those with an interest in ontology from a philosophical perspective, those from a computing perspective, those who think the philosophical perspective should be the only perspective and those that don't. If you are any of those ways inclined, you can end up having great debates. But if you want to engage in Semantic Web Development, then the fastest route is to study and understand the Web Standards mentioned initially.

Conceptually there is no difference, i.e., RDFS can be utilised to create a (e.g. domain specific) vocabulary or ontology, where RDFS is bootstrapping itself in companion with RDF (everything is at least an rdfs:Resource). Furthermore, in the context of Semantic Web technologies you could utilise OWL to describe advanced semantics of your ontology/vocabulary. See also this definition of ontology.

As per the spec, RDF schema is purely that - a schema or structure for defining things semantically. It gives you the vocabulary (key words and properties) for describing things. Think of it like an XML schema as used in XML documents and web pages.
An ontology is a classification hierarchy (for example, the biological taxonomy of life) normally combined with instances of those classes. It is used for classifying and reasoning.
What is an instance depends on how you define a taxonomy. It might be that you have an ontology of living creatures and so a living, breathing person is an instance of the ontological class "Homo Sapiens", or it might be that you have an ontology of species and so the entire Homo Sapiens species is an instance of the ontological class "Species".

In non technical terms, I would say RDFS is a language that helps to represent information. And an ontology is the term used to refer to all the information about a domain.
Cheers

Related

How to use FOAF as part of another ontology?

I want to have a class Professor which will have some properties: name, surname and nationality.
Now I just created a class Professor, a class Person and a class Nationality, and some data properties for name and surname and an object property hasNationaity to relate a professor with a nationality.
Does it make sense to use FOAF for Person and maybe something like Group and member for the nationalities?
To do so I would need to import FOAF, right?
I guess my main question is what are the reasons that justify importing an upper ontology? and is this what people normally do?
In any case the ontology, in Turtle, is available here on GitHub.
Ontologies and more generally "Semantic web technologies" are dedicated to knowledge pooling.
As Sire Tim Berners-Lee specified in its 5-Stars Ranking on Open Data, the best level of opening is reached when you "link your data to other data to provide context". So it is a good thing !
About the "import", not all the FOAF ontology is mandatory in your case I think. Importing all statements of an ontology is, in my experience, important when you need to implement many resources relative to the upper-ontology (Graph browsing, structure modification, ...) On the other hand, the simple use of prefixes can solve many problem without weighing an application:
xmlns:foaf="http://xmlns.com/foaf/0.1/#"
About the nationality question, Group from FOAF can be a solution. Nota Bene that other ontologies may provide suited answer like YAGO (Yet Another Great Ontology). Some may create multiple imports/connections to increase the contextualisaiton of their Knowledge Base.

Use of several ontologies, have I to merge those?

I'm studying semantic web and I'd like to use different ontologies to enrich my raw sensor data. I'm using Protégé.
Imagine I want to use concepts from three different ontologies (for instance SSN, CSSO and another), have I to merge (in Protege - Refactor-> Merge Ontologies) all ontologies in protege?
If I need to use only a part of these ontologies? (some ontologies are really big!)
I'm a newbie in this field and I would like to know the correct way to do.
It is not necessary to merge ontologies to refer them. You can use OWL imports directives instead.
It is possible to partition large ontologies if you only need to use part of them, but the best technique depends on what you plan to do, so it's not possible to recommend an approach at this point.
However, worrying about the size of ontologies at this point is premature optimization. First define your problem and a solution, then worry about performance issues - once they can be measured.

Understanding the difference between SPARQL and semantic reasoning using Pellet

I have a pizza ontology that defines different types of pizzas, ingredients and relations among them.
I just want to understand several basic things:
Is it correct that I should apply SPARQL if I want to obtain information without
reasoning? E.g. which pizzas contain onion?
What is the difference between SPARQL and reasoning algorithms
like Pellet? Which queries cannot be answered by SPARQL, while can
be answered by Pellet? Some examples of queries (question-like) for the pizza ontology would be helpful.
As far as I understand to use SPARQL from Java with Jena, I
should save my ontology in RDF/XML format. However, to use Pellet
with Jena, which format do I need to select? Pellet uses OWL2...
SPARQL is a query language, that is, a language for formulating questions in. Reasoning, on the other hand, is the process of deriving new information from existing data. These are two different, complementary processes.
To retrieve information from your ontology you use SPARQL, yes. You can do this without reasoning, or in combination with a reasoner, too. If you have a reasoner active it means your queries can be simpler, and in some cases reasoners can derive information that is not really retrievable at all with just a query.
Reasoners like Pellet don't really answer queries, they just reason: they figure out what implicit information can be derived from the raw facts, and can do things like verifying that things are consistent (i.e. that there are no logical contradictions in your data). Pellet can figure out that that if you own a Toyota, which is of type Car, you own a Vehicle (because a Car is a type of Vehicle). Or it can figure out that if you define a pizza to have the ingredient "Parmesan", you have a pizza of type "Cheesy" (because it knows Parmesan is a type of Cheese). So you use a reasoner like Pellet to derive this kind of implicit information, and then you use a query language like SPARQL to actually ask: "Ok, give me an overview of all Cheesy pizzas that also have anchovies".
APIs like Jena are toolkits that treat RDF as an abstract model. Which syntax format you save your file in is immaterial, it can read almost any RDF syntax. As soon as you have it read in a Jena model you can execute the Pellet reasoner on it - it doesn't matter which syntax your original file was in. Details on how to do this can be found in the Jena documentation.

How to validate JSON-LD against an schema?

As I understand there are ways to validate serialized RDF (e.g RDF/XML) against RDF Schema (How to validate a RDF with your RDF schema).
Also, there are various converters from RDF/XML to JSON-LD serialization format (and vice versa).
Searching the Internet I could not find a straightforward way to validate JSON-LD against some sort of JSON Schema that relates to JSON-LD as RDF Schema relates to RDF(/XML).
Of course, there are various JSON-LD document forms so I assume that one schema cannot easily describe all forms.
So my question is, what is the proper or recommended way of validating JSON-LD document from the RDF perspective?
BTW I run on a project that tries to solve validation of JSON linked data https://github.com/common-workflow-language/schema_salad.
RDF Schema is somewhat Mia-named, but can be used to make sense of (actually, infer information from) an RDF graph. OWL provides more mechanisms for asserting shapes of RDF Graphs as does new work on RDF Shapes. The key is that these work on the data model, not the syntax. Both RDF/XML and JSON-LD are RDF serializations, which can be used to reduce documents expressed in an appropriate syntax into an RDF Graph, where these tools operate.
The Structured Data Linter uses this approach to "validate" web pages representing information in schema.org and many other vocabularies using these principles.
RDF Schema is not for validation. In fact you cannot express a contradiction with RDF Schema alone. For example if an instance of Person is the subject of a triple with maximumSpeed as predicate and the property maximumSpeed has Vehicle (rather than Person) as rdfs:domain there is no contradiction, there is simply a thing that is both a Person and a Vehicle. To say that something cannot at the same time be a person and a vehicle you would need OWL, RDF Schema is not enough for that.
RDF Data Shapes will allow constraints and validation.

Can a semantic web Ontology have the same expressivity but a different profile?

I'm analyzing some ontologies with the pellet reasoner, but I'm getting some strange results. When I perform the "pellet info" method on an ontology, and compare the OWL Profile to the DL Expressivity, I sometimes get ontologies that have different expressivities bu the same profile. That seems at least plausible, but then I am also finding ontologies with the same expressivity but different OWL Profiles. How is this possible, since the profile is a mark of the ontology's expressivity and reducibility in the first place?
If you're considering comparing ontologies under OWL2 (based on SROIQ) in general and, for example, a profile which is a sub-language such as OWL-EL (based on EL++), then it is conceivable that an ontology can have the same expressivity and different 'profile', if you consider full OWL2 to be a 'profile' and expressivity to be DL-expressivity, since SROIQ subsumes EL++.
However, if by profile you strictly mean one of the three distinct OWL2 profiles; OWL2-EL, OWL2-QL and OWL2-RL, then it is still possible that two ontologies with different OWL2 profiles can indeed have the same expressivity (at least, DL-expressivity) as these profiles are underpinned by description logics that may have some intersecting expressivity.
For example, ontologies in the OWL2-EL profile (based on EL++) and in the OWL2-QL profile (based on DL-Lite), both of these description logics can express things such as:
Concept inclusion axioms
Instance assertions against concepts and roles
Existential property restrictions
Conjunctive concept expressions
Ontologies in either profile (EL, QL) which are restricted to usage of the DL constructs which are common to both would therefore have the same DL-expressivity.