An Introduction To Using Visual Analyst to Create an ERD - PowerPoint PPT Presentation

About This Presentation
Title:

An Introduction To Using Visual Analyst to Create an ERD

Description:

An Introduction To Using Visual Analyst to Create an ERD Let s Open the Driver s License ERD Let s Review the ERD: The Department of Motor Vehicles (DMV) Has ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 72
Provided by: Peeter6
Learn more at: http://pkirs.utep.edu
Category:

less

Transcript and Presenter's Notes

Title: An Introduction To Using Visual Analyst to Create an ERD


1
An Introduction To Using Visual Analyst to
Create an ERD
2
  • Visible Analyst is a Computer Aided Software
    Engineering (CASE) Tool
  • A quick Note In January 2003, The Visible
    Developer Professional Edition was selling for
    1,995 (Cheap!)
  • Among the models included are
  • Functional Decomposition (Business Model)
  • Shows the business functions and processes they
    support in a hierarchical structure
  • Entity Relationship Diagram (Data Model)
  • Shows the data entities of an application and the
    relationship between the entities
  • Object Model (Object Class Model)
  • Shows classes of Objects, Subclasses,
    Aggregations, and Inheritance

3
  • Visible Analyst Models (Continued)
  • State Transition Model (Real Time Model)
  • Shows object transition to and from various
    states and conditions and the events or triggers
    cause them to change between different states
  • Process Model (Data Flow Diagrams)
  • Shows how things occur in the organization via a
    sequence of processes, actions, stores, inputs
    and outputs.
  • Processes are decomposed into more detail,
    producing a layered hierarchical structure
  • Product Model (Structure Chart)
  • Shows a hierarchical, top-down design map of how
    the application will be programmed, built,
    integrated, and tested

4
  • Visible Analyst Models (Continued)
  • Use-Case Model
  • Shows the relationship between a user and the
    information system
  • Activity Model
  • A special form of the state diagram representing
    the performance of actions or subactivities
  • Sequence Model
  • Shows how objects collaborate in some behavior
  • Collaboration Model
  • Shows an interaction organized around the objects
    in the interaction and their links to each other
  • Repository Model (Database Project_
  • The Bible of Systems Analysis and Design

5
  • Open the Visible Analyst Program
  • The First Thing You will see is the start-up menu

6
  • The Next thing you will see is the main menu

To start a new project, select New Project from
the File Menu
7
  • When you do, another pop-up menu will appear

Click the OK Button
You have now created a Project called Medical
which will be stored (in this case) at C\VISABLE
Analyst\Data
8
  • Once you have created a project, Visible Analyst,
    by default, assumes you will creating a new
    diagram

It just happens to be an ERD
(Which is what we want)
Click the OK Button
9
  • You will now see the ERD Drawing Screen

Lets First add the Entity PHYSICIAN
Click on the Entity Button
When you do, your cursor will change
10
  • Move the cursor to some position on the screen
    (Or keep it where it is)
  • Then Right Click
  • Another Pop-up menu will then appear asking you
    to name the entity (Object)

PHYSICIAN
  • Label it PHYSICIAN
  • Then Press OK

11
  • You Have now created the Entity Physician
  • Next, we need to change to the select mode
  • Next we right-click on our entity PHYSICIAN

(A Pop-up Menu Will appear)
  • Choose Define

(We are going to add attributes)
12
  • Before we can go any further, we need to save our
    diagram

MEDICAL DATABASE
  • Lets label our diagram as MEDICAL DATABASE
  • And then Press OK

13
  • A New Pop-up Menu Will appear
  • This menu will first ask us for a description of
    the entity

Contains Information about the Physician employed
by the hospital
  • Describe what the database is for

(This will become part of the Repository)
  • Put in an appropriate description

14
  • Alias ??

(We will talk about that later --- Maybe ---)
Contains Information about the Physician employed
by the hospital
  • To add an attribute, Simply move your cursor to
    the add field, and start typing in the field name

PHYSID
Char
No
  • As soon as you do, some default values come up
  • These values refer to the data type,

the length,
and whether or not a Null value can be entered
15
  • We will first have to change the null (or
    missing) values, as necessary

Contains Information about the Physician employed
by the hospital
  • In our case, we know that PHYSID should be of
    length 9
  • Notes ??
  • A GREAT idea Put in thoughts about what this
    means if it turns out to be wrong, you can
    change it later

PHYSID
Char
No
9
This will be the primary key for the PHYSICIAN
table. It will also be the foreign key in table
PATIENT
  • Now ADD the attribute to the entity

16
  • And the attribute has been added
  • For the time being, lets assume that this is the
    only attribute
  • Click on the EXIT button

A Dialogue Box will remind to save our entry
  • Click YES

17
  • It may not look like we did anything, but we did
  • There are three ways of viewing the screen
  • The ENTITY LEVEL (which we are in)
  • The PRIMARY KEY LEVEL
  • The ATTRIBUTE LEVEL
  • To see the attribute added, Click on the
    ATTRIBUTE Level View

18
  • Notice that the Entity (PHYSICIAN) and the one
    attribute we entered (PhysID) are displayed
  • While we are at it, lets look at the PRIMARY KEY
    LEVEL screen
  • Click on the PRIMARY KEY LEVEL Button

19
Where is all the information?
  • The PRIMARY KEY LEVEL Screen Shows ONLY the
    Entity Name and the Primary Key
  • We didnt designate a Primary Key
  • Lets make PhysID the primary key
  • Once again, RIGHT-CLICK on the entity
  • And again, Choose DEFINE

20
  • Adding a Primary Key is extremely simple
  • Click on the primary key button
  • A new dialogue Box will appear
  • Click on the attribute you wish to make a Primary
    Key

PhysID
  • And it will appear in the Columns in Key Box
  • Now just press the OK Button

21
  • Notice that PhysID is now the Primary Key
  • Now lets go back and see our Diagram Screen
  • Click on the EXIT button

(This time there will be no reminder to save the
object)
22
  • Remember, we are still in the PRIMARY KEY LEVEL
    screen
  • Lets Add another Attribute

(You know the drill)
  • RIGHT-CLICK on the entity
  • And again, Choose DEFINE

23
  • Lets Add the attribute PhysName
  • Once again, the default values will appear in the
    Type and Null Fields

What if we dont Want the data type Char or we
wished to allow Null Values?
PhysName
Char
No
  • Change them

24
  • Lets change the attribute PhysName to an
    integer

(Yes -- I know thats dumb, but bear with me)
  • Click on the Scroll Bar button

PhysName
Char
No
25
  • The list of all available data types will appear
  • Choose the one you want
  • Integer ???
  • Small Integer ???

26
  • Clicking on the Null Scroll Bar will cause the
    possibilities to be displayed
  • At any rate, we want the attribute PhysName to
    be of data type Char and of length 30

(Which we would signify by entering 30 in the
length field)
30
27
  • Once again, after we have added our attribute, we
    need to add it to the list

28
  • As soon as we hit the add button, it will be
    added to the list
  • Lets go back to the Diagram Screen
  • Click Exit

(Again, there will be no reminder to save)
29
(I have added a few more Attributes)
  • Notice that we are in ATTRIBUTE LEVEL Mode

What if we want to add a constraint to an
attribute ??
  • Not a problem all we need to do is go back to the
    Define menu

30
  • Click on the Check Constraints Tab

31
  • Click on the Column Check Constraints Scroll Bar

(The complete list of attributes will appear)
  • Highlight the attribute you wish to put
    conditions on and click

32
  • Click the Add/Remove Button
  • Add the condition

33
  • Now lets add the entity PATIENT
  • Click on the Entity Button
  • Put the entity wherever you want
  • Once again, the label entity dialogue box will
    ask you to label the object

PATIENT
  • After that, Click on the OK Button

34
  • Add PATIENT Attributes as we did before

(Make sure you first choose the Select Mode)
  • Notice also that I have expanded the ENTITY folder

35
  • Were now ready to link the tables together
  • Choose the appropriate relationship from the menu
    bar

(In our case, this is a one (mandatory) to many
(optional) relationship)
36
  • After you click on the relationship button,
    simply connect the tables with your cursor

37
  • Another Dialogue box will appear asking you
    questions about the relationship

Treats
Treated By
  • May a Physician have Zero patients?
  • Enter the name of the relationship from PHYSICIAN
    to PATIENT
  • Enter the name of the relationship from PATIENT
    to PHYSICIAN
  • Click the OK Button

38
  • And we have set up a relationship between the
    tables

Have We ??
  • One nice feature about Visible Analyst is that it
    will Analyze our diagram for us

39
  • Click on the DIAGRAM Tool bar option
  • Now click on the Analyze Option
  • Another Menu will pop-up with available options
  • Click the OK Button
  • And, we Appear to be OK

40
  • Keep in mind that Visible Analyst is MORE that
    just a diagramming tool
  • It also maintains our REPOSITORY

41
  • Before going on, lets review what a Repository
    does
  • A repository is a database for a project that
    contains information both captured from your
    diagrams and entered directly by you.
  • It contains metadata that describes the
    organizations data and data processing resources
  • Provides information about
  • What users must know what
  • What automated CASE tools that are used to
    specify and develop information systems
  • All Applications that access and manipulate data
  • The DBMS that maintain the repository and update
    system privileges, passwords, and other
    information

42
  • Now, getting back to our Example
  • To check our repository, click on the
    REPOSITORY Tool bar option

43
  • Lets do a Key Analysis
  • We forgot to add our foreign key

44
  • The procedure for adding a foreign key is
    straight-forward
  • RIGHT-CLICK on the entity
  • And again, Choose DEFINE

45
  • One of the options on the Define Item Menu is
    Foreign Keys

46
  • First, Click on the attribute you wish as a
    foreign key

Physician
  • Then click on the field you want to relate the
    foreign key with

(The attribute will be added)
  • Save it
  • And Exit

47
  • Notice that our ATTRIBUTE LEVEL Screen reflects
    the addition of the foreign key
  • Lets check our repository to make sure
    everything is OK

What is going on ??
  • Pick Key Analysis

48
  • There are actually a few problems
  • Remember how we defined our PHYSICIAN Table
  • And our PATIENT Table
  • We have a mismatch between PHYSICIAN.PhysID and
    PATIENT.Physician

49
  • Another benefit of Visible Analyst is that it
    will correct these types of problems automatically
  • Once again, Click on Repository
  • Now Click on Key Synchronization
  • The Pop-up Menu will give you some options
  • Click OK

50
  • You will be asked to save your synchronization
  • So, Save it
  • Save this file too

NameItWhatYouWish
51
Are we OK now ??
  • Lets Check ---
  • Click on Key Analysis
  • We appear to be OK

52
  • Lets once again take a look at our tables
  • First, our PHYSICIAN Table
  • Next, our PATIENT Table
  • The Issue has been resolved

53
  • I have added two more entities

(You know how to do this)
  • Lets add the Associative entity TREATMENT
  • Aside from clicking on the Associative Entity
    Button (instead of the Entity Button, the
    procedure is the same

54
  • Next use the mouse to connect the entities
  • Then fill in the necessary information
  • First, lets relate PATIENT and TREATMENT

(This is a (mandatory) 1 to (optional) Many
relationship)
55
Are we OK now ??
  • Lets Check
  • Note that this is a WARNING not an ERROR

56
But what about the Repository ??
  • Lets Check that
  • Once again, we forgot our Foreign Keys

57
  • Open the DEFINE Menu

(Right-Click on TREATMENT)
  • Go to the Foreign Keys Option
  • First link PATIENT and TREATMENT
  • Choose the relationship
  • Then add the attribute
  • Move it to the Link

Patient
  • This time, Click on Migrate

58
Migrate ??
  • Key Synchronization migrates primary keys
    across normalized relationships to make Foreign
    Keys in other Entities
  • It also adds descriptive information about the
    relationship and the related entities to the
    Repository
  • When you created the entity, the Repository
    created an Associator Element Name for it
  • Visible Analyst uses this information for Key
    Analysis and Synchronization

59
  • Do the same thing for the other relationships
  • Select the relationship between TREATMENT and
    PRESCRIPTION
  • Add the attribute
  • Move it to the Link
  • Migrate

Prescription
  • Do it again for the relationship between
    TREATMENT and ILLNESS

60
  • Notice that a strange thing has happened
  • The attribute names have been changed to
    correspond with their labels in the tables they
    refer to

(Due to Synchronization)
  • We could change them, or just leave them as is

61
Are we OK now ??
  • Lets Check

62
  • The Only thing we havent done is set-up our
    Unary Relationship

(But we know how to)
  • Draw the relationship
  • Right-Click on PHYSICIAN
  • Choose Define
  • Add the field Supervisor
  • Set Supervisor as a Foreign Key

-- And Were Done ---
63
How do we Open a Different Project ??
  • First, Go to the File Option

64
  • Now Select the project
  • Lets Choose Project TEST
  • Then Click OK

65
  • Choose (highlight) Entity
  • Now open up the Diagram

66
  • Lets Open the Drivers License ERD

67
  • Lets Review the ERD

The Department of Motor Vehicles (DMV)
Many Individuals Apply for Licenses
Has Many Evaluators
An Applicant May take may Road Tests
The DMV May (Must?) Issue Many Drivers Licenses
Each Evaluator Gives many Road Tests
68
  • Lets Look at some of Visible Analysts other
    (ERD) options
  • We can Establish Database Security
  • We can Modify The Balancing Rules
  • We can Modify The SQL Dialect

69
  • We can Even
  • Generate the DDS

(Data Descriptor Specification)
  • Generate the SQL Code Needed
  • Create Reports
  • Create Report Queries

-- BUT NOT WITH THE STUDENT VERSION ---
70
?? Any Questions ???
71
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com