Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

We have a flex based front end, that talks via JDBC to some databases.
Part of the GUI has some forms that let the users construct Queries in SQL to pull back records from the database.
However, we get a lot of support tickets that relate to incorrect SQL being tapped in, and a general lack of SQL knowledge so that they struggle with creating queries.

It would make more sense if we could have some sort of validation like a SQL Query builder.
Currently we do have a 'Test SQL' command that validates if it returns a valid result from the db, but I would like to take this further and have something that lets you build queries.

Has anyone seen any good examples on how to achieve this within a Flex based front-end? (or even non-flex, just to give us some design ideas).

Let me know if you need more details via comments.

Just for some background, here is a link to what the GUI currently looks like.
Its a wizard based forms approach, of which entering SQL is a part of:

enter image description here

Id prefer to see more options here for building the SQL with perhaps some sort of 'SQL calculator'? Or open to other suggestions - this also ties in with UX.

share|improve this question

closed as off-topic by gnat, GlenH7, MichaelT, Robert Harvey, World Engineer Oct 26 '13 at 18:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, GlenH7, MichaelT, Robert Harvey, World Engineer
If this question can be reworded to fit the rules in the help center, please edit the question.

How flexible are the queries? May users query anything or only certain tables/entities? –  Falcon Aug 15 '11 at 7:15
Very flexible. If its pingable, it can be brought into the query. –  Simon Aug 15 '11 at 9:12
I suggest you provide a reporting capability via a reporting component rather than a query builder. Reporting tools usually have built in query builders. I am not familiar with Flex, so I can't recommend specific one though. –  Emmad Kareem Dec 14 '11 at 10:38

2 Answers 2

Cabig Tissue suite has a flex based builder - https://cabig-kc.nci.nih.gov/Biospecimen/KC/index.php/CaTissue_Suite#Presentations.2C_Demos_and_Other_Materials

I'm not a big fan of it, but I've never seen a query builder I did like.

Will be watching answers to this very keenly.

We currently have requirments for this for multiple projects for users are different levels. For our group of expert users I've written an SQL based DSL and parse/validate that using Irony.net - it then generates C# and runs the test in process rather than in SQL (just because of our requirments)

For non expert users, we have some simple add a field etc guis, but they really are not great and I've never seen a really good solution to this whole problem.

share|improve this answer
Just tried demo - no im not a big fan of that. In my head im thinking some sort of Query Calculator that lets you point to db, then filters on tables, then on fields, and then gives you the relevant operators pending the field types. However, open to any other suggestions. Maybe I need to take a step back and re-think? –  Simon Aug 15 '11 at 10:27
I understand what you mean, but I've still genuinly never seen a good example and I include all the ones I've produced. I've just never seen this problem solved well and I include products from oracle/microsoft/ibm as poor interfaces for this purpose. –  Jonno Aug 16 '11 at 10:21

Just have dropped by this topic. Take a look to the following product as example of quite good UI for query building: http://easyquerybuilder.com Unfortunately, they don't have Flex version as I know.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.