UI Specification for Support of Sakila Database in NetBeans

Issue 134307

Sakila is the 'standard' sample database for MySQL. It is a useful database because it has a rich schema and lots of data.

We would like to make it very easy for NetBeans users to create and work with the Sakila database.

Today you can get the SQL to create the database, but it turns out it does not work with the NB SQL Editor:

  • The file is so big (2 MB) that our editor infrastructure hangs (Issue 136539).
  • The file uses international characters that cause errors for our SQL parser (Issue 136541)
  • The file creates multi-statement stored procedures and triggers that cause errors for our SQL parser

We need to fix these issues and also make it easy from NetBeans to quickly create this database.

In the MySQL node we already have the ability to create sample databases. It would be great to use this for Sakila as well.


Right now if you click on the drop-down, the standard samples (sample, travel and vir) are shown. From the UI perspective we would just add sakila to the list.

The trick is the Sakila script is 2MB in size, and we don't want to require all users to download this when only a small percentage will actually use Sakila.

What we want to do instead is to provide Sakila support as a separate module (NBM) that can be downloaded from the Update Center (TODO: Investigate and understand exactly where this module should go and the process for publishing it).

Even though it's an add-on, we still want to integrate it in with the existing support for creating sample databases for MySQL.

So the UI change is quite simple.

This does require making some changes to how sample databases are created, including the ability to detect when the Sakila module is there and add it to the drop-down when it is. But this should be pretty manageable using Lookup.

The other work will be to make it possible to load the Sakila SQL without encountering the errors described above.

Until the hanging problem is solved, we will need to either run the SQL directly through JDBC or split up the SQL files so they are of a manageable size for the editor.

I will also need to investigate and fix the international strings issues.

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