Database Reference
In-Depth Information
By using the same steps, you can create other nonspeciic relationships.
4.
Creating recursive relationship
: In the class registration data model, there is a many-
to-many recursive relationship. he intersection entity is COURSE_PREREQUISITE.
he following are the steps to show you how to create the recursive relationship.
◾
Suppose that both the COURSE and the COURSE_PREREQUISITE entities
in Figure 2.12 have been created. Click
Connector Tool
on the tool bar. Move
the mouse cursor over the parent entity
COURSE
. When a red rectangle appears,
press the mouse. hen, hold the mouse and move the cursor over to the child
entity
COURSE_PREREQUISITE
. When a red rectangle appears, release the
mouse.
◾
Move the mouse cursor over the parent entity
COURSE
again. When a red rect-
angle appears, press the mouse. hen, hold the mouse and move the cursor over
to the child entity
COURSE_PREREQUISITE
. When a red rectangle appears,
release the mouse.
◾
While the second relationship connector is selected, make sure that
Deinition
is selected in the
Categories
pane. In the
Parent: COURSE
list box, select
CourseID
and select
Prerequisite
in the
Child
list box. Click the
Associate
but-
ton to associate CourseID to Prerequisite (Figure 2.30).
◾
To conigure the cardinality, click the irst relationship connector line. In the
Database Properties dialog, select
Miscellaneous
in the
Categories
pane. Check
the cardinality option
One or more
. Do the same for the second connector line.
Create data model
: Now, you have created all the entities and the relationships that
associate them. By connecting the components together, you can form a data model shown
in Figure 2.31.
Figure 2.31 shows the E-R model for the class registration process. he data model
includes entities, attributes, and relationships. he entity CLASS has the most relationships.
his type of entity is called a
central entity
.
he above case study has been used to demonstrate the process of developing a data
model. It is for illustration purposes only. A real-world registration system can be much
more complicated.
Figure 2.30
Associate CourseID to prerequisite.