You are on page 1of 4

G.C.E.

Advanced Level – 2020 (Paper Class)


INFORMATION COMMUNICATION TECHNOLOGY

Tutorial 25 (Feb-4)
Answer all questions

1. Discuss the main categories of data models.


o;a; fudv, uQ,sl wdldr úia;r lrkak'

2. Describe the three-schema architecture.


o;a; iuqodh wdlD;sh úia;r lrkak'

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'

4. What is the difference between a key and a superkey?


key iy superkey w;r fjki 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'

 the NHL has many teams,


 each team has a name, a city, a coach, a captain, and a set of players,
 each player belongs to only one team,
 each player has a name, a position (such as left wing or goalie), a skill level, and a set
of injury records,
 a team captain is also a player,
 a game is played between two teams (referred to as host_team and guest_team) and
has a date (such as May 11th, 1999) and a score (such as 4 to 2).

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.

i. Write SQL statements for followings.


my; i`oyka wjYH;d i`oyd SQL fla; ,shkak'

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&

iii. Insert all data.


ish¨ o;a; we;=,;a 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:

-A timecard should have hours worked and date submitted


-Each timecard is associated with exactly one employee
-Each timecard should have a unique id
-Each timecard has a status: it is either approved, not approved, or pending
-Each employee has a unique id
-Each employee has a name and address.
-Each employee submits a time card every pay period. i.e. In 1 year, they will submit multiple
time cards
-Each employee either has direct deposit or physical check as their method of payment
-Each employee is associated with exactly one manager
-Each manager has a unique id and a name
-Each manager is in charge of multiple employees
-Each manager approves time cards for multiple employees

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

You might also like