You are on page 1of 7

ASSIGNMENT 2 - ERD

ITS232/ICT200 _______

MAC JULAI 2020 48


Name: 1) IFFAH MADIHAH BINTI MOHD GHAZALI
2) NUR AQILAH BINTI HUZAIRY

ID: 1) 2018422848
2) 2018278808

Group name: CS1434D

This is INDIVIDU / PAIR assignment (2 member ONLY). Please draw using Tool example MS
Visio.

There are 2 case study in this assignment, answer ALL the question. DUE DATE FOR
SUBMISSION BEFORE OR ON 9 Mei 2020

Question 1

a) Based on the figure below, answer the following questions:

FACULTY COURSE
PK FACULTY_ID offer PK CRS_CODE

FACULTY_NAME CRS_DESCRIPTION
FACULTY_ADDRESS CRS_CREDIT
FACULTY_PHONE FK1 FACULTY_ID

i. Identify a relationship degree. (1 marks)

Binary relationship.

ii. Identify the type of relationship strength. (1 marks)

Weak relationship.

iii. Based on question ii), explain the relationship between COURSE and FACULTY
entity. (3 marks)

Weak relationship because FACULTY_ID in table FACULTY does not contain


primary key component of parent entity in table COURSE.
b) Briefly explain TWO (2) conditions of a weak entity. (3 marks)

1. Existence-dependent is cannot exist without entity with which it has a


relationship.
2. Has primary key that is partially or totally derived from parent entity in
relationship.
Question 2

The BISTARI Book Rental Shop is seeking to implement a database system for its shop. The
shop has customers known as members, and a collection of books available for rental. The
purpose of the system is to track membership, book inventory, and book rental activities.
The following are the current system descriptions associated with BISTARI Book Rental Shop.
• For each member, the data items that need to be recorded are: a unique
membership identification number, the members name, address, phone number and the
date that the members joined the shop.
• When a member rents a book, the shop will record these items: the book rental date, the
book return due date, the date the book was returned, and the rental fee.
• Each member can rent a maximum of five books at any one time and the members must
return the books in two weeks’ time. For each book, the books identification number,
title, type and rental price must be collected and stored in the system.
• Sometimes books are written by more than one author. Therefore, the data that need to
be stored are the ID and the name of the authors.
• This shop will also keep the books review information in order to know the most
rented books and authors.
• Moreover, the records of the suppliers will be recorded in the system. The supplier’s
data that will be stored are the id, name, address and phone number.
• A supplier can supply many books, but each book is supplied by only one supplier.

Based on the above current system description, answer the following questions:

a) Draw a complete ER Diagram. Show all entities, attributes, primary keys, foreign keys,
relationships and connectivity’s involved in the diagram. (14 marks)
b) Prepare the relational schema for the ERD that has been developed in question (a).
Underline all the primary keys and under strike (*) all the foreign keys. (4 marks)

MEMBER ( memberID, memberName, memberAddress, memberPhone, memberDate )


RENT ( rentFee, rentDate, rentDueDate, rentReturnDate, memberID* )
BOOK ( bookID, bookTitle, bookType, rentFee* )
REVIEW ( bookID*, authorID*, numBook, authorMostRented )
AUTHOR ( authorID, authorName )
SUPPLIER ( supplierID, supplierName, supplierAddress, supplierPhone)

c) Suggest 2 example report from case study. (2 marks)

 List of rent information according to member.


 List of book information that written by author.
Question 3
The following case study describes the data requirements of the Malaysian Charity, nonprofit
organization (NGO) that provides aid to people after natural disasters.

 Individuals volunteer their times to carry out packing tasks for the NGO. For each
volunteer, his/her name, address, and telephone number are tracked. Each volunteer
may join several packing tasks and some packing tasks may require many volunteers.
When a volunteer is assigned to a packing task, the system should track the start time
and end time of that assignment. For each packing task, there is a task code, task
description, and task status.

 Packing task may produce many packages but one package is a result from one packing
task. Each package is assigned an ID number, package date, package type and total
weight. There are three different packages namely basic medical packages, child care
packages, and food packages.

 A package can contain many different items and a given item can be used in many
different packages. For each item that the NGO provides, there is an item ID number,
item description, item status (whether donated, sponsored or bought), item value and
item quantity on hand. Along with tracking the actual items that are placed in the
package, the quantity of each item must also be recorded.

Based on the above system description, answer the following questions:

a) Create complete ERD. Show all entities, attributes, primary keys, foreign keys,
relationships and connectivity. (14 marks)
b) Prepare a relational schema an underline all the primary keys and understrike (*) the
foreign keys. (4 marks)

VOLUNTEER(Vol_ID, Vol_name, Vol_address, Vol_phone)


ASSIGNMENT(Vol_ID, Task_code, Asg_start, Asg_end)
TASKS( Task_code, Task_desc, Task_status)
PACKAGE( Package_ID, Package_date, Package_type, Package_totalWeight, Task_code*)
TRACKING( Package_ID*, Item_ID*, Tracking_quantity)
ITEM( Item_ID, Item_desc, Item_status, Item_value, Item_quantity)
DONATED (Item_ID, Donated_item)
SPONSORED (Item_ID, Sponsored_item)
BOUGHT ( Item_ID, Bought_item)
MEDICAL ( Package_ID, basicMedical_package)
CHILD ( Package_ID, Child_package)
FOOD ( Package_ID, Food_package)

c) Suggest 2 example report for the case study above. (2 marks)

 List of volunteer that involve in after natural disaster in one year

 The average number of packaging prepared in each natural disaster


-GOOD LUCK- @ Pn Nik

You might also like