Nicolás Valdenegro C.
Tutorial of
MySQL Workbench
DATABASE
900BD05
Content
Data Model.
Change database name
Create a Table
Data Types
Relationship between Tables
Generation of the tables
15/05/2014
Nicolás Valdenegro C.
Download MySQL Full
[Link]/downloads/mysql/
15/05/2014
Nicolás Valdenegro C.
Data Model
1
Attentions
PK Patient Route
Patient Name
N
Doctors
Address
PK Rut Doctor
Diagnosis
Fecha_Atención
Treatment
Doctor Name
FK Code_Spec
Emergency Phone
1
FK Rut_Doctor
N
Specialties
PK Código_Espec
Description
15/05/2014
Nicolás Valdenegro C.
MySQL Workbench
Search for this icon on the Desktop:
And double click
15/05/2014
Nicolás Valdenegro C.
Database
Data Modeling
15/05/2014
Nicolás Valdenegro C.
Click on the circle with the + symbol
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
Palette of
Navigation
Area of
Work
Bar
Tool
Base of
Data
15/05/2014
Nicolás Valdenegro C.
Change the name of the database
Secondary mouse button
And choose 'Edit Schema'
SCHEMA = BASE DE DATOS
15/05/2014
Nicolás Valdenegro C.
Change the name of the DB
15/05/2014
Nicolás Valdenegro C.
Create a Table
To place a new table in the
model, select the table in the bar of
tools.
The mouse cursor will change the effect to
the selected tool.
15/05/2014
Nicolás Valdenegro C.
Create a Table
To insert the table click on the
left in the model. A will be created.
nueva tabla. Se llamará [table 1].
15/05/2014
Nicolás Valdenegro C.
Create a Table
Double click on the table name
with the mouse. It will unfold at the part
under the 'Table Editor' window.
Primary Key
Binary
No Null
AutoIncrement
Without data type
unique index
15/05/2014
Nicolás Valdenegro C.
Create a Table
Name of
the table
Name of
Column
(attribute)
Data Type
(metadata)
15/05/2014
Nicolás Valdenegro C.
Create table name
Upon entering the table name,
the first column is
automatically, it has
defined as key
main of the table
indicated by an icon
to the left key
of the column names.
15/05/2014
Nicolás Valdenegro C.
Data Types
Integers
Numbers and letters
Decimal numbers
Date
15/05/2014
Nicolás Valdenegro C.
Attention Table List
15/05/2014
Nicolás Valdenegro C.
Create the other 2 tables
15/05/2014
Nicolás Valdenegro C.
Relationship between Tables
One-to-one relationship
1 to N relationship
Two types of Notation
of the relationship
1 to 1 relationship
One to Many Relationship
N to N relationship
15/05/2014
Nicolás Valdenegro C.
Table Relationship
15/05/2014
Nicolás Valdenegro C.
Relationship between Tables
15/05/2014
Nicolás Valdenegro C.
Save
ó
15/05/2014
Nicolás Valdenegro C.
Table generation
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
Delete the objects
before creating them
Delete the Schema
Skip the creation
of the foreign keys
15/05/2014
Nicolás Valdenegro C.
Export
the tables
Export
the views
Export
the routines
Export
the Triggers
Export the objects
of users
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
Verification of the creation of the tables
15/05/2014
Nicolás Valdenegro C.
Double click
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.
15/05/2014
Nicolás Valdenegro C.