From the course: Practical Database Design: Implementing Responsible Data Solutions with SQL Querying

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Creating the database schema

Creating the database schema

- [Instructor] With the meticulous attention that you paid to the database design, you've set yourself up for an easy creation of the database schema, and MySQL Workbench does the heavy lifting for you. The database schema, as a reminder, is the blueprint that describes how the data is connected to each other and amongst the tables. It consists of SQL create table definitions. The syntax goes like this. Key word create table with user-defined table name, open parentheses, then list each column name with accompanying data type, list the primary keys, list the foreign keys, as needed, and then close the parentheses with the semicolon at the end. Since your data model has been inputted into MySQL Workbench, you can generate the database schema with just a few clicks. All you need to do is go to File, Export, Forward Engineer, SQL Create Scripts. Now you've launched the MySQL script maker tool. You can save the script to a file and name it whatever you want. On this top text field, let's…

Contents