Creating Your First Table

Data Tables look very similar to spreadsheets in that the table can be visualized in rows and columns. Each row is an individual item and each column is a piece of information about that item.

When designing a database, you need to define what columns you are going to have. For our purposes here, we are going to make a data table that is going to hold articles or other little "blurbs" about our bookstore. What form elements when into the form we created in Creating An HTML Form with Bootstrap? There were three:

  • Title

  • Description

  • Active

The first table we are going to create is going to have columns for those three pieces of information as well as the date the article was written and whether or not it is active.

Steps to Creating the Table

  1. In MySQL Workbench, connect to your UML database

  2. Expand the options under your name and you should see Tables

  3. Either Right-Click on Tables and choose Create Table or click on the Create Table Icon in the toolbar.

  4. In the Table Name, enter articles.

  5. Add the columns id, title, description, createdDate, and status by filling out the column area according to the image below:

  6. Click on Apply.

  7. A window will popup with a some code in the SQL Language which was generated by your entries and the options chosen.

  8. Click on Apply.

  9. Your table should appear under the Tables section in the left hand column.

Last updated