using er studio n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Using ER/Studio PowerPoint Presentation
Download Presentation
Using ER/Studio

Loading in 2 Seconds...

play fullscreen
1 / 19

Using ER/Studio - PowerPoint PPT Presentation


  • 192 Views
  • Uploaded on

Using ER/Studio. Modeling a Relational Database Using ER Studio. We will use ER Studio as the modeling Tool to build ER diagrams. ER Studio Supports the system catalog concept as well as recording information needed to support the data dictionary

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Using ER/Studio' - claude


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
modeling a relational database using er studio
Modeling a Relational DatabaseUsing ER Studio
  • We will use ER Studio as the modeling Tool to build ER diagrams.
  • ER Studio Supports the system catalog concept as well as recording information needed to support the data dictionary
  • Fully specified logical models in ER studio can be used to generate DDL
    • the code of the create tables statements
set options to produce crow s foot notation
Set Options to Produce Crow’s-Foot Notation

Pick logical

Pick options from tools drop-down

Choose Crow’s feet notation

adding relationships by type
Adding Relationships by Type

identifying

Non- identifying

Optional

Non-identifying

Mandatory

relationship types
Relationship Types
  • Identifying
    • Strong relationship child entity is a weak entity
    • Primary key of 1st entity becomes a foreign key and part of the primary key of 2nd entity clicked.
  • Non-identifying Mandatory
    • Weak relationship child entity is a strong entity
    • Primary key of 1st entity specified becomes a foreign key in 2nd entity and foreign key attribute is not null
  • Non-Identifying Optional
    • Weak relationship child entity is strong
    • Primary key of 1st entity specified becomes a foreign key in 2nd entity, but the foreign key attribute can be null.
identifying relationship specification
Identifying Relationship Specification

For identifying relationships, Primary key of parent is automatically added to primary key of the child table

To complete this specification Phone_No should be added to the primary key of PATRON_PHONE

creating a sub class hierarchy
Creating a Sub-Class Hierarchy
  • First create the Super-Class and sub-Class entities
    • Add at least the primary key to the super-class entity
  • From the insert Drop-down, select sub-type cluster, then
    • pick either complete or incomplete
    • Click on the super-class entity
    • Control-click on the first subclass entity & continue until all sub-class have been linked in

(see next slide for menu option, following slide for result.)

saving the model
Saving the Model

Change to desired H or J drive space

generated sql for data definition language
Generated SQL for Data Definition Language

--

-- TABLE: ormCustomer

--

CREATE TABLE ormCustomer(

custnumber NUMBER(10, 0) NOT NULL,

name VARCHAR2(20),

CONSTRAINT PK1 PRIMARY KEY (custnumber)

)

;

--

-- TABLE: ormOrder

--

CREATE TABLE ormOrder(

ordernumber NUMBER(10, 0) NOT NULL,

orderdate DATE NOT NULL,

total NUMBER(10, 0),

custnumber NUMBER(10, 0) NOT NULL,

CONSTRAINT PK2 PRIMARY KEY (ordernumber)

)

;

--

-- TABLE: ormOrder

--

ALTER TABLE ormOrder ADD CONSTRAINT ReformCustomer31

FOREIGN KEY (custnumber)

REFERENCES ormCustomer(custnumber)

;