database design concepts imat1408
Download
Skip this Video
Download Presentation
Database Design Concepts IMAT1408

Loading in 2 Seconds...

play fullscreen
1 / 24

Database Design Concepts IMAT1408 - PowerPoint PPT Presentation


  • 96 Views
  • Uploaded on

Database Design Concepts IMAT1408. Lecture 4 Worked Example of ER Modelling. We will use another simple scenario and identify: The entities The relationships between the entities The multiplicity of each relationship We will see that ER modelling is an iterative process. Objectives.

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 ' Database Design Concepts IMAT1408' - jean


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
database design concepts imat1408

Database Design ConceptsIMAT1408

Lecture 4

Worked Example of ER Modelling

objectives
We will use another simple scenario and identify:

The entities

The relationships between the entities

The multiplicity of each relationship

We will see that ER modelling is an iterative process.

Objectives
to create an er model
You would use the results of your fact finding to identify the entities (as we discussed last week)

In this case we will use a scenario

Identify the entities from the scenario on the next slide……….

To create an ER Model
the scenario
A small cinema club runs a number of cinemas throughout the region. The cinemas show films. A film is shown several times over a week or more in a series of showings. Members book for a particular showing.

Identify the entities.

The Scenario
slide5
A small cinema club runs a number of cinemasthroughout the region. The cinemas show films. A film is shown several times over a week or more in a series of showings.Members book for a particular showing.
refer back to the scenario and identify relationships
A small cinema club runs a number of cinemas throughout the region. The cinemasshowfilms

A filmis shown several times over a week or more ina series of showings

Membersbook for a particular showing.

Refer back to the scenario and identify relationships
a possible relationship
cinemasshowfilms.

You could draw that like this:

Cinema

Film

A possible relationship

shows

another possible relationship
filmis shown…in…showings.

Film

Showing

Showing

Film

Another possible relationship

screens

OR……

screened

is

at

now add this relationship
Membersbook for a……showing

Cinema

Member

Film

Showing

Now add this relationship

shows

screened

is

at

books

for

this is a first attempt expect changes later
We have used the verbs in the scenario to get us started

We may find later that these are not the best relationships to put in our diagram

ER modelling is iterative: sometimes we draw many versions before we are satisfied

Carry on for now………..

This is a first attempt – expect changes later!
identify the multiplicity of each relationship cinema shows film
How many cinemas can a film be shown at?

How many films can a cinema show?

Does a cinema have to show a film in order to be on our database as a cinema?

Does a film have to be shown at a cinema in order to be on our database?

Identify the multiplicity of each relationship: cinema-shows-film
slide14
How many cinemas can a film be shown at? Many

How many films can a cinema show? Many

So the relationship is many to many

Does a cinema have to show a film in order to be on our database as a cinema? Let’s say“No”, it’s non-obligatory (We are making an assumption here)

Does a film have to be shown at a cinema in order to be on our database? Let’s say“Yes”, it’s obligatory

slide15

Cinema

Member

Film

Showing

shows

M

M

screened

is

at

books

for

slide16
A showing screens how many films?

A film can have how many showings?

Must a film have a showing to be on the database?

Must a showing have a film to be on the database?

Identify the multiplicity of each relationship: is-screened-at

slide17
A showing screens how many films? 1

A film can have how many showings?

Many

Must a film have a showing to be on the database? Yes - obligatory

Must a showing have a film to be on the database? Yes – obligatory.

slide18

Cinema

Member

Film

Showing

shows

M

M

1

screened

is

at

M

books

for

identify the multiplicity of each relationship books for
How many showings can a member book for?

How many members can book for a showing?

Must every showing have a member booked for it?

Must every member have booked for a showing?

Identify the multiplicity of each relationship: books-for
slide20
How many showings can a member book for?Many

How many members can book for a showing? Many

Must every showing have a member booked for it? No, non-obligatory

Must every member have booked for a showing? No, non-obligatory.

slide21

Cinema

Member

Film

Showing

shows

M

M

1

screened

is

at

M

books

for

M

M

we have not finished
We will see in week 6 that this is only a first attempt at a system design for the cinema club

There are problems with this diagram and we can do better

Don’t forget that ER modelling is an iterative process…………

We have not finished!
summary
We have:

Identified entities and relationships between the entities

Drawn an ER diagram to show the entities and relationships

Recorded the multiplicity of each relationship

Used the Chen notation which is standard on this module.

Summary
ad