You are on page 1of 23

DB Designer 4

Tutorial
Bayan Ghozlan
DB Designer
:Our Agenda in DB Designer 4

DBDesiner 4 Overview
DBDesiner 4 IDE Interface
Database Modeling
Creating and Editing
Tables and Relationships.

DB Designer
Introduction
DB Designer 4 is a free available DB design system.
Integrates DB design, modeling, creation and maintenance.
It is written for Microsoft Windows XP and Linux KDE/Gnome to
support both, the Windows and the Linux platform.
DBDesigner 4 is developed and optimized for the MySQL
-Database.

DB Designer
Introduction
In DBDesigner 4, you always work within a model.
A model is a visualization of the meta-information stored
in a database (e.g. Tables, Relations, ...).
You can create and maintain as many models as
needed, containing a unlimited number of objects.

DB Designer
Introduction
An object can be :
– A database table with columns and indices.
– A relation between two tables.
– A a note, ...
Models can be designed by placing these objects onto
the model's canvas or can be retrieved from existing
databases using the reverse engineering function.

DB Designer
The User Interface
The user interface has been based on industry standard layouting
software. This makes creating your database models very easy.

DB Designer
Main Elements-The Main Menu

File - New creates a new empty


model.
File-Open opens an existing
model from your hard disk or
mapped network device.
File - Open from Database: makes
it possible to open a model saved
in a database.
(may stored more than one model in the
DB, so you have to select the
appropriate model)

DB Designer
Open recent displays a list of the last opened models.

Add Model ... lets you add an existing model to the


currently opened model.

Save in Database: It is possible to store the model


directly in the database you work on. a DB-Connection
Dialog pops up and you have to select the database
which will containing the model. You have to enter the
desired name of the model and the model will be stored.

DB Designer
Delete selected: removes all
selected objects from the model.
When this happens unintended
you can use the undo command.
Select All: to select all objects
from the model.

DB Designer
Display Menu
Design Mode :Select this
menu item to change to Design
Mode.
Query Mode: Select this
menu item to change to
Query Mode.
Notation: specifies
the notation used to display
the model. (EER, EER [1,n],..)

DB Designer
Display Menu
Table Columns- Entity Level will specify how tables are displayed
on the model. Use this option to hide all column information.

Table Columns -Primary Key Level: selected, only primary key


columns are displayed.

Table Columns -Attribute Level: to display all columns of the


tables.

Table Columns -Physical Schema Level: to display the data types


of the columns.

DB Designer
Display Menu
Table Columns-Show Foreign Keys: select foreign keys
are shown as columns in the appropriate tables.

Display Relation Names: can be selected to display the


names of relations.

Display Page Grid: to show the partitioning of printable


pages. You can use the Page & Printer Setup Dialog to
change the initial page size.

DB Designer
Database Menu
Synchronization: means that DB Designer4
scans all tables in the existing database and
checks for differences:
1. If a table is present in the model in DB
desighner but not in the database, the
according SQL CREATE TABLE statement is
executed.

2. If the table is not present in the model but in


the database it can be deleted depending on
user settings.

3. If the table exists in the model and the


database as well, all fields are compared and,
if there is a difference, the appropriate SQL
ALTER TABLE statements are executed.

DB Designer
Database Menu
Reverse Engineering: to reverse engineering a database means to
connect to a database server, take an existing database and
automatically build a database model based on the meta information
in the database.

Within DBDesigner 4:
- All table information is extracted from the meta information .
- Relation between the tables are rendered based on table and field
names.
The process of reverse engineering is possible with MySQL, Oracle
and any database which is accessible by ODBC

DB Designer
Options Menu
Model Options
will call the Model Options Dialog
where several options can be set
for the model like the default
datatype or the display font.

DBDesigner Options
will call the Model DBDesigner
Options Dialog where several
general options can be set.

DB Designer
Windows Menu
Cascade, Tile: several models
windows arrangement.
Style  Standard , Motif, SGI ,
Platinum: to change the overall
appearance of the DBdesigner
program.
Toolbar: to show or hide left side
docked toolbar.
Tools palette: to show the previous
one as a free window.

DB Designer
Palettes

Palettes are floating windows which always stay


on top and provide fast access to important
functions.

DB Designer
Tool Palette

DB Designer
The Navigator Palette

Its at (top right), shows


the current visible
region of the model and
can be used to navigate
on. The current visible region is
marked by a blue rectangle
You can zoom the
canvas in and out up to
your choice.

DB Designer
The Data types Palette
(middle right), the
Common types-tab
shows the most used
Data types are visible
and are ready to be
dragged onto table
columns.
All types-Tab to display
all available datatypes

DB Designer
The DB-Model-Palette
Displays all existing tables in
the model and their columns
and relations.
Click on the plus symbols to
display the columns and
relations of a table.
Double click on a table to call
the Table Editor. you can edit
and change any of it’s
properties.

DB Designer
The Statusbar
Has three jobs:
– To Read and set the zoom
factor to a predefined value,
fast.
– If the database model is
modified the indicator left to
the Zoom Factor Edit is
painted red.
– Disc Icon used to save to
model to disk.
– Database Icon used to save
the model in a Database.
– Displays information about
the currently selected Tool.

DB Designer
Reference:
DB Designer online documentation Version 1.0.42

Thank you
Material will find them at:
http://www.esnips.com/web/CIS260DatabaseLab

DB Designer

You might also like