What are the alternatives to SQL as a query language?

1010 views
Skip to first unread message

George James

unread,
Jul 21, 2009, 2:53:48 PM7/21/09
to nosql-di...@googlegroups.com
What are the alternatives to SQL as a query language?  There appear to be many databases that could be described as non-SQL.  What query language or methods are commonly used to access and update data in these databases?
 
Is there any kind of list anywhere of what query languages / update methods are used by which database?  Is this something that it would be useful to compile?
 
Regards
George

George James Software
www.georgejames.com

 

Steve Harris

unread,
Jul 21, 2009, 3:51:18 PM7/21/09
to nosql-di...@googlegroups.com
One alternative is SPARQL http://www.w3.org/TR/rdf-sparql-query/

It's happy with the idea of lose/complete-absence-of schemata, but it's quite specific to the RDF data model.

My company (Garlik) uses SPARQL a lot. We have large, complex and rapidly evolving data, and don't know far in advance what kind of queries we'll need to run.

For those who aren't familiar with it, RDF has a graph storage model, making it especially appropriate for schemaless storage.

Plug follows, look away now if you don't want to see :)

We've recently released our database system as free software: http://www.4store.org/

It was built with a lot of the ideas behind no-sql in mind, especially the flexibility and clustered storage, but it follows the RDF and SPARQL specs quite closely, making it interoperable with a number of other systems.

- Steve

George James

unread,
Jul 21, 2009, 5:37:10 PM7/21/09
to nosql-di...@googlegroups.com
Steve
What update methods does 4store implement?
 
From the docs I see imports like this:
 
4s-import demo --model http://example.com/schema schema.rdf --model http://example.com/data data.ttl
Are there any other ways of adding data to a 4store datastore?
 
Regards
George

George James Software
www.georgejames.com

 


From: nosql-di...@googlegroups.com [mailto:nosql-di...@googlegroups.com] On Behalf Of Steve Harris
Sent: 21 July 2009 20:51
To: nosql-di...@googlegroups.com
Subject: Re: What are the alternatives to SQL as a query language?

Steve Harris

unread,
Jul 22, 2009, 5:05:41 AM7/22/09
to nosql-di...@googlegroups.com
You can also POST and PUT RDF fragments to an HTTP URI, they get parsed and either added to an existing graph (POST) or replace it (PUT). That's the main way we interact with it, the 4s-* tools are mostly for admin, bulk dump/restore etc.

There's a bit of documentation for the HTTP methods here: http://4store.org/trac/wiki/SparqlServer

The HTTP query stuff is part of the SPARQL standard, but the PUT/POST/DELETE stuff is not (yet).

Coming in the next version of the SPARQL standard is support for UPDATE like operations in the language. That should be finalised around the end of this year.

- Steve

JBiz

unread,
Jul 22, 2009, 7:31:03 AM7/22/09
to nosql-di...@googlegroups.com
Does 4store offer full-text searching across literals?

Steve Harris

unread,
Jul 22, 2009, 8:13:55 AM7/22/09
to nosql-di...@googlegroups.com
Nope, but it is on the todo list. We're hoping to add lucene-type full text searching. It's not something we've need ourselves, but lots of people have asked for it. Other RDF stores, such as Jena, do full text matching currently.

You can ask for regex matches, but it's not well optimised, and regex's don't match everyone's needs.

What we've done internally, when we wanted fuzzy matching was compute double metaphones for the string, and add them as extra triples, eg:

:steve :name "Steve Harris" .
:steve :metaphone "STF" .
:steve :metaphone "HRS" .

You can see that working on http://qdos.com/, if you search for Steph Harriss you will find the Steve Harris-s.

The SPARQL query looks like

SELECT DISTINCT ?person ?name
WHERE {
  ?person :name ?name .
  ?person :metaphone "STF", "HRS" .
}

(if you look in the HTML source of the result page you will see that actual query, in a comment, which is a bit more complex. Also, just above it there's an example of a regex match).

It takes maybe 1ms to run, over a cluster with a few billion triples in.

That approach gives you great recall (with worse precision), but doesn't suit all applications. It's especially bad for long sentences of text as you end up generating a lot of additional triples.

- Steve

Andy Seaborne

unread,
Jul 22, 2009, 9:40:57 AM7/22/09
to NOSQL
> Other RDF stores, such as Jena

That translates to

http://jena.sf.net/

Jena is BSD-class license. It includes the SPARQL query engine ARQ.

The non-SQL backed is TDB

http://jena.sf.net/TDB

The text indexing component is actually a integral component of ARQ
and works for all storage backend.

Andy


On Jul 22, 1:13 pm, Steve Harris <s.w.har...@gmail.com> wrote:
> Nope, but it is on the todo list. We're hoping to add lucene-type full  
> text searching. It's not something we've need ourselves, but lots of  
> people have asked for it. Other RDF stores, such as Jena, do full text  
> matching currently.
>
> You can ask for regex matches, but it's not well optimised, and  
> regex's don't match everyone's needs.
>
> What we've done internally, when we wanted fuzzy matching was compute  
> double metaphones for the string, and add them as extra triples, eg:
>
> :steve :name "Steve Harris" .
> :steve :metaphone "STF" .
> :steve :metaphone "HRS" .
>
> You can see that working onhttp://qdos.com/, if you search for Steph  
> Harriss you will find the Steve Harris-s.
>
> The SPARQL query looks like
>
> SELECT DISTINCT ?person ?name
> WHERE {
>    ?person :name ?name .
>    ?person :metaphone "STF", "HRS" .
>
> }
>
> (if you look in the HTML source of the result page you will see that  
> actual query, in a comment, which is a bit more complex. Also, just  
> above it there's an example of a regex match).
>
> It takes maybe 1ms to run, over a cluster with a few billion triples in.
>
> That approach gives you great recall (with worse precision), but  
> doesn't suit all applications. It's especially bad for long sentences  
> of text as you end up generating a lot of additional triples.
>
> - Steve
>
> On 22 Jul 2009, at 12:31, JBiz wrote:
>
> > Does 4store offer full-text searching across literals?
>
> > On Tue, Jul 21, 2009 at 12:51 PM, Steve Harris  
> > <s.w.har...@gmail.com> wrote:
> > One alternative is SPARQLhttp://www.w3.org/TR/rdf-sparql-query/

Guo Du

unread,
Jul 23, 2009, 6:06:12 AM7/23/09
to NOSQL
Depends on what NOSQL vendor you choose.

IMO, jcr (http://en.wikipedia.org/wiki/
Content_repository_API_for_Java) is follow the nosql path. But you may
use xpath or restricted sql to query your data.

If you are interested with jcr, http://en.wikipedia.org/wiki/Apache_Jackrabbit
is the reference implementation, it's a good start.

--Guo
>  <http://www.georgejames.com/>www.georgejames.com

DERRIC LYNS

unread,
Dec 28, 2015, 5:31:09 AM12/28/15
to NOSQL, Geo...@georgejames.com


There are two newbies for an alternative for SQL.
  1. LINQ (Microsoft)
  2. CQuel (opensource)

The easiest is CQuel. 

You may download CQuel from the link below:

Documentation is a three pager available so far. 

Simon Blackwell

unread,
Jan 12, 2016, 2:11:57 PM1/12/16
to NOSQL, Geo...@georgejames.com

David Portas

unread,
Jan 12, 2016, 2:28:44 PM1/12/16
to nosql-di...@googlegroups.com, Geo...@georgejames.com
Spark: http://spark.apache.org/examples.html
D: http://www.dcs.warwick.ac.uk/~hugh/TTM/projects.html

On 12 January 2016 at 19:11, Simon Blackwell
> --
> You received this message because you are subscribed to the Google Groups
> "NOSQL" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nosql-discussi...@googlegroups.com.
> To post to this group, send email to nosql-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nosql-discussion/a87118c0-6463-4d9f-95cf-cb77a583b6e5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Adam Retter

unread,
Jan 12, 2016, 2:36:15 PM1/12/16
to nosql-di...@googlegroups.com, Geo...@georgejames.com

W3C XQuery

--

rtweed

unread,
Jan 30, 2016, 5:11:32 AM1/30/16
to NOSQL, Geo...@georgejames.com
Reply all
Reply to author
Forward
0 new messages