Skip to content Skip to navigation

Connexions

You are here: Home » Content » Exercise 2: ER To Relational Mapping

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • VOCW

    This module is included inLens: Vietnam OpenCourseWare's Lens
    By: Vietnam OpenCourseWare

    Click the "VOCW" link to see all content affiliated with them.

Recently Viewed

This feature requires Javascript to be enabled.
 

Exercise 2: ER To Relational Mapping

Module by: Nguyen Kim Anh. E-mail the author

Exercise 1

Why is it useful to first do an ER design and then convert this into a relational schema?

Exercise 2

Convert each of the following ER design fragments into a relational data model expressed as a box-and-arrow diagram:

Exercise 3

In the mapping from the ER model to the relational model, there are three different ways to map class hierarchies. Show each of them by giving the mapping for the following class hierarchy:

Figure 1
Figure 1 (graphics4.png)

Use box-and-arrow diagrams for the relational models.

Exercise 4

Convert the following entity into relation(s) in the relational data model:

Figure 2
Figure 2 (graphics5.png)

Exercise 5

Convert the following ER design into relations in a relational data model:

Figure 3
Figure 3 (graphics6.png)

You can assume that each attributes contains (at least) a suitably-named attribute containing a unique identifying number (e.g. the Lecturer entity contains a LecID attribute).

Exercise 6

Convert the following ER design into an SQL schema:

Figure 4
Figure 4 (graphics7.png)

Which elements of the ER design do not appear in the relational version?

Exercise 7

Convert the following ER design into a relational data model expressed first as a box-and-arrow diagram

Figure 5
Figure 5 (graphics8.png)

Which elements of the ER design do not appear in the relational version?

Exercise 8

Convert the following ER design to relational form:

Figure 6
Figure 6 (graphics9.png)

Which elements of the ER design do not appear in the relational version?

Exercise 9

Using this version of the Person class hierarchy, from the Medical scenario described previously, convert the ER design to relational form as an SQL schema:

Figure 7
Figure 7 (graphics10.png)

Give mappings using both the ER style and single-table-with-nulls style.

Exercise 10

Convert this ER design for the medical scenario into relational form:

Figure 8
Figure 8 (graphics11.png)

Which elements of the ER design do not appear in the relational version?

Exercise 11

Convert this ER design for the book publishing scenario into relational data model

Figure 9
Figure 9 (graphics12.png)

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks