Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Name: ______KEY______________________________ ID# ____________________

Lab Day: ______________________ Lab Time: _____________________

IS222 Database Management Systems


Short Test 1 (Pink) Solution Guide
Semester 1 2013
Time allowed: 45 minutes
Total Scores: 35 marks
Total Pages: 7 pages (including this page)
Total Questions: 16
Weight: 10%

INSTRUCTIONS:
1. This exam is worth 10% of your course work.
2. Each multiple choice question has only ONE correct answer.
3. Answer ALL questions in this paper.
4. Write your id # on all sheets in this booklet.

Multiple Choice (10 marks) – Circle the BEST answer.

1 A B C D

2 A B C D

3 A B C D

4 A B C D

5 A B C D

6 A B C D

7 A B C D

8 A B C D

9 A B C D

10 A B C D
Student ID: _______KEY_______

Multiple Choice Questions (10 Marks)


Each question has only one answer and is worth 1 mark.

Medicine
MedicineType
PK Med_Code
PK MT_Code
Med_Name
MT_Desc
FK1 MT_Code

1. Which of the following business rules correctly and completely describes the relationship
between the entities shown in the ERD above?
A. A medicine is of one type, but there can be many medicines of a particular type.
B. A medicine is of at least one type, but there can be one medicine of a particular type.
C. A medicine is of exactly one type, but there can be no or many medicines of a
particular type.
D. A medicine is of no type, but there can be one or many medicines of a particular type.

2. Given below is the ERD for the Patient table.

Patient

PK Pat_Code

Pat_LName
Pat_FName
Pat_DOB
Pat_Addr
Pat_Phone

Which of the following is not an appropriate secondary key?

A. Pat_code
B. Pat_LName
C. Pat_DOB
D. Pat_Phone

3. Which of the following is not a characteristic of data?


A. Data must be disorganized or unprocessed
B. Data is a distinct piece of information
C. Data are the raw materials of information
D. Data is always processed or organized

Page 2 of 7
Student ID: _______KEY_______

4. Which of the following is the correct ERD for the business rule stated below?

A project is managed by exactly one employee, but each employee can manage no or many
projects.

A. Project Employee

PK Proj_Num PK Emp_Num

Proj_Name Emp_LName
FK1 Emp_Num Emp_FName

B. Project Employee

PK Proj_Num PK Emp_Num
PK,FK1 Emp_Num
Emp_LName
Proj_Name Emp_FName

C. Project Employee

PK Proj_Num PK Emp_Num

Proj_Name Emp_LName
FK1 Emp_Num Emp_FName

D. Project Employee

PK Proj_Num PK Emp_Num

Proj_Name Emp_LName
FK1 Emp_Num Emp_FName

5. Which of the following is incorrect about a business rule (BR)?


A. A BR is bidirectional.
B. A BR describes the relationship between at least two entities.
C. A BR states the connectivity of the relationship.
D. A BR states the cardinality of the relationship.

Page 3 of 7
Student ID: _______KEY_______

6. Which of the following best describes the properties of the relationship between the entities
shown in the ERD below?

Product
Category
PK Prod_Code
PK Cat_ID
Prod_Desc
Prod_Price Cat_Desc
FK1 Cat_ID

A. Weak, Optional
B. Strong, Optional
C. Weak, Mandatory
D. Strong, Mandatory

7. Which of the following type of database is not suitable for collecting data generated from
day-to-day running of an organization?
A. Operational
B. Data Warehouse
C. Transactional
D. Production

8. Which of the following type of user is primarily responsible for determining the structure of
the database?
A. Systems Administrator
B. Database Administrator
C. Database Designer
D. Programmer

9. The term ____ refers to an organization of components that define and regulate the
collection, storage, management and use of data within a database environment.
A. database system
B. management system
C. database management
D. database management system

10. Business rules are derived from ____.


A. a detailed description of an organization’s operations
B. standards and practices developed over the years
C. managers’ recommendations
D. governmental oversight organization standards

Page 4 of 7
Student ID: _______KEY_______

Use the following business rules and notes to answer questions 11 to 15.

A database designer has written the following business rules for a database intended for the USP
Medical Center.

1. A student visits a doctor no or many times, and each doctor can see one or many students.
2. A doctor may prescribe no or many medicines to a student in each visit, and each
medicine may be prescribed to no or many students.
3. The student entity has attributes student ID, last and first names, and date of birth.
4. The doctor entity has attributes doctor ID, and last and first names.
5. The medicine entity has attributes medicine ID, and name.

Notes:

• It is possible for the doctor to prescribe the same medicine to a student over numerous
visits.
• For each visit, you need to record the visit date, the doctor and student IDs, and list of
medicines prescribed to the student.

11. Create an ERD showing a possible database design. In the ERD, show the entities,
relationships, PKs, and FKs and non-key attributes (14 marks).

Visit
Student
Doctor
PK Visit_Num
PK Stu_ID
PK Doc_ID
Visit_Date
Stu_FName
FK1 Doc_ID Doc_FName
Stu_LName
FK2 Stu_ID Doc_LName
Stu_DOB

Prescription
Medicine PK,FK2 Visit_Num
PK Med_ID PK,FK1 Med_ID

Med_Name

Page 5 of 7
Student ID: _______KEY_______

12. How do the business rules assist in creating the ERD? (1 mark)

The business rules identify the entities and the connectivity and cardinality of the
relationships

13. How did you determine the strength of each relationship in the ERD? (2 marks)

The strength is chosen by looking at either the FK’s participation in the primary of the table
in which it is the FK and/or existence-dependence of a table. In either case, if the FK is part
of the PK then the relationship is strong otherwise, it is weak.

14. What are some aspects that you will consider when determining the data type of the
attributes? (1 mark)
i. Look at the type of value that it stores
ii. Look for specific formatting, e.g. for date and numeric attributes
iii. If an attribute stores numeric data but it’s not used in calculations then store
these a character values and not numeric values.

15. After creating the ERD, what will you do next as a database designer? (1 mark)

Create the data dictionary.

Page 6 of 7
Student ID: _______KEY_______

Use the following case study to answer question 16.

You are required to design a textbook rental database to help the USP Book Center store details
of all books rented by the students. The following case study describes the processes involved in
the textbook rental scheme.

USP Book Center (BC) has a textbook rental scheme. As part of this scheme, students can
loan/borrow the prescribed textbooks from the BC. The borrowed book is returned at the end of
the semester.

A student can borrow any number of books from the BC but it's not mandatory for a student to
borrow a book from the BC. A book can be loaned no or many times. For each borrowed book,
the BC records the book code, which uniquely identifies each book, student ID, borrow date,
return date, loan fee, refund amount, course code. The BC refunds a portion of the loan fee if the
book is returned in a reasonable condition. For each student the BC records the student ID, and
first and last names.

For each book, the BC records the book code, title, edition, and course code. A book many used
in at least one course in a particular year and semester, and it's possible for a course to prescribe
no or many books in a particular year and semester. For each course, the BC records the course
code, and title.

16. Write all business rules that you can identify for the textbook rental database (6 marks).
• A student borrows no or many books from the BC, and each book can borrowed by
no or many students.
• A course may prescribe no or many books, and each book can be prescribed for one
or many courses.

Page 7 of 7

You might also like