Oracle Designer Tutorial |
Any application you develop will store and manipulate information, so an essential part of developing a system is constructing an accurate model of the information needs of an organization. The information model will act as a framework for the development of new or enhanced systems.
One technique used to model an organization’s information requirements is entity relationship modeling. Entity relationship modeling involves identifying the things of importance in an organization (entities), the properties of those things (attributes) and how they are related to one another (relationships).
The Entity Relationship Diagrammer, one of the Oracle Designer tools, enables you to create an entity relationship model in the form of a diagram showing the elements of information and the way they are logically related.
An entity relationship diagram has already been created for Speedy Pizza, modeling the information needs of the business. During this lesson, you will:
An entity is a thing of significance, whether real or conceptual, about which the business being modeled needs to hold information.
To add an entity representing PRODUCT to the entity relationship diagram modeling the order processing area of the business.
Hint: You might have to resize the window to view all the entities.
The Create Entity dialog box appears.
Name: PRODUCT
Short Name: PDT
Plural: PRODUCTS
The PRODUCT entity appears on the diagram.
Hint: You might have to resize the PRODUCT entity.
Relationships are named significant associations between two entities. Relationships on an entity relationship diagram display graphical indications of their optionality (whether a relationship is mandatory or optional) and cardinality (the number at each end of a relationship).
To create a relationship between the PRICED PRODUCT entity and the PRODUCT entity.
Note: It is important to click on the correct toolbar button. Check that the tooltip is "M:1 (M to O) Relationship" and that the text in the status bar is "Creates a M:1 (mandatory to optional) relationship".
A line starts from the edge of the entity that you clicked on and stretches to wherever you move the mouse pointer.
A line appears between the PRICED PRODUCT entity and the PRODUCT entity, and the Create Relationship dialog box appears.
From Name: FOR
To Name: OBTAINABLE AS
The names of the two ends of the relationship appear on the entity relationship diagram.
An attribute is any detail that serves to qualify, identify, classify, quantify or express the state of an entity.
A unique identifier is a combination of attributes and/or relationships that uniquely identifies an occurrence of an entity.
To add attributes to the new PRODUCT entity.
You are now ready to enter the attributes of the PRODUCT entity.
If a particular attribute is always required, the attribute is described as mandatory. If the attribute has a value for only some of the time, it is described as optional. An attribute’s Optionality (Opt) property specifies whether the attribute is mandatory or optional.
The type of data represented by an attribute is defined by the attribute’s Format property. Some attribute formats require further definition, including length and the number of decimal places (specified by the Max Len and Dec properties respectively).
Attributes can be associated with a domain (a common set of properties that apply to a group of attributes).
Name |
Seq |
Opt |
Format |
MaxLen |
Dec |
Primary |
DISCOUNT DAY |
|
þ |
CHAR |
1 |
|
|
PRODUCT DESCRIPTION |
|
|
VARCHAR2 |
30 |
|
|
PRODUCT ID |
|
|
INTEGER |
6 |
|
þ |
PRODUCT TYPE |
|
|
VARCHAR2 |
10 |
|
|
Hint: Use the horizontal scroll bar to see the Format, Max Len, Dec and Primary fields.
Each occurrence of an entity can be uniquely identified by one or more of its attributes. Because you have checked Primary against PRODUCT ID, that attribute will be used as the unique identifier (UID). You can confirm this on the UIDs tab. You could also use the UIDs tab to change the composition of the UID or to create alternate UIDs. For this tutorial, we will not make these changes.
The attributes for the PRODUCT entity are displayed on the diagram.
Hint: You might have to resize the PRODUCT entity to see all the attributes.
In this lesson you used the Entity Relationship Diagrammer to enter a new entity, PRODUCT. You specified the relationship between the PRODUCT entity and the PRICED PRODUCT entity. You defined the attributes of the PRODUCT entity.
|
|