Professional Documents
Culture Documents
Tutorial 25 (Feb-4)
Answer all questions
3. What is the difference between logical data independence and physical data independence?
Which one is harder to achieve? Why?
;d¾lsl o;a; iajdh;a;;dj iy fN!;sl o;a; iajdh;a;;dj w;r fjki olajkak' tajdfhka <`.d
lr.ekSug wmyiq l=ulao@ fya;=j olajkak'
5. Suppose you are given the following requirements for a simple database for the National
Hockey League (NHL):
cd;sl fydlS .súiqu i`oyd my; i`oyka wjYH;djkag wkqj ER igykla ks¾udKh lrkak'
Construct a clean and concise ER diagram for the NHL database using the Chen notation
as in your textbook. List your assumptions and clearly indicate the cardinality mappings
as well as any role indicators in your ER diagram.
Sinhala Translation
© m%no
q aO Y%Sud,a - www.apepanthiya.lk 2020
6. Following tables are a part of a sales company database.
ii. Create the table. (You may use suitable data types)
j.= ks¾udKh lrkak' ^ta i`oyd iqÿiq o;a; j¾. ks¾jpkh lrkak&
iv. Display EmployeeID and Names of Sales person whose sales office situated in New York.
ksõ fhd¾la j, ld¾hd,h we;s ish¨ fiajlhskaf.a EmployeeID iy kï ksrEmKh
lrkak'
v. Display CustomerID and Names of customer whose City name starts from ‘C’
;u k.rfha ku C wl=ßka mgka .kakd ish¨ mdßfNda.slhskaf.a CustomerID iy kï
ksrEmKh lrkak'
vi. Display all details of customers whose Postal Code from 60000-80000. Display those
information according to ascending order of customer names.
;u Postal Code 60000 iy 80000 w;r jk mdßfNda.l s hskaf.a ish¨ úia;r olajkak'
tu kï wldrd§ ms<sfj,g olajkak'
© m%no
q aO Y%Sud,a - www.apepanthiya.lk 2020
7. A large organization that does automobile repairs must keep track of its repair facilities or
garages, the mechanics, and their qualifications in terms of the courses they have taken, the dates
they took the courses, and the grade each earned for each course. Descriptions of these items are
as follows:
• Garage: Garage’s identification number and manager’s name
• Mechanic: Employee number and name
• Course: Number, name, and duration (in weeks)
i. What are the entities (fields) in this situation? What are the attributes of each entity?
ii. List the entities and their relationships to other entities or other attributes under one-
to-one, one-to-many, many-to-many relationships. For example, “garage”, to “manager”
(one-to-one).
iii. List the field names to be used in the system. For example, “garage number” is a field
name.
iv. Which field names have unique values?
v. Describe this situation using an E-R model.
Sinhala Translation
© m%no
q aO Y%Sud,a - www.apepanthiya.lk 2020
8. The company you work for wants to digitize their time cards. You have been asked to design the
database for submitting and approving time cards. Draw the database ER diagram with the
following information:
If you feel that you must make some assumptions, please state them clearly so that they are easily
understood by the graders. Remember to indicate the key for each entity, as well as the multiplicity
of each relationship (e.g. one-to-many) using the appropriate notation.
Sinhala Translation
*******
© m%no
q aO Y%Sud,a - www.apepanthiya.lk 2020