You are on page 1of 4

Question 3

Jurong University wants a database to capture, process and report information about students
participation in events organized by JU clubs. Students join JU clubs to participate in various
events.

A student at JU may join as many clubs as he or she wishes. While clubs enjoy a high level of
membership, there are just as many students who choose not to be a member of any club. For the
students in these various clubs, JU wants to record the date on which the student joined a club
and the students leadership level in that club.

JU also requires records of club events and students participation in those club events. Clubs
may organize one or more events. Some of these events are jointly organized by clubs. For
example, the upcoming Mass Finger Painting event is jointly organized by the Arts Club and
the Social Activities Club. A student may participate in one or more events. However, not all
events are popular with the students of JU. For example, no student participated in a Mass
Finger Painting event. The University would like to keep a record of a description of the event,
event date and students role in that event. A students role in an event may be either as an
organizer or as a participant.

Required

a. Using the information provided above, draw an Entity-Relationship Diagram (ERD) for the
database required by Jurong University.

(9 marks)

b. Draw the corresponding database schema. Include all attributes listed in the case above.

(6 marks)

(Total: 15 marks)
(a) Suggested Answer

Joins

Run by

Participates in Organises

Participated by Organised by

Note:
1. Relationships are not named (and so I named them)
2. Assumptions are lacking (and so I made them)
a. Some clubs are not run by students (for example they are run by Professors)
b. Some clubs do not organize any events but an event must be organized by at least
one club
c. An event can have many students participating in it
3. The case has insufficient attributes to draw up the schema for Student and Club (and so I
introduced some)
a. StudentName and ClubName are introduced for the purpose of drawing the Student
and Club schema

(b) Suggested Answer

Student[StudentID, StudentName]

Student-Club[StudentID, ClubID, DateJoined, LeadershipLevel]

Club[ClubID, ClubName]

Event[EventID, EventDescription, EventDate]

Event-Club[EventID, ClubID]

Student-Event[StudentID, EventID, StudentRole]


Question 4

A certain charity organization records its received donations in an Excel spreadsheet for 3rd
quarter 2013 shown as follows. Donors may, of course, repeat their donations at different times
with different amounts. It is safe to assume that repeated donors names are spelled exactly the
same way correctly. Further, although there are many more donations, for the purpose of testing,
the charity organization just assumes for now that rows 6 to 17 are all the donations received
during the quarter.

The month when each donation was received is recorded in columns C & D respectively. A
table at F1:Q2 giving the day-of-year of the first day of each month is also shown in the
spreadsheet. Thus, 1st of Jun is the 152nd day of year, while 1st of Aug is the 213rd day of year.

(a) Fill in cell B1 the maximum amount of donation received in the quarter. (2 marks)

(b) Fill in cell B2 the minimum amount of donation received in the quarter. (2 marks)

(c) In cell B3, the charity organization would like to display the number of days difference
between the day when the minimum and the maximum donations were received (assume all
donations are received on the first of each month). In the sample of donations given above,
for example, the minimum donation ($10) was received in Jul while the maximum ($190)
was received in Aug. Since the gap is 31 days, cell B3 therefore shows 31.

Construct a formula in B3 that will achieve the purpose just described.

Your formula in cell B3 must work for any month regardless of whether largest donation
was received earlier or later than the smallest donation, not just for the data shown above.

(11 Marks)

(Total: 15 marks)
(a) Suggested Answer

B1 =MAX($B$8:$B$19)

(b) Suggested Answer

B2 =MIN($B$8:$B$19)

(c) Suggested Answer

B3 =ABS(HLOOKUP(VLOOKUP(B1,B6:C17,2,FALSE),F1:Q2,2,FALSE) -
HLOOKUP(VLOOKUP(B2,B6:C17,2,FALSE),F1:Q2,2,FALSE))

You might also like