dbdesginer tutorial lecture

23
DB Designer 4 Tutorial Bayan Ghozlan

Upload: api-19819996

Post on 18-Nov-2014

729 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

DB Designer 4 Tutorial

Bayan Ghozlan

Page 2: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Our Agenda in DB Designer 4:

DBDesiner 4 Overview

DBDesiner 4 IDE Interface

Database Modeling

Creating and Editing

Tables and Relationships.

Page 3: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 4: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 5: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 6: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

The User Interface

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

Page 7: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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)

Page 8: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 9: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 10: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Display MenuDesign 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],..)

Page 11: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Display MenuTable 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.

Page 12: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 13: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Database MenuSynchronization: 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.

Page 14: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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

Page 15: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 16: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 17: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Palettes

Palettes are floating windows which always stay on top and provide fast access to important functions.

Page 18: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Tool Palette

Page 19: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 20: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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

Page 21: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 22: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

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.

Page 23: DBdesginer Tutorial Lecture

DB Designer Bayan Ghozlan

Reference:

DB Designer online documentation Version 1.0.42

Thank you

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