Flex 4.5 MySQL Query Browser
I was looking for a simple MySQL query browser to provide individuals who wish to learn SQL with a tool to get started. Since I couldn’t find a satisfactory software I decided to create one.
I wanted a simple application to query MySQL databases. From the user perspective the interface should be simple, clean and inviting. From a technical view, I wanted to get grip on the AsyncListView collection wrapper class introduced in Flex 4 which offers data paging to handle large result sets.
The query browser consists of tree which displays the information about the database, its tables and fields. Auxiliary information such as table size (rows) and field types are shown alongside.
Clicking table or field nodes creates the appropriate SQL query. For instance, if you wish to get all data from table
directors, click on the the table node and a query in the form of
SELECT * FROM directorsis displayed in the query input.
This is a very simple query builder, so do not expect it to create joins or multi table statements.Queries are validated using a simple Regular Expression, which tests for presence of field and table name. Hence, queries like
SELECT 1+1will not validate.
The query history drop down list offers quick access to previous queries.
Watch the following screencast that demonstrates the features.
Obviously there are a lot of limitations compared to an application like MySQL Workbench. However, I never even thought about getting there.
A remaining limitation is the query of large tables (millions of records) with non-consecutive or without a primary key. In this scenario, I never got around working with the
LIMIT clause, which is a real performance killer.