Computer Science  ·  Level 6
Database Management
Chapter 2: Database design
📚 3 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • apply the phases of database design correctly to create strong foundations for your projects
  • construct entity models using UML notation accurately for clear and professional database diagrams
  • normalize database designs following the correct procedures to ensure efficient and reliable data storage
  • validate an ER model accurately according to the given requirements to make sure your design meets real needs

Mastering these skills will help you build databases that work smoothly and support important decisions in any business or organization.

Database design is a foundational skill for computer science professionals working with data-driven applications across Kenya’s diverse industries. Whether developing systems for county government offices, financial institutions, or healthcare providers, understanding how to structure data effectively ensures reliable, efficient, and scalable database solutions. This chapter explores the key phases of database design, focusing on the transformation of real-world requirements into a well-structured database system that supports business processes and decision-making.

2.1 Phases of Database Design

Database design involves a systematic progression from abstract requirements to a physical implementation tailored to performance and storage needs. In Kenya’s fast-growing digital economy, effective database design enables institutions like banks and universities to manage large volumes of data securely and efficiently. The design process is typically divided into three main phases: conceptual, logical, and physical database design, each with distinct objectives and deliverables.

2.1.1 Conceptual Database Design (ERM Modeling)

Conceptual database design is the first critical step in translating user requirements into a high-level data model that is independent of any database management system. This phase uses Entity-Relationship Modeling (ERM) to capture the essential entities, relationships, and constraints in a domain such as a hospital’s patient management system or a retail business’s inventory tracking.

Purpose of Conceptual Database Design

The main purpose of conceptual design is to provide a clear and comprehensive representation of the data requirements without considering technical details. Kenyan software developers working with clients like county health departments use this phase to ensure all relevant data elements and their interactions are well understood before moving to implementation.

Components of Entity-Relationship Modeling

  • Entities: Represent real-world objects or concepts such as Patients, Doctors, or Products. Each entity is essential for capturing the data relevant to the system.
  • Attributes: Characteristics or properties of entities, for example, Patient’s Name, Doctor’s License Number, or Product Price.
  • Relationships: Describe associations between entities, such as a Patient being treated by a Doctor or Products belonging to a Category.
  • Cardinality: Specifies the numerical constraints on relationships, indicating whether an entity instance can be associated with one or many instances of another entity.
  • Constraints: Rules that govern data integrity, for example, a Patient must have a unique Patient ID.

Techniques for Effective ER Modeling

Successful ER modeling requires active collaboration with stakeholders to gather accurate requirements. Analysts in financial firms like Equity Bank conduct interviews and review existing documentation to identify all necessary entities and relationships. The iterative refinement of ER diagrams helps uncover hidden data dependencies and clarifies ambiguous requirements.

Challenges in Conceptual Design and How to Address Them

  • Incomplete Requirements: Often, initial client information is insufficient; continuous stakeholder engagement and prototyping help fill gaps.
  • Complex Relationships: Modeling many-to-many or recursive relationships can be difficult; using associative entities and clear notation improves clarity.
  • Ambiguity in Terminology: Different users may use terms differently; establishing a common vocabulary early prevents misunderstandings.
  • Scalability Concerns: Overly complex models may become unwieldy; focusing on core entities first and modular design mitigates this.
  • Changing Requirements: Business needs evolve; maintaining flexible models that can be updated reduces redesign costs.

2.1.2 Logical Database Design

Logical database design translates the conceptual ER model into a logical schema tailored to a specific database model, typically the relational model. This phase bridges the gap between abstract design and technical implementation, ensuring data integrity and normalization.

Objectives of Logical Design

The goal is to create a database structure that organizes data efficiently, reduces redundancy, and supports querying and transaction processing. Kenyan IT professionals at universities often focus on logical design to ensure databases can handle complex queries for student records and research data.

Conversion of ER Models to Relational Schemas

  • Entities to Tables: Each entity becomes a table with columns representing attributes.
  • Primary Keys: Unique identifiers are selected to ensure each record is distinct.
  • Relationships to Foreign Keys: Relationships are implemented using foreign keys to link tables.
  • Handling Many-to-Many Relationships: These are resolved by creating junction tables that hold foreign keys referencing related entities.
  • Normalization: Applying normal forms to eliminate data anomalies and improve consistency.

Normalization and Its Importance

Normalization organizes data to minimize duplication and ensure integrity. Kenyan SACCOs use normalization to maintain accurate member records and transaction histories, preventing inconsistencies during deposits and withdrawals.

Tools and Techniques for Logical Design

Logical design often involves database modeling tools such as MySQL Workbench or Microsoft Visio. These tools allow designers to visualize schemas, enforce constraints, and generate scripts for database creation, streamlining deployment in organizations like county governments.

2.1.3 Physical Database Design

Physical database design focuses on the actual implementation of the database on hardware and DBMS platforms, optimizing performance, storage, and accessibility. This phase is crucial for applications requiring high availability and speed, such as online banking systems or hospital information systems.

Goals of Physical Design

Physical design aims to translate logical structures into efficient storage formats, indexing strategies, and access paths. Kenyan software engineers working with retail chains optimize physical design to handle large volumes of sales transactions with minimal latency.

Storage Structures and File Organization

  • Heap Files: Unordered storage suitable for small or temporary tables.
  • Sequential Files: Data stored in order, beneficial for batch processing.
  • Indexed Files: Use indexes to speed up data retrieval, essential for large datasets.
  • Clustered Storage: Groups related records physically to improve access speed.
  • Partitioning: Divides large tables into smaller, manageable pieces to enhance performance and maintenance.

Indexing Strategies and Their Impact

Indexes dramatically improve query performance by reducing search times. Kenyan universities implement B-tree and hash indexes to accelerate retrieval of student records and course registrations, balancing speed with storage overhead.

Considerations for Performance Tuning

Physical design must consider factors such as query patterns, concurrency, and backup strategies. For example, county government IT teams configure appropriate buffer sizes and implement replication to ensure data availability during peak usage and disasters.

Practice Questions

  1. Explain the main objectives of conceptual database design and how ER modeling facilitates these objectives in the context of a healthcare information system. (10 marks)

  2. Describe the process of converting an ER model into a relational schema, including how many-to-many relationships are handled. Use examples relevant to a university database. (15 marks)

  3. Discuss the importance of indexing in physical database design and identify at least three types of indexing methods that can be applied in a banking database system. (10 marks)

  4. List six challenges encountered during the conceptual database design phase and suggest strategies to overcome each within the context of developing a retail management system. (15 marks)

The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒2.2 Entity Modelling

Entity modelling is a critical stage in database design that involves identifying and representing real-world objects relevant to the system. In Kenya's growing tech industry, software developers at firms like Safaricom and banks such as Equity Bank rely heavi…

🔒2.3 Normalisation

Normalization is a foundational process in database design aimed at organizing data to reduce redundancy and improve integrity. For Kenyan computer science professionals, mastering normalization techniques is essential to developing scalable and maintainable d…

Chapter Summary

This chapter explored the comprehensive process of database design, beginning with the three critical phases: conceptual, logical, and physical design. The conceptual design phase focuses on creating an Entity-Relationship Model that captures the essential data requirements and relationships in a clear and structured form. Logical design translates the conceptual model into a formal schema suitable for a specific database management system while maintaining data integrity and consistency. Physical design addresses the optimization of data storage and retrieval methods to enhance system performance. The chapter then examined entity modelling in detail, highlighting its key components such as entities, attributes, and relationships, and demonstrated how to apply Unified Modelling Language techniques for effective entity model representation. Finally, the concept of normalisation was introduced to explain how database structures can be refined to eliminate redundancy and improve data integrity. Together, these topics provide a foundational understanding necessary for designing efficient and reliable databases.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

A. Written Assessment

  1. What is the main purpose of conceptual database design in the development process? (2 marks)
  2. Identify two key differences between logical and physical database design. (3 marks)
🔒20 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. Explain the main objective of conceptual database design in the context of developing a hospital patient records system. (4 marks)
  2. Differentiate between logical and physical database design with examples relevant to a banking application. (4 marks)
🔒18 more in this section.

Chapter Practical Activities

Practical 1: Outline and Explain Database Design Phases for a Student Registration System

Computer Science · Level 6
Database Management
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Outline and explain all phases of database design for a student registration system with at least four phases and practical examples.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Functional computer installed with MS Access or equivalent database softwarePlain A4 paper
Pen
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Functional computer installed with MS Access or equivalent database software1 Pc per Candidate
2Plain A4 paper2 Sheets per Candidate
3Pen1 Pc per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Outline database design phases
Observed adherence to computer laboratory rules
(Award 2 marks or zero)
2
Candidate correctly identifies the requirements analysis phase
(Award 3 marks for clear explanation and relevant examples)
3
Candidate correctly identifies the conceptual design phase with ER diagram explanation
(Award 4 marks for accurate description and example)
4
Candidate correctly identifies the logical design phase explaining table structures
(Award 4 marks for detail and clarity)
4
Candidate correctly identifies the physical design phase with storage and indexing explanation
(Award 3 marks for completeness and examples)
3
Candidate explains database implementation and testing phase
(Award 3 marks for explanation of implementation steps)
3
Candidate outlines maintenance phase and importance
(Award 3 marks for explanation including backup and updates)
3
Sub-Total22
PRODUCT CHECKLIST
Comprehensive written outline covering all phases with clear explanations and practical examples
(Award up to 8 marks based on completeness, clarity, and relevance)
8
Sub-Total8
GRAND TOTAL30
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)

Practical 2: Create Conceptual ERM Diagram for University Course Registration System

Computer Science · Level 6
Database Management
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Create a conceptual ERM diagram representing a university course registration system with at least 5 entities and their relationships as per the provided scenario.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Functional computer installed with ER diagram software (e.g. Microsoft Visio or draw.io)Plain A4 paper
Pen and pencil
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Functional computer installed with ER diagram software (e.g. Microsoft Visio or draw.io)1 Pc per Candidate
2Plain A4 paper2 Pcs per Candidate
3Pen and pencil1 Set per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Prepare Conceptual ERM Diagram
Observed computer laboratory rules
(Award 2 marks or zero)
2
Selected correct ER diagram shapes for entities, attributes, and relationships (Rectangle, Ellipse, Diamond)
(Award 1 mark for each correct shape selection or zero)
2
Identified and modeled at least 5 entities relevant to university course registration
(Award 1 mark per correctly identified entity, max 4)
4
Defined primary keys for each entity
(Award 1 mark per correctly defined primary key, max 3)
3
Established appropriate relationships between entities including cardinality and participation
(Award 1 mark per correct relationship and cardinality, max 4)
4
Included relevant attributes for each entity
(Award 1 mark for each entity with appropriate attributes, max 3)
3
Logically arranged ER diagram shapes for clarity and readability
(Award 2 marks for logical arrangement or zero)
2
Sub-Total20
PRODUCT CHECKLIST
Conceptual ERM diagram shows at least 5 entities with correct dimensions: diagram approximately A3 size (420mm x 297mm)
(Award 3 marks for correct size and completeness or zero)
3
Entities correctly represented as rectangles with clear labels
(Award 1 mark per 3 correctly represented entities, max 3)
3
Attributes correctly represented as ellipses linked to their entities
(Award 1 mark per 3 correctly represented attribute groups, max 3)
3
Relationships correctly represented as diamonds with cardinality indicators
(Award 1 mark per 4 correctly represented relationships, max 4)
4
Diagram is neat, legible, and free from overlapping lines or clutter
(Award 2 marks for neatness or zero)
2
Sub-Total15
GRAND TOTAL35
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)
🔒

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒Design a UML Class Diagram for a University DatabasePractical 3
🔒Design a Logical Database Schema for a University Student Enrollment SystemPractical 4
🔒Physical Database Design Implementation for Student RecordsPractical 5
🔒Normalization of Student Course Enrollment Table to 3NFPractical 6
🔒Design and Model a Student Enrollment DatabasePractical 7
🔒Develop ERM Diagram Incorporating Inheritance and Aggregation for University DatabasePractical 8
🔒Transform ERM Diagram into Logical Relational SchemaPractical 9
🔒Design Physical Storage and Indexing Plan for Optimized Database PerformancePractical 10
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

Create a free account
Test Yourself 14 questions Start quiz ▾
0%
0 / 2
🔒

12 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • apply the phases of database design correctly to create strong foundations for your projects
  • construct entity models using UML notation accurately for clear and professional database diagrams
  • normalize database designs following the correct procedures to ensure efficient and reliable data storage
  • validate an ER model accurately according to the given requirements to make sure your design meets real needs

Tick each one you can genuinely do.

So, are you there yet?

You're competent when you can confidently do 50% or more of what this chapter promised.

Sign in to record how you're doing.