I know.

But really,  SPARQL is not too different from SQL,  it's based on
the same math.  SPARQL query result sets are almost indistinguisable
from SQL result sets so you can take your whole bag of tricks from
SQL to SPARQL.

Any SQL <-> SPARQL translation runs into issues with cardinalities,
that is,  SQL aligns a single set of values for various properties
across a row,  so you have something like

[
    :personId 8831 ;
    :dateOfBirth "1972-04-24"^^xsd:date ;
    :firstName "Sachin" ;
    :lastName "Tendulkar" ;
]

and for many properties the 1-1 association makes sense,  but RDF
standards do not enforce it.  There might be multiple claims about any
of these things,   or maybe somebody changed their ::lastName from
"Lieber" to "Lee",  or their :gender from :Female to :Male,  whatever.

Then there are properties that are definitely multi-valued such as
:wroteBook,  :hadParent,  etc.

All of that can be modeled in SQL but the process of going from SPARQL
to SQL could be lossy if you don't take the time to deal with all the
problems that present themselves.  (Or unless you do some trivial
mapping such as as creating s,p,o columns)

With SPARQL you can get the original data with complete fidelity
without thinking about how the conversion works out.  People who are
comfortable with SQL might find that learning SPARQL is a shorter path
to getting the results they want.  (For one thing,  you can explore
with the public endpoint)

--
  Paul Houle
  paul.ho...@ontology2.com



On Sun, Nov 6, 2016, at 06:15 PM, Kingsley Idehen wrote:
> On 11/6/16 4:46 PM, Paul Houle wrote:
>> Also if you are interested in the schema it is easy to query it in
>> SPARQL.  These queries generally don't work the triple server hard so
>> they work just fine against the public SPARQL endpoint:
>>
>> http://dbpedia.org/sparql
>>
>> For instance,  this query will give you the types ordered by how many
>> occurences there are of the types:
>>
>> select ?p ?o {
>>    <http://dbpedia.org/ontology/Person> ?p ?o .
>> }
>>
>> gives you all the statements where the type appears on the left and
>>
>> select ?s ?p {
>>    ?s ?p <http://dbpedia.org/ontology/Person> .
>>    FILTER(?p!=rdf:type)
>> }
>>
>> gives you all the statements on where the type appears on the right,
>> omitting statements of the form "?x a ?type."
>>
>> Diagraming the schema looks like a fun project,  but the raw material
>> to analyze the schema is all there.  Note most of the
>> predicates used for schema purposes are defined in
>>
>> https://www.w3.org/TR/rdf-schema/
>>
>>
>>
>> --
>>   Paul Houle
>>   paul.ho...@ontology2.com
>
> I was responding to a "where is the SQL comment".  Producing an
> Ontology or RDF Schema dump is achievable via SPARQL, that's how I
> actually generated the DBpedia ontology from instance data, initially.
>
>  As for the Schema question, in regards to RDF, its First-order logic.
>  Basically, that thing are related to other things, in a variety of
>  ways. All of that represented as a collection of RDF statements :)
>
>  Kingsley
>
>>
>>
>>
>> On Sat, Nov 5, 2016, at 09:21 PM, Kingsley Idehen wrote:
>>> On 11/4/16 4:06 PM, Alan Scotch wrote:
>>>> Where is there a SCHEMA DIAGRAM and description of the database
>>>> that I can access via SQL?
>>>> Alan
>>>
>>> The SQL schema for Virtuoso is basically a Table ( RDF_QUAD) with
>>> the columns, S,P,O,G. You can query the same data using SPARQL or
>>> SQL, demonstrating the fact that SPARQL can be used to extend SQL,
>>> while SQL can be used to write an RDF application that scales
>>> massively etc..
>>>
>>> SELECT o,g
>>> FROM (SPARQL SELECT DISTINCT ?g ?o WHERE {GRAPH ?g {?s a ?o}})
>>> AS RDF ;
>>>
>>> Live example link, using a different Virtuoso instance:
>>> http://demo.openlinksw.com/spasqlqb/spasqlqb.html?permlink_e=%7B%22v%22%3A1%2C%22url%22%3A%22/XMLA%22%2C%22dsn%22%3A%22DSN%3DLocal_Instance%22%2C%22uid%22%3A%22%22%2C%22pwd%22%3A%22%22%2C%22path%22%3Anull%2C%22tab%22%3A%22exec%22%2C%22idx%22%3Anull%2C%22fkey%22%3Anull%2C%22ref%22%3Anull%2C%22exec%22%3A%7B%22sql%22%3A%22%5CnSELECT%20o%2Cg%5CnFROM%20%28SPARQL%20SELECT%20DISTINCT%20%3Fg%20%3Fo%20WHERE%20%7BGRAPH%20%3Fg%20%7B%3Fs%20a%20%3Fo%7D%7D%29%20AS%20RDF%22%7D%7D
>>>
>>> Log in as user "vdb" and pwd "vdb" .
>>>
>>> That will produce a list of all named graphs and objects of an
>>> rdf:type relation in a Virtuoso RDBMS , for instance.
>>>
>>> To answer your question: the restrictions of a conventional SQL
>>> schema have no real bearing when relations are represented as RDF-
>>> Language sentences rather than Records in a Table :)
>>>
>>> Kingsley
>>>
>>>>
>>>> **From:** Kingsley Idehen <kide...@openlinksw.com> **To:**
>>>> baran...@gmail.com; dbpedia-discussion@lists.sourceforge.net
>>>> **Sent:** Friday, November 4, 2016 12:39 PM **Subject:** Re: [DBpedia-
>>>> discussion] Introducing the Ontology2 Edition of DBpedia 2016-04
>>>>
>>>>
>>>>
>>>> On 11/4/16 1:38 PM, baran...@gmail.com wrote:
>>>>>
>>>>>> I am saying:
>>>>>>
>>>>>>  A personal or service-specific instance of DBpedia has less
>>>>>>  traffic and less volatile query mix. Once is serving the world
>>>>>>  the other a specific client application / service.
>>>>>
>>>>> So, you say Pauls offering has nothing to do with a dbpedia-SPARQL-
>>>>> endpoint serving the world, its aim is serving 'a specific client
>>>>> application'.
>>>>>
>>>>>  Although, it semms to be 'NICE'...
>>>>>
>>>>>  I register this as yor your opinion to my origin posting to
>>>>>  Paul...
>>>>>
>>>>>  Thanks, baran
>>>>>
>>>>
>>>> Paul has a Virtuoso instance configured and deployed via an Amazon
>>>> AMI in the AWS Cloud. Like the DBpedia SPARQL endpoint,* **when the
>>>> Virtuoso RDBMS is up and running you can query data via *SPARQL
>>>> and/or* SQL. *
>>>> You have a Virtuoso instance in an AMI vs a public Virtuoso
>>>> instance that both provide access to the same DBpedia dataset.
>>>> Naturally, you could open up access to the public using the AMI
>>>> variant too (and deal with the bill+++) .
>>>>
>>>> -- Regards,  Kingsley Idehen  Founder & CEO OpenLink Software
>>>> (Home Page: http://www.openlinksw.com[1])  Weblogs (Blogs): Legacy
>>>> Blog: http://www.openlinksw.com/blog/~kidehen/[2] Blogspot Blog:
>>>> http://kidehen.blogspot.com[3] Medium Blog:
>>>> https://medium.com/@kidehen  Profile Pages: Pinterest:
>>>> https://www.pinterest.com/kidehen/ Quora:
>>>> https://www.quora.com/profile/Kingsley-Uyi-Idehen Twitter:
>>>> https://twitter.com/kidehen Google+:
>>>> https://plus.google.com/+KingsleyIdehen/about LinkedIn:
>>>> http://www.linkedin.com/in/kidehen  Web Identities (WebID):
>>>> Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this
>>>> :
>>>> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>

>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -----------
>>>>  Developer Access Program for Intel Xeon Phi Processors Access to
>>>>  Intel Xeon Phi processor-based developer platforms. With one year
>>>>  of Intel Parallel Studio XE. Training and support from Colfax.
>>>>  Order your platform today. http://sdm.link/xeonphi
>>>>
>>>> _______________________________________________
>>>>  DBpedia-discussion mailing list DBpedia-
>>>>  discuss...@lists.sourceforge.net
>>>>  https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> ----------- Developer Access Program for Intel Xeon Phi Processors
>>>> Access to Intel Xeon Phi processor-based developer platforms. With
>>>> one year of Intel Parallel Studio XE. Training and support from
>>>> Colfax. Order your platform today. http://sdm.link/xeonphi
>>>>
>>>>
>>>>
>>>> _______________________________________________ DBpedia-discussion
>>>> mailing list DBpedia-discussion@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

>>>>
>>>
>>>


>>> -- Regards,  Kingsley Idehen  Founder & CEO OpenLink Software
>>> (Home Page: http://www.openlinksw.com)  Weblogs (Blogs): Legacy
>>> Blog: http://www.openlinksw.com/blog/~kidehen/[4] Blogspot Blog:
>>> http://kidehen.blogspot.com Medium Blog: https://medium.com/@kidehen
>>> Profile Pages: Pinterest: https://www.pinterest.com/kidehen/ Quora:
>>> https://www.quora.com/profile/Kingsley-Uyi-Idehen Twitter:
>>> https://twitter.com/kidehen Google+:
>>> https://plus.google.com/+KingsleyIdehen/about LinkedIn:
>>> http://www.linkedin.com/in/kidehen  Web Identities (WebID):
>>> Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this :
>>> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this

>>>
>>> --------------------------------------------------------------------
>>> ----------
>>> Developer Access Program for Intel Xeon Phi Processors
>>> Access to Intel Xeon Phi processor-based developer platforms.
>>> With one year of Intel Parallel Studio XE.
>>> Training and support from Colfax.
>>> Order your platform today. http://sdm.link/xeonphi
>>> _________________________________________________
>>> DBpedia-discussion mailing list
>>> DBpedia-discussion@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>>> Email had 1 attachment:


>>>  * smime.p7s 4k (application/pkcs7-signature)
>>
>>
>>
>> ---------------------------------------------------------------------
>> --------- Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms. With
>> one year of Intel Parallel Studio XE. Training and support from
>> Colfax. Order your platform today. http://sdm.link/xeonphi
>>
>>
>> _______________________________________________ DBpedia-discussion
>> mailing list DBpedia-discussion@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>>
>
>


> -- Regards,  Kingsley Idehen  Founder & CEO OpenLink Software   (Home
> Page: http://www.openlinksw.com)  Weblogs (Blogs): Legacy Blog:
> http://www.openlinksw.com/blog/~kidehen/ Blogspot Blog:
> http://kidehen.blogspot.com Medium Blog: https://medium.com/@kidehen
> Profile Pages: Pinterest: https://www.pinterest.com/kidehen/ Quora:
> https://www.quora.com/profile/Kingsley-Uyi-Idehen Twitter:
> https://twitter.com/kidehen Google+:
> https://plus.google.com/+KingsleyIdehen/about LinkedIn:
> http://www.linkedin.com/in/kidehen  Web Identities (WebID): Personal:
> http://kingsley.idehen.net/dataspace/person/kidehen#this :
> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this

>
> ----------------------------------------------------------------------
> --------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _________________________________________________
> DBpedia-discussion mailing list
> DBpedia-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
> Email had 1 attachment:


>  * smime.p7s 4k (application/pkcs7-signature)


Links:

  1. http://www.openlinksw.com/
  2. http://www.openlinksw.com/blog/%7Ekidehen/
  3. http://kidehen.blogspot.com/
  4. http://www.openlinksw.com/blog/%7Ekidehen/
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
DBpedia-discussion mailing list
DBpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to