This Study Resource Was: Tutorial 2 Practice Exercise 1. Match The Following Terms and Definitions. Term
This Study Resource Was: Tutorial 2 Practice Exercise 1. Match The Following Terms and Definitions. Term
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
e. degree; cardinality
ar stu
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.
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
• 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
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
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
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:
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)