You are on page 1of 13

INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD

DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

Terminal ExaminationSpring2021

Course Code: CS-242 Course Title: Introduction to Database System


Program: BS (CS/SE/IT) Batch: F19
Total Marks: 60 Date & Time: 16-June-2021 (08:00a.m-02:00pm)
Credit Hours: 04 Teacher Name: Muhammad Imran Saeed
ONLY FOR TEACHER’S USE:
Q. No. Marks Obtained
1
2
3

Total Marks

For Students:
Student’s Name: ___________MUHAMMAD SUFYAN
ABBASI______________________
Student’s Registration Number: _________4203________________________

Instructions for Students:


Before starting your examination, please read and follow all the given below instructions
carefully. You must affirm the honesty pledge given at the end:
1. Download the question paper titled as “<Name of the Course> Question Paper.pdf” (pdf
file)and answer-sheet titled as “<Name of the Course> _Answer-Booklet.docx” (MS Word
document) from the Google Classroom as per instructions of your teacher. For all Questions
you are required to write down the answers to each question in your ow n handwriting on neat
white papers with blue pen. Copying from Internet or any other source is strictly not allowed.
2. Maximum time to download question paper, attempt and submit / upload your answer sheets
is 2 HOURS.As soon as you finish your paper, upload your answer booklet on priority basis.
3. You can only upload your exam responseONCE. You will not be able to re-upload an additional
or amended version. If you fail to submit it within the due time, your paper shall be considered
cancelled.
4. How to submit(upload) your answer-booklet/paper:

After completing your answers, you need to:

Page 1 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

a. Mention your Name, Registration Number, Page number andsign each page of your
handwritten answer-sheet.
b. FOR ALL QUESTIONStake pictures using mobile camera or Scan each page of your
written answers /answer sheets via any scanning software (like, Camscanner).
c. Insert all pictures or scanned images of your answer sheets into the MS WORDfile titled
as “<Name of the Course>_Answer-Booklet.docx” provided by the teacher in the
Google Classroom.
d. Answer of Q-2 (Types and Formatted) must be after the (images of) Question 1a
and 1b
e. After inserting all the images, save the “<Name of the course>_Answer-Booklet.docx”
file as a single PDF file (Only PDF format is acceptable as your answer-booklet), and
upload it in the Google Forms (link of which is provided in the Google Classroom).
f. Please make sure you upload the correct document as you will not be able to change this,
once it has been submitted.

5. The University views copying from one another's examination paper/ cheating, giving or receiving
unpermitted aid, discussion/consultation, plagiarism, impersonation and submission of
examination responses/answer sheets through theemail IDs of other students as serious
disciplinary offences, that fall under the category of Use of Unfair Means and will be dealt as per
university rules for Unfair Means Control Committee(UMCC).

6. Before you start the paper, you must agree to and sign the following pledge by clicking on the
Student’s Affirmation check box (it is mandatory to Tick the Checkbox):(In case a student
does not find the option to tick mark the checkbox, he/she can simply write down ‘Yes’in the
place of checkbox).
“I hereby affirm that i) I shall solve this paper on my own and I shall not seek the help
of any person(s) with any sort of aid (like telephonic/verbal help, attempted
answers related to my examination etc.) while taking my paper ,(ii) or will not
provide assistance of any sort (verbal or written) to otherfellow students. If I am
found involved in i) cheating ii) impersonation, iii) or using plagiarized content in my
writing, my case may be dealt as per university rules and procedures for using unfair
means.”
Student’s Affirmation: ☐

Page 2 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

DO NOT DELETE THE QUESTION(S). OTHERWISE YOUR


PAPER WILL NOT BE CHECKED.
PROVIDE ALL ANSWERS IN YOUR OWN WORDS AND OWNHANDWRITING.

Q1-a). For the Following Case Study Draw an EERD(Do not assume anything
by yourself. Just Draw as per following guidelines) (10)

BS-F19 Public Library wants to make a database for its functionality with
following Business Rules:

A BOOK(B-ID, BOOK TITLE, PUBLISHER-ID, PUBLISHER NAME,


PUBLISHER ADD) can ONLY be of two types, ISSUABLE BOOK (REGISTER
NO, BOOK PRICE) and REFERENCE BOOK (REFERENCE NO). One
MEMBER (M-ID, M-NAME, M-ADD, STAFF-ID, STAFF NAME, STAFF-
DESIG) can get issued no or many ISSUABLE BOOK while an ISSUABLE
BOOK can be issued to no or many MEMBERS.
A MEMBER can have no or many FINE INFO (DATE PAID, AMOUNT PAID)
while a FINE INFO can be of only one MEMBER. Note a FINE INFO cannot
exist without a MEMBER. Library Wants to keep data about number of books
issued to a member along with Date (i.e., which member gets which book on which
date/time). TEACHER (T-ID, F-NAME, L-NAME, DESIGNATION) can get
issued no or many BOOKS while a BOOK can be issued to only no or many
teachers. Library wants to Keep F-NAME and LAST NAME as only NAME.
A BOOK is written by one or many AUTHOR(A-ID, A-NAME) while an Author
may write one or many Books.
A book belongs to one or more FIELD (FIELD-ID, FIELD-NAME) while for one
FIELD there can be one or many Books.
A Field may contain one or many Fields and a Field may be contained by no or
many Fields.

Page 3 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT
Page 4 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

(Next page)

Q-1.b) ONLYRepresent Entity Classes and Relationship(s).(No Query about


What do we mean by Represent Entity Classes and Represent Relationship as it has
been taught in Class).
REPRESENT ENTITY CLASES
BOOK:

(10)

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT

Q-2 (a). Consider only the Book table and Member Tabledrawn in Q-1(b).
Insert 5 records in each as per following condition(s): (4)
One Book will be published by one publisher WHILE a publisher can publish more
than one books.

Page 5 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

One Member can be served by many Staff while a Staff can serve many Members.

BOOK

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT

Q-2 (b). Try to find out and write down the Anomalies by considering both
Tables of Q-2(a).

IN BOOK TABLE :

Page 6 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

Page 7 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

Page 8 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

Page 9 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

(8)

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT

Q-2 (c). Normalize each table of Q-2(a) (STEP BY STEP) into 1NF, 2NF, and
3NF. Each Step has separate Marks.
MEMBER

2NF

3 NF

Page 10 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

(8)

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT

Q-3 (a). Write SQL “COMMADS” to: (10)


1) Create the TableBOOK(B-ID, BOOK TITLE, BOOK PRICE, PUBLISHER-ID,
PUBLISHER NAME, PUBLISHER ADD) by keeping BOOK-ID as Primary Key.
Hint: Select the data type and width of your choice).

2) Insert one record in Table Book while keeping the Publisher ID, Publisher
Name, Publisher Add as NULL)

Page 11 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

3) Show all the Books that have Publisher Name as “Sang e Meel” and Price less
than Rs.800. or Publisher Name as “Kaarwaan” and Price less than Rs.1000.

4) Make the Price of all Books as Rs.1000, whose Publisher is Sang e Meel and
Price is Less than 800.

5) Delete the Table with all records.

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT

Q-3 (b). Open the Relationship window of your Project in MS-ACCESS and
only draw the EERD of your Project as shown in MS-Access.

Page 12 of 13
INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
DEPARTMENT OF COMPUTER SCIENCE & SOFTWARE ENGINEERING

(10)

DO NOT DELETE QUESTION


AND INSERT ANSWER IMAGE BELOW THIS POINT

%%%%%%%%%%% G O O D L U C K %%%%%%%%%%%%%

Page 13 of 13

You might also like