Page MenuHomePhabricator

Provide a more intuitive way to design DB queries, as Quarry is not ideal for complex ones...
Open, Needs TriagePublic

Description

The problem:
The example queries https://quarry.wmflabs.org/query/31002 and https://quarry.wmflabs.org/query/30997 are queries that generate very different result sets, due to the difference in seemingly only 2 SQL joins. The result produced should be broadly the same. It's not straightforward to determine if this is a logical flaw, or a technical issue inside the database itself given the text nature of the query (And this is despite some knowledge of SQL).

I've written a few other queries that get progressively more complex as additional tables are added.

The requested feature:

A way of building queries (possibly visually) , that does not rely on knowing the precise behaviour of the underlying SQL (Such as what exactly is being joined), and where the relationships between the tables can be more easily understood.

Related Objects

Event Timeline

Reedy renamed this task from Provide a more intuitive way to design DB queries, as Qarry is not ideal for complex ones... to Provide a more intuitive way to design DB queries, as Quarry is not ideal for complex ones....Nov 6 2018, 10:48 AM
Reedy added a project: Quarry.

Do you have any existing examples for tools that allow to create complex setups in some visual way?

My best example for this would be the query designer in Microsoft Access, which I haven't used in a while. Various other RDMS systems have Query designers. Maybe examining how Base in Libre Office handles query design could also be considered?

The provision of some basic notes on SQL syntax, linked from the Quarry pages , might also be helpful.

There is a Wikibook (in English) here https://en.wikibooks.org/wiki/SQL, but I'm not sure if it uses the same SQL Syntax as Quarry does, which may serve this purpose.