List of features that make sense for NB, and how we would best provide integration (assuming we don't do the full UI)

Features in NetBeans (may include talking with WorkBench under the covers, but is integrated into NB)

  • SQL Editor (duplicated with WB)
  • Export schema to SQL DDL
  • Import/export results in various formats (csv, xml, INSERT stmts, JSON)
  • Quick and easy way to create database objects
  • Quick and easy way to alter database objects
  • Schema migrations ala RoR (? maybe in workbench)
  • Visual Query Editor (duplicated with WB?)
  • Provide model API to other modules in NB,
  • Model API accessible via FreeMarker for templating

Features for Workbench and other specialized DB tools (you need to launch workbench to access these)

  • ER Diagram
  • Schema compare/diff
  • Schema refactoring
  • Scripting of metadata model
  • Cache schema definitions (model file)
  • Manage users
  • Manage rights for users (GRANT/REVOKE)
  • View and change server properties and configuration

Use Cases for when we need to launch Workbench

ER Diagram

Import existing schema

  1. File->New E/R Diagram
  2. Wizard lets you pick an existing connection or create a new one
  3. NB launches Workbench, passing in connection information
  4. Workbench builds diagram from schema info, and you work in Workbench, organizing, etc.
  5. Save diagram
  6. Move back to NB (or exit Explorer), and diagram shows up as a new file in your project

Apply schema to database

  1. In Workbench, you run the command to create tables based on diagram
  2. When you go back to NB, the new tables are shown for the connection

Design new schema Same as import existing, except you don't import, just start from scratch

Modify existing schema

  1. List E/R diagrams in project (proably separate folder)
  2. Double-click diagram, Workbench is invoked with that diagram
  3. Alternately, right-click, choose "View PDF" and see PDF of diagram

Schema Compare/Diff

Three different use cases - compare two live connections, compare diagram against live connection, compare two diagrams, with the first being most common

  1. Right-click on a connection, choose "Compare Schema"
  2. Wizard prompts for second connection (or create a new one)
  3. Launch Workbench, which does the compare visually, or you can show alter statements/etc
  4. In Workbench, user may apply changes from one connection to the other
  5. When you get back to NB, the database connections reflect the changes.

Schema Refactoring

If you want to do lots of refactoring, probably just bring up Workbench.

These use cases are for one-off refactoring where we make use of the Workbench engine.

Refactor a column Can be change name, type, or size of a column, or delete a column

  1. Navigate to a column
  2. Right click, choose Refactor, and it gives you choices for change name, type, or size, or delete
  3. Dialog allows you to change name, type, or size
  4. Under the covers, we invoke Workbench API to apply the refactoring to the entire schema
  5. NB reflects changes applied
  6. Potentially highlight all source files referring to column name (when renaming column) and do something like add them to your todo list or highilght them in some other way.

Refactor a table Only real refactoring is rename table, delete table is just done in-place

  1. Navigate to a table, choose rename
  2. Wizard lets you change the name
  3. Refactoring is done "under the covers" without launching WB (? may require user interaction...)

MySQL Workbench roadmap including when things move from Enterprise to Community (David)

  • What moves from E to C and when
  • Discuss with MySQL possibility of doing X-database features sooner

Technical/feasibility analysis of doing the full UI

  • Understand status of "heavyweight component" in JDK (David)
  • Investigate JNA (Andrei)
  • Get VS.net - 2 license for 2005 and 2008 (David) <--
  • Get Workbench source code (Andrei) <--
  • Get it to compile (David/Andrei)
  • Understand Workbench UI architecture better (inspection and meetings with WB team) (David/Andrei)
  • Do our damndest to do a prototype as a learning exercise (David/Andrei)
  • Document our observations and conclusions
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo