Page 474 - Computer_Science_F5
P. 474
Activity 8.8:
Designing a database model for a school library.
Use the following steps to perform the activity:
FOR ONLINE READING ONLY
Aim: Chapter Eight: Databases and Database Management Systems
To enhance understanding of database design, schema implementation, and SQL
querying skills among students
Materials:
Textbooks, online tutorials, Computer with database design software (Such as
MySQL, Microsoft Access or any relational Database Management System-
RDBMS); Sample data sets
Instructions:
Step 1: Choose a database model
Select an appropriate database model (relational or object-oriented).
Step 2: Understand Requirements
List the requirements for a school library system, including Book
inventory, Student records and Borrowing transactions
Step 3: Design the Schema
Using the chosen database model, design a schema that includes:
(a) Entities: such as Books, Students, and Transactions
(b) Attributes: such as Books (BookID, Title, Author);
(c) Students (StudentID, Name);
(d) Transactions (TransactionID, BookID, StudentID, BorrowDate); and
(e) Relationships (such as students borrowing books)
Step 4: Create Sample Data
Create sample data for: Books (such as BookID: 1, Title: “Database
Concepts”, Author: “Kihambule Mtemi”), Students (such as, StudentID:
101, Name: “Juakali Matonge”), Transactions (such as, TransactionID:
201, BookID: 1, StudentID: 101, BorrowDate: “2024-06-01”)
Step 5: Implement the Database
Use database design software to Implement the schema and enter the
sample data
Step 6: Query the Database
Use basic SQL queries or relevant commands to Retrieve data (such as
list all books, find books borrowed by a specific student) and Generate
simple reports.
465
Student’s Book Form Five
Computer Science Form 5.indd 465 23/07/2024 12:34

