A primary focus for NetBeans 6.5 is PHP support. Another important focus for us is to improve our basic database tooling.
Our user research has shown that the most important areas in an IDE for database users are:
NetBeans has basic support for the first two, and currently has no real support for the third. Our focus for this release will be to improve support in all these areas. We are going to pay particular attention to what we can do to make it easier to work with SQL inside language editors, particular the PHP editor.
There are other things we would like to do but which are not planned, such as the ability to refactor databases and create migrations ala Ruby. If time permits, nothing is impossible...
Also, in the explorer view, each column shows all the information about it (type, length) without having to bring up a dialog.
Select a connection, select a subset of tables, and generate an E/R diagram. The diagram can not be modified but tables can be added/removed and the layout can be re-arranged.
Features could include:
Right now in NetBeans you can only see the schema that the user is logged in to. You can't view the other schemas unless you disconnect and change the schema when you reconnect.
The key focus of this feature is enabling this even if the underlying database doesn't support it.
This basically means:
The ability to modify an E/R diagram generated from a database, or to create one from scratch. This includes creating new entities, modifying existing entities, adding relationships.
From an E/R diagram, select a connection or create a new connection, select a schema or create a new schema, and then generate a set of database tables from the current E/R diagram.
From an E/R diagram, select a target database (Oracle, Java DB, MySQL, PostgreSQL, etc.), and then generate SQL to create tables for the diagram targetted to that database.
The user versions a database schema, and enables "track changes." Then at any point they can set a new version of the database schema, and generate the SQL for the differences between those versions.
For schemas with a large number of tables, when opening a connection in DB Explorer, be able to view just a subset of tables, e.g filter by name, or pick a table and get tables that are associated to that table.
One implication: this means support for pgplSQL in the query editor when creating a stored procedure.
In the SQL editor, allow auto-complete to work with aliases for tabe names. Also, automatically fix SQL statement if you change the alias for a table name.
In query editor, have an associated tab that shows the command history. This includes not just commands run in the SQL editor, but also commands run "internally" by the Database Explorer. Easily select a command and re-execute.
Execute a query, and then user can choose one of the tables in the query, and be able to edit columns for that table in results.
Simple way to save what you have typed or pasted in SQL editor to a file
Double-click on a column and sort the results ascending/descending on that column
Be able to specify the maximum number of rows that will be returned from a query.
Estimated Effort: Needs some design work, cooperation with editor team, etc. 8 weeks
In your Java, PHP, or other editor, if typing in SQL, be able to quickly engage auto-completion and other features of SQL query editing in place in your editor. Improve overall app development flow.
Estimated Effort - Needs design thought, help from editor teams, 6 weeks
In your Java, PHP or other editor, be able to quickly test SQL embedded in the code. Place cursor inside SQL string, choose "Test SQL". This brings up table where you can enter in values for substitution parameters (with defaults provided) or modify the SQL string, and then click Execute and look at the results.
Adjust the SQL as necessary until you get the right results, click Done, and the SQL (modified if needed) is pasted back into your code.
In this use case, a user can hit a key or a choose a menu option and the tables currently used in the query are shown in a separate window/ pane along with the ability to quickly add associated tables as needed.
Focus on improving visual query editor. Not clear at this time what improvements need to be made here -- will focus more on this if we determine this is a priority.
Make visual query part of regular query editor, as an optional pane in the editor
Provide a simple, spreadsheet-like view to add data to a table.
Select a source and target connection, and import both schema and data from the database. The issue with this is that it becomes a Data Migration Featre, which is a huge rathole.
Probably should just support importing from between different db instances for the same db vendor (e.g. Java DB to Java DB)
Select a file, map columns to columns in one or more database tables. Auto-create the tables or map to existing tables. into
Select one or more tables, map columns to fields (or use defaults) and generate CSV file
Select one or more tables and generate XML for the data in those tables, using default mapping of table metadata->XML schema
Select a table, or select a table from the results of a query, and generate INSERT statements for the data in the table or results. This is useful for quickly sharing your test data with others on the development team.
A big challenge with developing in Ruby is that in the code you can't tell what methods exist on an ActiveRecord model object because these methods are generated dynamically at runtime based on the columns and associations in a table.
Also, you do not change a table schema directly in Ruby. Instead, you define migrations, and then Ruby applies migrations to the database for you.
There are times when you do need to drop into SQL in Ruby, in which case the standard SQL editing tools are useful.
User types myobj., and we introspect the table associated with the object and provide auto-complete that includes the accessors for the column names.
Auto-complete can also include support for associations (e.g. if Persons has many Addresses in the database, then show the person object with a getAddresses method) - N.B. need to check Ruby syntax).
Auto-complete would also show methods added by hand to the model object. We could color-code which methods are from the db and which are hand-added, and also allow the user to toggle to see just derived methods or just hand-added methods.
The user can selects a connection (or migration?), and then graphically view the model objects that are derived from this, along with their various associations.
Being able to see this alongside their code (e.g two separate panes) would be very useful.