By the end of this chapter, you will be able to:
Mastering these skills helps you build efficient databases that make managing information easier and more reliable in any workplace.
Creating a database involves defining various objects that structure and organize data logically and efficiently. In the Kenyan ICT sector, database objects underpin systems such as hospital patient records, SACCO member databases, and school management systems. Proper creation of these objects determines how data is stored, accessed, and maintained, directly affecting system performance and data integrity.
Database objects are the fundamental components within a database that hold or reference data and define its structure. They form the building blocks that enable an ICT Technician to organize data systematically. In practice, objects such as tables, queries, forms, and reports are used extensively in various sectors like banking (e.g., KCB’s customer transaction systems) and county government record-keeping.
Tables are the core database objects where data is stored in rows and columns. Each row represents a record, and each column represents a field or attribute. For example, a table in a hospital management system might include patient details such as name, ID number, and admission date. Tables must be carefully designed to avoid redundancy and ensure data normalization.
Queries enable users to retrieve and manipulate data from one or more tables by specifying criteria. They are essential for generating reports or extracting subsets of data for decision-making. At a retail business, queries might be used to find all customers who purchased a specific product within a given period.
Forms provide a user-friendly interface for entering, modifying, and viewing data stored in tables. They simplify data entry and reduce errors, which is critical in environments like schools or universities where staff may not be database experts.
Reports organize and present data in a structured format for analysis or presentation. They are often used for official documentation, such as financial reports in SACCOs or inspection summaries in NEMA.
Indexes improve the speed of data retrieval operations by creating pointers to data in tables. They are particularly important in large databases, such as those used by county governments, to enhance performance and reduce query response times.
Fields are individual data categories within a table that define the type of data stored. Each field has specific properties that determine how data is entered, displayed, and validated. Effective field design is crucial for data accuracy and consistency in computerized databases used in Kenyan organizations.
Field data types specify the nature of data a field can hold, such as text, number, date/time, or currency. Selecting appropriate data types prevents errors and optimizes storage. For instance, a date field in an insurance company database must be set to a date/time type to allow accurate sorting and calculations.
Field size limits the amount of data that can be stored in a field, which is important for controlling data length and ensuring uniformity. For example, a field for phone numbers in a county government database might be restricted to 10 digits to match the standard Kenyan format.
Fields can have properties like default values, required status, and validation rules to enforce data integrity. Validation rules prevent entry of invalid data, such as negative quantities in an inventory system at a hotel.
A primary key is a unique identifier for each record in a table, ensuring that no duplicate records exist. In a cooperative society database, the member ID field often serves as the primary key to uniquely identify each member.
Fields in different tables can be linked through relationships, such as one-to-many or many-to-many, enabling complex data models. For example, in a university database, a student’s ID field in the student table relates to the enrolment table to track courses taken.
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter explored the creation of computerized databases by first examining the various database objects such as tables, forms, queries, reports, and macros, detailing their roles in organizing and managing data. It then delved into the structure of fields and records, highlighting the importance of data types, field properties, and keys in ensuring data accuracy and accessibility. The development process was covered extensively, including the creation and linking of tables, as well as the formulation of queries, forms, and reports to facilitate data interaction and presentation. Essential integrity constraints like nulls, entity integrity, referential integrity, and general constraints were discussed to maintain data consistency and reliability. The chapter also addressed database indexing techniques, differentiating between primary and secondary indexing to optimize data retrieval. Finally, it examined various data relationships including one-to-one, one-to-many, many-to-one, and many-to-many, alongside fundamental data manipulation operations such as insert, select, update, and delete. An introduction to SQL was provided, focusing on writing SQL commands and creating SQL views to enable efficient database querying and management.
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Computer with MS Access 2016 or later installed | USB flash drive (4GB minimum) |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Computer with MS Access 2016 or later installed | 1 Pc per Candidate |
| 2 | USB flash drive (4GB minimum) | 1 Pc per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Create and Define Database Tables | |||
| Opened MS Access and created a new blank database (Award 2 marks for opening and creating new database correctly) | 2 | ||
| Created 'Students' table with fields: StudentID (AutoNumber, PK), FirstName (Short Text), LastName (Short Text), DateOfBirth (Date/Time), PhoneNumber (Short Text) (Award 1 mark for each correct field name and data type, 1 mark for setting primary key) | 4 | ||
| Created 'Courses' table with fields: CourseID (AutoNumber, PK), CourseName (Short Text), CourseCode (Short Text), Credits (Number) (Award 1 mark for each correct field name and data type, 1 mark for setting primary key) | 4 | ||
| Set appropriate field properties: Field sizes (e.g. FirstName and LastName 50 chars), Required fields, Format for DateOfBirth, Validation rules if any (Award marks for correctly setting field sizes and properties) | 3 | ||
| Entered at least 3 sample records in each table with valid data (Award 1 mark for each table having 3 valid records entered) | 3 | ||
| Sub-Total | 16 | ||
| PRODUCT CHECKLIST | |||
| Students table structure matches required fields with correct data types and primary key (Award 4 marks if all fields and data types are correct and primary key is set) | 4 | ||
| Courses table structure matches required fields with correct data types and primary key (Award 4 marks if all fields and data types are correct and primary key is set) | 4 | ||
| Sample records correctly entered with no data type errors or missing required fields (Award 4 marks if sample records are complete and error-free) | 4 | ||
| Sub-Total | 12 | ||
| GRAND TOTAL | 28 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Computer with MS Access 2019 installed | Pre-prepared database file with tables and sample data |
| Mouse and Keyboard | User manual for MS Access 2019 |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Computer with MS Access 2019 installed | 1 Pc per Candidate |
| 2 | Pre-prepared database file with tables and sample data | 1 Pc per Candidate |
| 3 | User manual for MS Access 2019 | 1 Pc per Candidate |
| 4 | Mouse and Keyboard | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Create Primary Keys | |||
| Opened the database file correctly (Award 1 mark for opening the correct database file) | 1 | ||
| Identified appropriate fields for primary keys (Award 1 mark for each correctly identified primary key field in two tables) | 2 | ||
| Set primary keys on the identified fields (Award 1 mark for each primary key correctly set in three tables) | 3 | ||
| Saved the changes after setting primary keys (Award 1 mark for saving changes properly) | 1 | ||
| Sub-Total | 7 | ||
| TASK 2: Establish Foreign Key Relationships | |||
| Opened the relationships window (Award 1 mark for opening relationships window) | 1 | ||
| Selected appropriate tables for relationships (Award 1 mark for selecting correct tables involved in foreign key relationships) | 2 | ||
| Created foreign key relationships enforcing referential integrity (Award 1 mark for each correct foreign key relationship created with referential integrity enforced in four relationships) | 4 | ||
| Saved the relationships and closed the window (Award 1 mark for saving and closing the relationships window properly) | 1 | ||
| Sub-Total | 8 | ||
| TASK 3: Test and Validate Keys | |||
| Entered test data to validate primary key uniqueness (Award 1 mark for entering data and 1 mark for detecting duplicate key error) | 2 | ||
| Entered test data to validate foreign key constraints (Award 1 mark for entering data and 1 mark for detecting referential integrity error) | 2 | ||
| Corrected errors detected during testing (Award 1 mark for correcting primary key error and 1 mark for correcting foreign key error) | 2 | ||
| Executed queries to confirm integrity enforcement (Award 2 marks for running queries that confirm key constraints are enforced) | 2 | ||
| Sub-Total | 8 | ||
| TASK 4: Print Database Schema and Relationships Report | |||
| Printed tables with primary keys indicated (Award 4 marks for clear printout showing primary keys) | 4 | ||
| Printed relationships report showing foreign keys and referential integrity (Award 4 marks for clear printout showing foreign key relationships) | 4 | ||
| Sub-Total | 8 | ||
| PRODUCT CHECKLIST | |||
| Primary keys correctly set on all required tables (Award 4 marks if all primary keys are correctly established) | 4 | ||
| Foreign key relationships correctly established with referential integrity (Award 6 marks if all foreign keys and referential integrity constraints are correct) | 6 | ||
| Test data correctly enforces entity and referential integrity (Award 6 marks if test data validates the keys and constraints effectively) | 6 | ||
| Sub-Total | 16 | ||
| GRAND TOTAL | 47 | ||
At the start of this chapter we promised you would be able to:
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.