By the end of this chapter, you will be able to:
Mastering these skills will help you build secure, reliable databases that meet real-world business needs and protect valuable information.
Designing a secure database is fundamental for cybersecurity professionals tasked with protecting sensitive information in Kenya’s public and private sectors. Whether working with financial institutions like Equity Bank or government agencies such as the Kenya Revenue Authority (KRA), a well-structured database ensures data integrity, confidentiality, and availability. This chapter focuses on the principles of designing relational databases, creating entity relationships, and developing effective Entity Relationship Diagrams (ERDs) tailored for cybersecurity applications. Mastery of these concepts enables professionals to build robust databases that resist unauthorized access and support secure data management.
A relational database organizes data into tables, or relations, where each table consists of rows and columns representing records and attributes respectively. The fundamental components include:
In Kenyan financial institutions, for instance, primary keys ensure that each customer’s record is unique, while foreign keys link transactions to customer accounts, maintaining accurate and secure data relationships.
Normalization is the process of organizing data to reduce redundancy and improve data integrity. It involves decomposing tables into smaller-related tables to eliminate duplicate data and ensure logical data storage. For cybersecurity professionals, normalization is crucial because redundant data can lead to inconsistency and increase the attack surface for data breaches.
At a county government office managing citizen data, applying 3NF prevents duplication of address information across multiple records, reducing errors and securing data consistency.
Designing a relational database with security in mind requires integrating access control, encryption, and audit mechanisms within the database schema and architecture. Cybersecurity professionals must anticipate threats such as SQL injection attacks, unauthorized data manipulation, and insider threats.
Indexes improve database query performance by providing quick access paths to data, which is critical for applications requiring real-time analysis or reporting, such as fraud detection systems in banks. However, excessive or poorly designed indexes can degrade performance and increase storage requirements.
At a retail business database, indexing the product ID and customer ID fields accelerates sales report generation while maintaining secure access controls on the database.
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter focused on designing a relational database by first understanding the principles that govern how data is structured and related within tables. It then explored the creation of entity relationships, explaining the fundamental concepts and significance of entities and their associations. The process of drawing Entity Relationship Diagrams (ERDs) was detailed, highlighting how visual representations aid in clarifying database structure and relationships. Emphasis was placed on accurately mapping entities, attributes, and their connections to reflect real-world scenarios. The chapter concluded with the process of normalization, demonstrating how to organize data efficiently to reduce redundancy and improve data integrity. Through these steps, learners gained a comprehensive understanding of designing secure and well-structured databases.
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Computer with Database Management System (DBMS) installed | USB flash drive for saving work |
| Keyboard and Mouse | Database design template or paper (optional) |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Computer with Database Management System (DBMS) installed | 1 Pc per Candidate |
| 2 | Keyboard and Mouse | 1 Set per Candidate |
| 3 | USB flash drive for saving work | 1 Pc per Candidate |
| 4 | Database design template or paper (optional) | 1 Pc per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Database Creation and Table Setup | |||
| Opened DBMS and created a new database named 'StudentEnrollment' (Award 1 mark for opening DBMS and creating database) | 1 | ||
| Created 'Students' table with correct field names and data types (Award 1 mark per correct field and data type, total 4 marks) | 4 | ||
| Created 'Courses' table with correct field names and data types (Award 1 mark per correct field and data type, total 3 marks) | 3 | ||
| Created 'Enrollments' table with correct field names and data types (Award 1 mark per correct field and data type, total 3 marks) | 3 | ||
| Sub-Total | 11 | ||
| TASK 2: Define Primary Keys and Relationships | |||
| Set primary key for 'Students' table (StudentID) (Award 1 mark for correct primary key) | 1 | ||
| Set primary key for 'Courses' table (CourseID) (Award 1 mark for correct primary key) | 1 | ||
| Set primary key for 'Enrollments' table (EnrollmentID or composite key) (Award 1 mark for correct primary key) | 1 | ||
| Created foreign key relationships between 'Enrollments' and 'Students' (StudentID) (Award 2 marks for correct foreign key and relationship) | 2 | ||
| Created foreign key relationships between 'Enrollments' and 'Courses' (CourseID) (Award 2 marks for correct foreign key and relationship) | 2 | ||
| Sub-Total | 7 | ||
| TASK 3: Save, Document, and Secure Database | |||
| Saved the database in the correct folder with appropriate name (Award 1 mark for saving database correctly) | 1 | ||
| Generated database documentation listing tables and fields (Award 2 marks for generating documentation) | 2 | ||
| Encrypted database with a password as instructed (Award 3 marks for correctly setting encryption and password) | 3 | ||
| Compact and repaired the database to ensure integrity (Award 2 marks for compacting and repairing database) | 2 | ||
| Sub-Total | 8 | ||
| PRODUCT CHECKLIST | |||
| Database schema includes three tables (Students, Courses, Enrollments) with correct fields (Award 5 marks for accurate table design and fields) | 5 | ||
| Primary keys correctly assigned to each table (Award 3 marks for correct primary keys) | 3 | ||
| Foreign key relationships correctly established between tables (Award 4 marks for correct foreign key relationships) | 4 | ||
| Database saved, documented, encrypted, and compacted without errors (Award 4 marks for proper saving, documentation, encryption and maintenance) | 4 | ||
| Sub-Total | 16 | ||
| GRAND TOTAL | 42 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Computer with database design software | Reference materials on ER modeling and security principles |
| Pen | |
| A4 paper |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Computer with database design software (e.g., Microsoft Visio, draw.io) | 1 Pc per Candidate |
| 2 | Pen and A4 paper for sketching | 2 Pcs per Candidate |
| 3 | Reference materials on ER modeling and security principles | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Identify Entities and Attributes | |||
| Identified and listed main entities (Customer, Account, Transaction) (Award 1 mark for each correctly identified entity) | 3 | ||
| Defined appropriate attributes for each entity with correct naming (Award 1 mark for each entity attributes set correctly defined) | 4 | ||
| Assigned primary keys to each entity correctly (Award 2 marks if all primary keys correctly assigned, else 0) | 2 | ||
| Sub-Total | 9 | ||
| TASK 2: Define Relationships and Cardinalities | |||
| Established relationships between Customer and Account entities (Award 2 marks if correct relationship and cardinality shown, else 0) | 2 | ||
| Established relationships between Account and Transaction entities (Award 2 marks if correct relationship and cardinality shown, else 0) | 2 | ||
| Included appropriate relationship attributes where necessary (Award 2 marks if relationship attributes correctly included, else 0) | 2 | ||
| Sub-Total | 6 | ||
| TASK 3: Model Security Features in ER Diagram | |||
| Indicated encrypted fields or sensitive data handling in the model (Award 3 marks if encryption or security notations properly included, else 0) | 3 | ||
| Applied appropriate notation for access control or data privacy (Award 3 marks if access control clearly represented, else 0) | 3 | ||
| Sub-Total | 6 | ||
| TASK 4: Finalize and Save the ER Diagram | |||
| Completed ER diagram with neat and readable layout (Award 2 marks for neatness and clarity) | 2 | ||
| Saved the diagram in the specified folder with correct file name (Award 2 marks if file saved correctly) | 2 | ||
| Sub-Total | 4 | ||
| PRODUCT CHECKLIST | |||
| ER diagram includes all required entities with correct attributes and primary keys (Award 5 marks if all entities and attributes are complete and accurate) | 5 | ||
| Relationships correctly defined with proper cardinalities and relationship attributes (Award 5 marks if relationships and cardinalities are correct) | 5 | ||
| Security aspects such as encrypted data fields and access controls clearly represented (Award 5 marks if security features are clearly and correctly depicted) | 5 | ||
| Diagram is neatly presented, correctly labeled, and saved as per instructions (Award 5 marks for presentation quality and correct saving) | 5 | ||
| Sub-Total | 20 | ||
| GRAND TOTAL | 45 | ||
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
Sample simulation — try how the simulator works. A version built for this chapter's practical is coming.
Prepare Kenyan PilauLocked ▸Free: practical guides, quick cards, workplace scenarios and more.
Now — 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.