Brewed NetBeans

August 23, 2008

Database Explorer in NetBeans 6.5

Filed under: netbeans-6.5 — James @ 7:40 am
Tags: ,

Do you work often with sql queries? Are you tired of running another gui tool like MySQL Query Browser or SQL Server 2005 Management Studio (really a pain, if all you want is just executing some sql queries). Even worse, if you are working on an application which should be tested on multiple databases. So are you searching for some simple lightweight query executing tool or scratching your head to even come out with your own tool? Come on, if you are using NetBeans you have a great way out.

(You might probably be living under a rock if you haven’t ever heard about NetBeans. NetBeans is currently one of the world’s most popular IDE for Java, Ruby, Groovy, PHP and so on. If you haven’t ever tried NetBeans come on, try it today. You will be surprised)

For ages, NetBeans comes with a database explorer that can be used to connect to virtually any database in this universe that has a jdbc driver. You can use the NetBeans database explorer to execute sql queries, visualize your tables, identify your primary/foreign keys etc, etc..

But with NetBeans 6.5, the database explorer module has been sharpened and some good new features were added. I would like to highlight some of them (please forgive me if you find me highlighting some old featuers as well)

Well, the single most important feature provided by the database explorer in NetBeans 6.5 is the support for “tabbed views” of your result set. Trust me, it is better than some of the gui tools provided by the database vendors themselves. Ok, enough talking, let me show you this cool features with some screenshots.

What is the we see here..? You execute multiple sql queries and NetBeans shall display the result in new tabs. You can even set the number of rows you want to see and then navigate through the “paginated” table.

What more, you can refresh your result set and even insert new data without writing any sql!

The IDE even provides a cool “SQL History”, which can be very useful to execute some of the previously written queries.

Some other features include, user interfaces for creating new tables, columns etc..

The following screenshot shows the property of a column.

A simple gui but very useful tool to create tables.

The gui to add column.

Suggestions to the NetBeans team:

Though the database explorer in NetBeans 6.5 is very good, I feel some more features, if added, can turn NetBeans into a really powerful database tool. Some of them are..

– Provision to just execute “selected queries”. Say I open one “SQL Command” and write three different queries. I must be able to just “select” the query I want and then execute it. Currently I need to comment out the unwanted queries or I should open a new “SQL Command” window. This can be a very useful feature.

– Provision to visualize the “meta data” of all the table columns like “size”, “datatype” etc in one single window. Right now, I need to right click every single column and then select “properties” to achieve the same.

– Provision to visualize the table relationships using the powerful “scenegraph” api.

– Provision to set table relationships.


Overall, the database explorer in NetBeans 6.5 can be a very useful tool for developers and thanks to the NetBeans team for all their hardwork.


1 Comment »

  1. Something I always wondering about, why does none of these tools allow to visually drill down the hierarchy? The tool knows about the relations, it should be a simple matter of i.e. going from a Customer to an Invoice table. I find that often I have to manually inspect a foreign key, and use it to create a new query of a new table with the primary key. Very manual and slow process. Am I missing something, should this not be trivial?

    Comment by Casper Bang — August 25, 2008 @ 8:41 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: