Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AI and Deep Learning by (50.2k points)

I'm doing a lot of research right now on Semantic Web and complex data models that represent relationships between individuals and organizations. I knew a little semantic ontology although I never understood what it was used if not make graphs.

I saw on university wiki that the language to question an ontology is the SPARQL (tell me if I'm wrong).

But recently I saw a company that had created a semantic ontology put it in the form of GraphQL that I did not know (https://diffuseur.datatourisme.gouv.fr/graphql/voyager/).

It seems to me that semantic ontologies are made to better find information, for example, to make a chatbot (it's what I want to do), but here they transformed a semantic ontology into an API, is it right? To make a GraphQL, should I build first a semantic ontology?

Could you explain to me a little the difference between all this, honestly it's a little vague for me.

1 Answer

0 votes
by (108k points)

GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data.

It provides an efficient, powerful and flexible approach to developing web APIs, and has been compared and contrasted with REST and other web service architectures. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned, but this has implications for how effective web caching of query results can be. The flexibility and richness of the query language also add complexity that may not be worthwhile for simple APIs. It consists of a type system, query language and execution semantics, static validation, and type introspection.

GraphQL supports reading, writing (mutating) and subscribing to changes to data (real-time updates).

Whereas, SPARQL acronym for SPARQL Protocol and RDF Query Language is an RDF query language that is, a semantic query language for databases which is able to retrieve and manipulate data stored in Resource Description Framework (RDF) format.

SPARQL is a language to work with Triplestores, graph datasets, and RDF nodes. Graphql is an API language, preferably for working with JSON structures. If you require to apply a graph dataset in your application, perform more advance knowledge discovery like reasoning on the dataset, then you may need a Semantic Web approach to apply SPARQL on top of your dataset.

If you wish to learn about SPARQL query language and RDF query language then visit this Artificial Intelligence Course

Browse Categories

...