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)
- Shows the relationship between a user and the
information system
- A special form of the state diagram representing
the performance of actions or subactivities
- Shows how objects collaborate in some behavior
- 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)
- Another Pop-up menu will then appear asking you
to name the entity (Object)
PHYSICIAN
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)
(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
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(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
- 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
A Dialogue Box will remind to save our entry
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)
- 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
19Where 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
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
(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
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
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
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
(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
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
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
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- We forgot to add our foreign key
44- The procedure for adding a foreign key is
straight-forward
- RIGHT-CLICK on the entity
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)
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 ??
48- There are actually a few problems
- Remember how we defined our PHYSICIAN 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
50- You will be asked to save your synchronization
NameItWhatYouWish
51Are we OK now ??
52- Lets once again take a look at our tables
- First, our PHYSICIAN 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)
55Are we OK now ??
- Note that this is a WARNING not an ERROR
56But what about the Repository ??
- Once again, we forgot our Foreign Keys
57(Right-Click on TREATMENT)
- Go to the Foreign Keys Option
- First link PATIENT and TREATMENT
Patient
- This time, Click on Migrate
58Migrate ??
- 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
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
61Are we OK now ??
62- The Only thing we havent done is set-up our
Unary Relationship
(But we know how to)
- Set Supervisor as a Foreign Key
-- And Were Done ---
63How do we Open a Different Project ??
- First, Go to the File Option
64 65- Choose (highlight) Entity
66- Lets Open the Drivers License ERD
67The 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(Data Descriptor Specification)
- Generate the SQL Code Needed
-- BUT NOT WITH THE STUDENT VERSION ---
70?? Any Questions ???
71(No Transcript)