



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Based on this we can define DBMS like this: DBMS is a collection of inter-related data and set of programs to store & access those data in an easy and effective manner. Here are the DBMS notes to help you learn database systems in a Systematic manner. Happy Learning!!
Typology: Essays (university)
1 / 5
This page cannot be seen from the preview
Don't miss anything!




a) Contrast between file based and database approach in data management (4 marks)
b) State three advantages of using data base management system (DBMS) ( marks)
c) Explain the following terms;
i) Data redundancy (2 marks)
ii) Meta data (2 marks)
iii) Views (2 marks)
iv) Trigger (3 marks)
d) Use the employees table to answer below questions.
Emp No Position First Name Last Name Emp Date Job Code
101 Senior mgr John Muia 3/12/90 440
103 manager Mary Mwangi 24/8/97 441
105 HOD Julius Koech 8/1/98 442
107 HOD Celest Mwamburi 8/1/98 442
Write SQL code that:
i) Was used to put the first two records into the table (4 marks)
ii) Will change the job code for the employee with emp No of 107 from 442 to 441 (4 marks)
iii) Will display all the details for the record affected by changes above
(3 marks)
e) highlight any THREE advantages of using a database (3 marks)
a) Data integrity refers to maintaining and assuring the accuracy and consistency of data over its entire lifecycle. Integrity constraints are used at database design to ensure consistency of data. briefly describe any four integrity constraints (8 marks)
b) Differentiate between logical data independence and physical data independence, citing a relevant example (6 marks)
c) Using a relevant example, compare and contrast between the WHERE clause and HAVING clause as used in the SQL SELECT statement
(6 marks)
iii) Change the field vno to voterNo in the relation (4 marks)
iv) Remove the voters table from the database (2 marks)
v) Write an SQL statement that can display all the voters from a specific county and specific poling station (6 marks)
a) Consider the following schema for a library mgt
Book (ISBN, title, publisher, year)
Author (ISBN, name, vank)
Borrower (Bid, name, address)
i) Write an SQL statement that displays book title, author name and borrower name (6 marks)
b) A county bus owns a number of buses each bus is allocated a route although some routes may have several buses. Each bus passes through a number of towns. One or more drivers are allocated to each stage of a route, which corresponds to a journey through some or all of the towns on a route. Some of the towns have a garage where buses are kept and each of the buses are identified by their registration number and can carry different number of passengers, since the vehicles vary in size and can be single or double dected. Each route is identified by route number and information is available on the average number of passengers carried per day for each route. Drivers have an employee number, name, address and sometimes a telephone number.
i) List all entities in the above narrative (6 marks)
ii) Draw an ERD for the bus company (8 marks)