Creating Your First Table
Last updated
Last updated
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 ? 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.
In MySQL Workbench, connect to your UML database
Expand the options under your name and you should see Tables
Either Right-Click on Tables and choose Create Table or click on the Create Table Icon in the toolbar.
In the Table Name, enter articles
.
Add the columns id, title, description, createdDate, and status by filling out the column area according to the image below:
Click on Apply.
A window will popup with a some code in the SQL Language which was generated by your entries and the options chosen.
Click on Apply.
Your table should appear under the Tables section in the left hand column.