50% found this document useful (2 votes)
574 views

This Study Resource Was: Tutorial 2 Practice Exercise 1. Match The Following Terms and Definitions. Term

This document contains a practice exercise on entity relationship modeling concepts with matching, comparisons, and examples. It provides definitions for entity relationship terms and has students draw ERD diagrams for university, electricity company, and employee project databases based on given descriptions and constraints.

Uploaded by

Thành Long Lữ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
574 views

This Study Resource Was: Tutorial 2 Practice Exercise 1. Match The Following Terms and Definitions. Term

This document contains a practice exercise on entity relationship modeling concepts with matching, comparisons, and examples. It provides definitions for entity relationship terms and has students draw ERD diagrams for university, electricity company, and employee project databases based on given descriptions and constraints.

Uploaded by

Thành Long Lữ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Tutorial 2

Practice Exercise
1. Match the following terms and definitions.
Term Definition
1. composite attribute a. uniquely identifies entity instances
2. associative entity b. relates instances of a single entity type
3. unary relationship c. specifies maximum and minimum number of instances
4. weak entity d. relationship modeled as an entity type
5. attribute e. association between entity types
6. entity f. collection of similar entities
7. relationship type g. number of participating entity types in relationship
8. cardinality constraint h. property of an entity
9. degree i. can be broken into component parts
10. identifier j. depends on the existence of another entity type

m
11. entity type k. relationship of degree 3

er as
12. ternary l. person, place, object, concept, event

co
eH w
o.
1.i 2d. 3.b. 4j. 5h. 6l. 7e. 8c
rs e
9g. 10a. 11.f. 12.k
ou urc
2. Make comparison and contrast
o

a. stored attribute; derived attribute


aC s

b. simple attribute; composite attribute


v i y re

c. entity type; relationship type


d. strong entity type; weak entity type
ed d

e. degree; cardinality
ar stu

f. required attribute; optional attribute


g. composite attribute; multivalued attribute
h. ternary relationship; three binary relationships
sh is
Th

a. Stored attribute; derived attribute A stored attribute is one whose


values are stored in the database, while a derived attribute is one whose
values can be calculated or derived from related stored attributes.
b. Simple attribute; composite attribute A simple attribute is one that
cannot be broken down into smaller components, while a composite
attribute can be broken down into component parts.
c. Entity type; relationship type An entity type is a collection of entities
that share common properties or characteristics, while a relationship type
is a meaningful association between (or among) entity types.
d. Strong entity type; weak entity type A strong entity type is an entity that
exists independently of other entity types, while a weak entity type
depends on some other entity type.
This study source was downloaded by 100000779004299 from CourseHero.com on 09-24-2021 02:49:44 GMT -05:00

https://www.coursehero.com/file/23538856/HANU-DBS-Tut-2-with-answer/
e. Degree; cardinality The degree (of a relationship) is the number of entity
types that participate in that relationship, while cardinality is a constraint
on the number of instances of one entity that can (or must) be associated
with each instance of another entity.
f. Required attribute; optional attribute A required attribute must have a
value for each entity instance, whereas an optional attribute may not
have a value for every entity instance.
g. Composite attribute; multivalued attribute A composite attribute has
component parts that give meaning, whereas a multivalued attribute may
take on or more values for an entity instance.

3. Give an example for Unary, Binary and Ternary relationship.

3. Draw an ERD diagram for the following case (3pt)

m
Consider the following information about a university database:

er as
co
• Each student has an id (sid), a name (sname), a major study direction (major) and

eH w
an date of birth(dob).

o.
rs e
• Each course has a name (cname) and description (cdesc).
ou urc
• Each faculty has an id (fid) and a name (fname).
o

• Students can be enrolled in several courses and for each course there exists at
aC s

least one student who is enrolled in that course.


v i y re

• Each course belongs to one faculty and for each faculty exists at least one course
which belongs to this faculty.
ed d

Draw an ERD diagram which captures the information above. Be sure to indicate
ar stu

every key and participation constraint.


sh is
Th

This study source was downloaded by 100000779004299 from CourseHero.com on 09-24-2021 02:49:44 GMT -05:00

https://www.coursehero.com/file/23538856/HANU-DBS-Tut-2-with-answer/
m
er as
co
eH w
o.
4. An Electricity Company wishes to create a database with the following entities
rs e
ou urc
and attributes:
• Customer, with attributes Customer ID, Name, and Telephone
• Location, with attributes Location ID, Address (Street, City, State, Zip
o

Code), and Type (values of Business or Residential)


aC s

• Rate, with attributes Rate Class and RatePerKWH


v i y re

After interviews you have come up with the following business rules:
• Customers have one or more locations.
• Each location has one or more rates, depending on the time of day.
ed d

Draw an ERD for this situation and place minimum and maximum cardinalities on
ar stu

the diagram. State any assumptions that you have made.


sh is
Th

This study source was downloaded by 100000779004299 from CourseHero.com on 09-24-2021 02:49:44 GMT -05:00

https://www.coursehero.com/file/23538856/HANU-DBS-Tut-2-with-answer/
m
er as
5. A company has a number of employees. The attributes of EMPLOYEE include

co
Employee ID (identifier), Name, Address, and Birthdate. The company also has

eH w
several projects. Attributes of PROJECT include Project ID (identifier), Project

o.
Name, and Start Date. Each employee may be assigned to one or more projects,
rs e
ou urc
or may not be assigned to a project. A project must have at least one employee
assigned and may have any number of employees assigned. An employee’s
billing rate may vary by project, and the company wishes to record the
o

applicable billing rate (Billing Rate) for each employee when assigned to a
aC s

particular project.
v i y re

Draw an ERD for this case. Do the attribute names in this description follow the
guidelines for naming attributes? If not, suggest better names.
Ex 5.
ed d
ar stu
sh is
Th

This study source was downloaded by 100000779004299 from CourseHero.com on 09-24-2021 02:49:44 GMT -05:00

https://www.coursehero.com/file/23538856/HANU-DBS-Tut-2-with-answer/
Homework
1. Define the following terms:

a. entity type g. multi-valued attribute


b. entity-relationship model h. associative entity
c. entity instance i. cardinality constraint
d. attribute j. weak entity
e. relationship type k. identifying relationship
f. identifier l. derived attribute

2. Give an example (other than those described in the slide) for each of the following,
and justify your answer:
a. derived attribute
b. multi-valued attribute
c. atomic attribute
d. composite attribute

m
e. required attribute

er as
f. optional attribute

co
eH w
3. What is the degree of a relationship? List the three types of relationship degrees

o.
described in the chapter and give an example of each.
rs e
5. A hospital has a large number of registered physicians. Attributes of PHYSICIAN
ou urc
include Physician ID (the identifier) and Specialty. Patients are admitted to the hospital
by physicians. Attributes of PATIENT include Patient ID (the identifier) and Patient
o

Name. Any patient who is admitted must have exactly one admitting physician. A
aC s
v i y re

physician may optionally admit any number of patients. Once admitted, a given patient
must be treated by at least one physician. A particular physician may treat any number
of patients, or may not treat any patients. Whenever a patient is treated by a physician,
ed d

the hospital wishes to record the details of the treatment (Treatment Detail).
ar stu

Components of Treatment Detail include Date, Time, and Results. Did you draw more
than one relationship between physician and patient? Why or why not? Did you
sh is

include hospital as an entity type? Why or why not? Does your ERD allow for the
same patient to be admitted by different physicians over time? How would you include
Th

on the ERD the need to represent the date on which a patient is admitted for each time
they are admitted.

This study source was downloaded by 100000779004299 from CourseHero.com on 09-24-2021 02:49:44 GMT -05:00

https://www.coursehero.com/file/23538856/HANU-DBS-Tut-2-with-answer/
Answers

m
er as
co
eH w
o.
rs e
ou urc
o
aC s
v i y re
ed d
ar stu
sh is
Th

This study source was downloaded by 100000779004299 from CourseHero.com on 09-24-2021 02:49:44 GMT -05:00

https://www.coursehero.com/file/23538856/HANU-DBS-Tut-2-with-answer/
Powered by TCPDF (www.tcpdf.org)

You might also like