O'Reilly logo

MySQL Management and Administration with Navicat by Gokhan Ozar

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

Exporting the model diagram to SQL

We have completed the design of a simple, yet functional, database model design. Now, it's time to put it to some use.

I mentioned earlier, the possibility of generating a database from a model. To achieve this with a model we designed from scratch, we first need to export our design to a .sql file.

On the Mac, there's a button labeled Export SQL on the toolbar of the Model Designer window. When you press it, the canvas is masked with an export settings form, where you must indicate which tables to export and optionally specify some advanced settings, such as excluding DROP statements, primary keys, indexes, and foreign keys from the generated SQL. You can leave these untouched if you don't want to omit anything. ...

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