You are on page 1of 3

TERTIARY AND VOCATIONAL EDUCATION COMMISSION

COMMON WRITTEN EXAMINATION

All rights reserved


NVQ Level 05 - Semester I
Information and Communication Technology

Database Systems - I K72C001M01 Three Hours

* Answer any five (05) questions

Question ( 1 )

a) Briefly explain the following terms

I. Primary Key, Composite Key and Foreign Key (06Marks)


II. File Operations &Ordered File (06Marks)
III. DDL & DML (06Marks)
b) Write two advantages of DBMS (02Marks)

Question ( 2 )
Consider the following information: (20Marks)
 In an educational institute, there are several departments and students belong
to one of them.
 Each department has a unique department number, a name, a location, phone
number and is headed by a professor.
 Professors have a unique employee Id, name, phone number.
 We like to keep track of the following details regarding students: name, unique
roll number, sex, date of birth, age and one or more email addresses.
 Students have a local address consisting of the hostel name and the room
number. They also have home address consisting of house number, street, city
and PIN. It is assumed that all students reside in the hostels.
 Course taught in a semester of the year is called a section. There can be
several sections of the same course in a semester; these are identified by the
section number.
 Each section is taught by a different professor and has its own timings and a
room to meet. Students enroll for several sections in a semester. Each course
has a name, number of credits and the department that offers it.
 A course may have other courses as pre-requisites i.e, courses to be
completed before it can be enrolled in.
 Professors also undertake research projects. These are sponsored by funding
agencies and have a specific start date, end date and amount of money given.
More than one professor can be involved in a project. Also a professor may be
simultaneously working on several projects. A project has a unique projectId

Draw an ER diagram for this system.


Question ( 3 )
a) Define the term functional dependency. (05 Marks)
b) Normalize the following table to 1NF, 2NF and 3NF (15 Marks)

Student Student Major Course CourseNa Instruc Instructor Instructor Grade


No Name No me torNo Name Location
3546 White IS IS460 Network 401 Jackson B104 A
5845 Edward CS CS530 Computing 503 Martin B106 C
7845 Dani IS IS460 Network 401 Jackson B104 B+
7689 Helena IS IS460 Network 401 Jackson B104 C+

Table 1-Students information

Question ( 4 ) Write SQL statements to perform the following.

a) Consider the following schema: (6x2 Marks)


Student_Info (Student No: Integer; Name: varchar (20), Major: char(4); GPA: float)

I. Create the table for schema.


II. Insert the following information:

StudentNo Name Major GPA


100 Kamal COS 3.6
101 Raja AMA 3.2
Table 2- Student_info

III. Update Kamal's GPA to 3.7


IV. Add a column address (i.e. address: varchar (30) to the Student_info table).
V. Change the data type of address column into varchar (50).
VI. Write the SQL statement to delete student_Info table from the Database.

b) Consider the following schemas: Write SQL statements to perform the following.

Emp_Information (Eid, name, salary, dept_no, address)

Department (Dept_no,dname, building, mgr_no)

I. Print all employee names. (02 Marks)


II. Print names of employees working for 'Administration' (i.e. dname)
department. (03 Marks)
III. Print names of employees working for 'Administration' (i.e. dname)
department and getting a salary >Rs. 20,000. (03 Marks)

Page2 | 3
Question ( 5 )

a) Convert the following ER diagram (figure 1) to relation schema. (10Marks)

Figure 1- ER for student subject system

b) Write Relational algebra expressions to the followings. (2x5Marks)


Actor Film
Actorld Name Nationality Age Filmld Title Year Directorld
INCH Inception 2010 CN345
LDC2I Leonardo DiCaprio American 40
TIT97 Titanic 1997 JC212
KW871 Kate Winslet British 39
RIMS Revolutionary Road 2008 SM521
CB379 Christian Bale British 46 SKFI2 Sky-fall 2012 SM521
HBC54 Helena Bonham Carter British 48 FISH4 Big Fish 2003 BLUM

Director
Directorld Name Nationality
CN345 Christopher Nolan British
JC212 James Cameron Canadian
SM521 Sam Mendes British
SCOT Martin Scorsase American

Figure 2- Film Industry relational database schema

I.Retrieves details of all actors above the age of 45.


II.Retrieves all distinct film titles.
III.Retrieves all distinct titles of films directed by a British director
IV.Retrieves all distinct titles of films that were released before 2000.
V.Retrieves details of all films released between 2000 and 2010.

Question ( 6 )

a) Write two characteristics of DBMS (05Marks)


b) Explain three schema architecture in brief (06Marks)
c) Write the short notes for the following terms (3x3Marks)
I.Logical data independence
II.Attribute
III.Constraints

Page3 | 3

You might also like