An art gallery wants to create a database to manage its collection and exhibitions. The gallery needs to store: Details of artworks (title, artist, medium, ...

Assessment: Computer Science 0478 | Paper 2 Mock 01 | Algorithms, Programming and Logic Subject: Computer Science - 0478

Question 1 Report

An art gallery wants to create a database to manage its collection and exhibitions.

The gallery needs to store:

  • Details of artworks (title, artist, medium, year created, estimated value)
  • Details of exhibitions (exhibition name, start date, end date, gallery room)
  • Which artworks are displayed in which exhibitions

(a) Design three tables: ARTWORK, EXHIBITION, and DISPLAY. For each table, list field names with data types and identify the primary key. [4]

Answer Details

(a) This question tests your ability to design a relational database with appropriate tables, data types, and keys for a many-to-many relationship. [4]

ARTWORK table:

Field NameData TypeKey
ArtworkIDINTEGERPrimary Key
TitleVARCHAR
ArtistVARCHAR
MediumVARCHAR
YearCreatedINTEGER
EstimatedValueREAL / DECIMAL

[1] for sensible fields with types, [1] for primary key. EstimatedValue uses REAL or DECIMAL because monetary values require decimal precision.

EXHIBITION table:

Field NameData TypeKey
ExhibitionIDINTEGERPrimary Key
ExhibitionNameVARCHAR
StartDateDATE
EndDateDATE
GalleryRoomVARCHAR

[1] for sensible fields with types, [1] for primary key.

DISPLAY table (junction table):

Field NameData TypeKey
DisplayIDINTEGERPrimary Key
ArtworkIDINTEGERForeign Key
ExhibitionIDINTEGERForeign Key

[1] for both FK fields present, [1] for primary key.

The DISPLAY table resolves the many-to-many relationship: one artwork can appear in multiple exhibitions, and one exhibition can display multiple artworks. Each record in DISPLAY represents one specific artwork being shown in one specific exhibition. The foreign keys link back to ARTWORK and EXHIBITION respectively.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning