O'Reilly logo

Google Web Toolkit 2 Application Development Cookbook by Shamsuddin Ahammad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining foreign keys

In this recipe, we are going to create the Employee table with the foreign key attribute, namely, BranchId.

Getting ready

Open the MySQL Query Browser and create the employee table, as we did in the preceding recipe.

Getting ready

How to do it...

  1. Select the Foreign Keys tab.
  2. Press the + (plus) symbol at the bottom.
  3. Enter FK_Employee_Branch_BranchId as the Foreign Key Name.
    How to do it...
  4. Click on OK.
  5. Select Branch from the Ref. Table.
  6. Select Restrict from the On Delete combo box.
  7. Select Cascade from the On Update combo box.
  8. Click on Apply Changes | Execute.
  9. Click on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required