Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (2024)

<Do not delete this text because it is a placeholder for the generated list of "main" topics when run in a browser>

Purpose

This tutorial shows you how to work with Logical Model Diagrams, Displays and Subviews with Oracle SQL Developer Data Modeler. In addition, forward and reverse engineering will also be discussed.

Time to Complete

Approximately 30 minutes

Overview

Oracle SQL Developer Data Modeler offers a full spectrum of data and database modeling tools and utilities, including Entity Relationship modeling, Relational (Schema), Data Types or Object Types modeling, and Multidimensional modeling and DDL generation. It includes importing from and exporting to a variety of sources and targets, provides a variety of formatting options and validates the models through a predefined set of Design Rules.

Oracle SQL Developer Data Modeler will be released as an extension to SQL Developer and as a standalone product, for those developers who only want to work with visual data modeling.

In this tutorial, you import a schema from the DB catalog, reverse engineer the relational model to create a logical model, create a subview and display, create two subtypes for an entity, forward engineer to a new relational, create a type and associate the new type with a table and then reverse engineer the modified table to synchronize the relational and logical models.

Importing Schema From the Data Dictionary

In this section, you import the HR schema from the Data Dictionary to create a relational model. Perform the following steps:

.

Open Oracle SQL Developer Data Modeler from the icon on your desktop. If you performed the previous tutorial, and did not exit Oracle SQL Developer Data Modeling, select File > Close to close the model you previously worked on.

.

Select File > Import > Data Dictionary.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (1)

.

You need to create a database connection. Click Add.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (2)

.

Enter the following and click Test Connection.

Connection Name: <your_sid>_system
Username: system
Password: <your password>
Select Save Password check box
Hostname: <your_hostname>
SID:<your_sid>

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (3)

.

Your connection was successful. Click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (4)

.

Click OK again.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (5)

.

Select your connection from the list and click Next.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (6)

.

Select the check box in front of the HR schema and click Next.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (7)

.

Under the Tables tab, click the Select All icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (8)

.

Click Next.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (9)

Click Finish.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (10)

.

Review the log. Click Close when done.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (11)

.

The relational model is created successfully. In the next section, you reverse engineer to create the logical model.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (12)

Reverse Engineering a Relational Model to Logical Model

In this section, you reverse engineer the relational model to create a logical model. Perform the following steps:

.

Select the Engineer to Logical Model icon. An engineering window opens.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (13)

.

The warning icons indicate that objects are different between the relational and logical model. Expand the Tables object.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (14)

.

The plus sign icon indicates that the tables will be added to the logical model. Click Engineer.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (15)

.

The logical model is created successfully. In the next section, you create a subview that contains only the entities related to the employees table.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (16)

Creating a SubView

In this section, you create a subview for the logical model based on the entities related to the employees table. Perform the following steps:

.

Right-click the background of the diagram. There are 3 different notations you can use. In this tutorial, you select Bachman Notation. Note that the Barker notation is used by default.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (17)

.

The Bachman notation is now used.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (18)

.

Right-click the employees entity and select Select Neighbors.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (19)

.

Accept the default of 1 zone and click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (20)

.

Notice that the entities related to the employees table are selected. Right-click the EMPLOYEES entity again and select Create SubView from selected.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (21)

.

A subview of just the entities selected is created.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (22)

Manipulating Different Displays

In this section, you create 2 different displays of the subview you just created. A display allows you to change the way the diagram looks based on the same set of Logical or Relational Model objects. Perform the following steps:

.

Right-click the white space on the subview and select Create Display.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (23)

.

You can minimize the amount of detail in the diagram. Right-click the white space in the diagram (make sure your cursor is not on an object) and select View Details > Names Only.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (24)

.

Only the Entity Names are displayed.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (25)

.

Reduce the size of one of the entities by selecting the entity and dragging the corner so that the entity is a smaller size.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (26)

.

Shift-select each entity on the diagram. Select Edit > Equal Width.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (27)

.

Notice that all the entities have now the same width on the diagram. The width you obtain is based on the width of the first object you selected. Select Edit > Equal Height.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (28)

.

All the entities are now of equal width and height. Again, the height you obtain is based on the height of the first object you selected. You can also redraw the lines manually. Right-click the white space of the diagram and select Auto Route to deselect it.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (29)

.

Move the entities to maximize space and redraw the lines.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (30)

.

There may be some lines you want to manipulate manually instead of them being redrawn automatically. To manually adjust the lines, you need to turn Auto Route off. Right-click the white space in the diagram and select Auto Route.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (31)

.

If you want to move a line to another edge of the entity, select the line. Select the square in the middle of the line. This is called an Elbow.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (32)

.

Drag the Elbow to the desired location and release

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (33)

.

In this example, you also want to drag the other elbow to another location.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (34)

.

The screenshot below is the result of moving entities and lines around to maximize space.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (35)

.

You can create another display that looks different. Right-click the Logical - SubView 1 and select Create Display.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (36)

.

Right-click the white space of the diagram and select Barker Notation.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (37)

.

Right-click the white space and select View Details > All Details.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (38)

.

The details are displayed for each entity using the Barker Notation. Make the entities bigger so you can see all the attributes and redraw the lines so that they are straight and minimize intersection.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (39)

.

In the Browser tree, expand Logical > SubViews > Logical - SubView_1 > Displays. Double-click Display_1.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (40)

.

Change the name of the display to Bachman - Names only and click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (41)

.

Double-click Display_2. Change the name of the display to Barker - All Details and click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (42)

.

Your display names have changed. In the next section, you create 2 subtypes for the EMPLOYEES entity.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (43)

Adding Two Subtypes to an Entity

In this section, you add 2 subtypes to the EMPLOYEES (supertype entity). Perform the following steps:

.

From the Barker - All Details Display, select the Create Entity icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (44)

.

Select anywhere in the white space of the diagram. Enter Sales for the Name and select EMPLOYEES for Super Type. Then select Attributes from the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (45)

.

Select the Add Attribute icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (46)

.

Enter Commission Percent for the Name and click Logical for Datatype. Select NUMERIC from the Type drop list, enter 2 for Precision and 2 for Scale. Click OK to create the subtype.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (47)

.

Notice that the SALES subtype entity sits inside the the super type EMPLOYEES entity box. The default is the Box-in-Box Presentation.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (48)

.

You may need to enlarge the EMPLOYEES supertype entity and reduce the size of the SALES subtype entity.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (49)

.

You want to create a relation between the supertype EMPLOYEES and the subtype Sales to store the Account Manager. Select the 1:N relation icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (50)

.

First select the EMPLOYEES entity.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (51)

.

Then select the Sales subtype.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (52)

.

A new relation will be created between the EMPLOYEES Supertype and Sales Subtype. Click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (53)

.

You can move the subtype and relation so that it is presented optimally. Now that you have created the relation between EMPLOYEES and Sales, you want to rename the relation to Account Manager. Double-click the Sales subtype.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (54)

.

Select Attributes in the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (55)

.

Select the EMPLOYEE_ID attribute from the list. Notice that EMPLOYEE_ID is listed as a foreign key attribute. You can't change the name without changing a preference setting first. Click Cancel.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (56)

.

Select Tools > Preferences.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (57)

.

Expand Model and select Logical. Deselect the Keep as the name of the Originating attribute option and click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (58)

.

Double-click the Sales subtype again.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (59)

.

Select Attributes from the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (60)

.

Select the EMPLOYEE_ID attribute from the list. Change EMPLOYEE_ID to Account Manager and click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (61)

.

You want to create one more subtype called Non-Sales. Select the New Entity icon and click in the white space on the diagram.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (62)

.

Enter Non-Sales for the Name, select EMPLOYEES for the Supertype and click Attributes in the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (63)

.

Select the Add Attribute icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (64)

.

Enter Bonus Amount for the Name and select the Logical Datatype. Select NUMERIC from the Logical Type drop list and enter 10 for Precision and 2 for Scale and click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (65)

.

Your Non-Sales subtype was created successfully. You can can resize and move the subtype so that they align correctly in the EMPLOYEES subtype box. In the next section, you forward engineer to a new relational model.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (66)

Forward Engineering to a New Relational Model

In this section, you forward engineer your logical SubView to a new relational model. Perform the following steps:

.

You first need to create a new relational model to forward engineer your subview into. In the left navigator, right-click Relational Models and select New Relational Model.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (67)

.

The relational model Relational_2 was created successfully.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (68)

.

To view the forward engineering strategy for the EMPLOYEES Supertype and its subtypes, select Logical-SubView_1 tab and double-click the EMPLOYEES super type entity.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (69)

.

Review the list under FWD Engineer Strategy. Notice that this field is currently set to Single Table which means that all the attributes from supertype and both subtypes will engineer to one table in the relational model. Leave this setting.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (70)

.

Click Attributes in the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (71)

.

Select the COMMISSION_PCT attribute and click the Remove icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (72)

.

Click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (73)

.

Now you are ready to create the relational model. Select the Engineer to Relational Model icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (74)

.

On the left drop down, select Logical - SubView_1. On the right drop down, select Relational_2. You can expand the tree on either side to view how the model will engineer and what objects will be impacted. When done, click Engineer.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (75)

.

Your SubView of the Logical model was engineered and the results are displayed. Notice that the attributes from the subtype entities appear in the EMPLOYEES table in the relational model. You want to change the names of the columns that were added. Double-click the EMPLOYEES table.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (76)

.

Click Columns in the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (77)

.

Change the names as follows and click OK.

Attribute Column
Commission Percent COMMISSION_PCT
Account Manager ACCOUNT_MGR
Bonus Amount BONUS_AMT

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (78)

.

Your changes were made successfully. In the next section, you create a Type for Employee Address.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (79)

Adding a New Type

In this section, you create a new Type for emp_address_typ. Perform the following steps:

.

You want to show the data type model. In the left navigator, right-click DataTypes and select Show.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (80)

.

Select the New Structured Type icon and click the white space on the diagram.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (81)

.

Enter emp_address_typ for the Name and click Attributes in the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (82)

.

Click the Add icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (83)

.

Enter street for Name and select Logical for Datatype. Select VARCHAR for Type, enter 40 for Size. You want to create another attribute. Click the Add icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (84)

.

Enter city for Name and select Logical for Datatype. Select VARCHAR for Type, enter 30 for Size. You want to create 2 more attributes. Click the Add icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (85)

.

Create 2 more attributes using the previous steps, then click OK.

Attribute Datatype
state CHAR(2)
postal_code VARCHAR(10)

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (86)

.

Your datatype is displayed. You want to assign this datatype to a new column in the EMPLOYEES table. Click the Relational_2 tab.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (87)

.

Double-click the EMPLOYEES table.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (88)

.

Select Columns in the left navigator.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (89)

.

Click the Add column icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (90)

.

Enter Address for the Name. Click the Structured datatype select emp_addtress_typ from the drop-down list.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (91)

.

Click OK.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (92)

.

Your table has been updated with a new column that uses the emp_address_typ. In the next section, you reverse engineer (engineer to logical model) the Address column to the super type entity EMPLOYEES.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (93)

Synchronizing Relational and Logical Models

In this section, you engineer the column you added in the EMPLOYEES table to the super type entity in the Logical Model. Perform the following steps:

.

With the Relational_2 tab selected, click the Engineer to Logical Model icon.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (94)

.

Under Relational_2, expand Tables mapped to Hierarchies. Expand the second EMPLOYEES node and its columns in the list. This node corresponds to the Sales subtype in the Logical Model. You do not want the Address column added to the Sales subtype. Make sure the check box in front of Address is not checked.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (95)

.

Expand the EMPLOYEES node that corresponds with the Non-Sales entity and its columns in the Logical model. You do not want Address to be added to the Non-Sales subtype. Make sure the check box in front of Address is not checked.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (96)

.

Scroll up the list and expand the first EMPLOYEES node to see that the Address column will be added to the super type. Make sure the the check box in front of Address is checked. Then click Engineer.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (97)

.

The Logical Model is displayed. Click the Logical - SubView_1 tab.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (98)

.

Notice that the Address column was added to the EMPLOYEES super type. It was not added to the Sales or Non-Sales subtypes.

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (99)

Summary

In this tutorial, you have learned how to:

  • Import a schema from the DB catalog
  • Reverse engineer a relational model to a logical model
  • Create a SubView
  • Add two subtypes to an entity
  • Forward engineer to a new relational model
  • Add a new (structures) data type
  • Synchronize your relational and logical models

Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (100)

About Oracle |Oracle and Sun | | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Your Privacy Rights
Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews (2024)

References

Top Articles
UESP:ESO Character Build Data
Why did the devs have to ruin Pillar of Nirn?!
# كشف تسربات المياه بجدة: أهمية وفوائد
M3Gan Showtimes Near Amc Quail Springs Mall 24
[Re-Usable] - SSNSonicHD - Expanded & Enhanced
Hk Jockey Club Result
Old Bahama Bay Quad Folding Wagon
8776685260
Seacrest 7 Piece Dining Set
Flag Mashup Bot
What is international trade and explain its types?
Julia Is A Doctor Who Treats Patients
Gt7 Roadster Shop Rampage Engine Swap
Www.patientnotebook.com/Prima
Haktuts Coin Master Link
Astral Ore Calamity
Andrew Davis Vsim
Promotional Code For Spades Royale
Craigs List Duluth Mn
Shadbase Get Out Of Jail
Gander Mountain Mastercard Login
Wilson Tattoo Shops
Junior&#039;s Barber Shop &amp; Co &#8212; Jupiter
SF bay area cars & trucks "chevrolet 50" - craigslist
Week In Review: Chaos at BDSwiss , IronFX Founder's Prop Firm, US FX Deposits, and More
Tqha Yearling Sale 2023 Results
Aig Cyberedge Policy Wording
Publix Christmas Dinner 2022
Broncos vs. Seahawks: How to Watch NFL Week 1 Online Today
Rate My Naughty.com
247 Transfer Portal Rankings Basketball
12000 Divided By 40
Google Flights Missoula
Februarycash2023
Nasenspray - Wirkung, Anwendung & Risiken
Below Her Mouth | Rotten Tomatoes
What Auto Parts Stores Are Open
Planet Zoo Obstructed
Ebk Jaaybo Net Worth
Craigslist Tools Las Cruces Nm
Babyboo Fashion vouchers, Babyboo Fashion promo codes, Babyboo Fashion discount codes, coupons, deals, offers
Famous Church Sermons
Indium Mod Fabric
Fired Dies Cancer Fired Qvc Hosts
Meshuggah Bleed Tab
Mystery Mini Icon Box
Craiglist Horses For Sale
Giorgia Meloni, die Postfaschistin und ihr "linker" Lebensgefährte
The Ultimate Guide To Lovenexy: Exploring Intimacy And Passion
Basketball Stars Unblocked Games Premium
Evalue Mizzou
The Ultimate Guide to Newquay Surf - Surf Atlas
Latest Posts
Article information

Author: Tuan Roob DDS

Last Updated:

Views: 5894

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.