Elements of Database/Introduction to Database (CSCT2204)
Computer Science - COS
Semester: Second Semester
Level: 200
Year: 2019
THE UNIVERSITY OF BAMENDA
P.0 BOX 39 Bambili
School/Faculty: HTTTC
Department: Computer Engineering
L
ecturer
(s): Dr LIENOU Jean-Piere
Course Code: CSCT2204 / CSCT2211
Course Title: Elements of Database / Introduction to Database
Date:
Hall:
Time: lh30mn
Exercise 1 SQL Knowledge (10+10+10+10+10 = 50 mks)
Let be the following Analysis in MySQL representing the Entity-Relationship model of a
database called "SchoolInspection".
o Schoolidschool, schoolname, town, telephone, #iddirector, dateappointment,
datedeparture)
o Classes(idclass, nameclass, level, numberofpupil, #idschool, academicyear)
o Directors(iddirector, namedirector, telephone, salary)
a)
Write the SQL Command to create all the tables
b)
Modify the database in such a way that a school can have many directors and a
director can be a director of many schools. Draw on your sheet the resulting Data
Conceptual Model
c)
Write a query to insert data in all the tables in the resulting database.
d)
Write another query listing all the directors of a specific school given as parameter in
ascendant order of dateappointment.
e) For a specific academic year, what is the total numberofpupil in a specific school?
Exercise II SQL Theory (10+10 = 20 mks}
a)
What do the foliowing abbreviations stand for? TCL, DCL, DDL, DML, SQL
b)
Compare in terms of database performance the role o: indexes and views in MySQL.
www.schoolfaqs.net