## Cambridge IGCSE ICT 0417 - Databases (Full Practical Guide)
### For Syllabus 2026, 2027, 2028
**Topic 18: Databases**
**Made Simple for Beginners**
---
## LESSON 1: Create a Simple Database
### Step 1: Open Microsoft Access
- Open Microsoft Access
- Click on "Blank Database"
- Type a name for your database (example: `StudentDatabase`)
- Click "Create"
### Step 2: Create Your First Table
- It opens a table named `Table1`
- Click on "View" > "Design View"
- Save the table as `Students`
### Step 3: Add Fields
In Design View, type these:
| Field Name | Data Type | Description |
|------------|------------|-------------------------------|
| StudentID | AutoNumber | Unique ID (Primary Key) |
| FirstName | Short Text | Student's First Name |
| LastName | Short Text | Student's Last Name |
| Age | Number | Whole Number |
| Grade | Number | Decimal marks |
| Passed | Yes/No | True (Yes) or False (No) |
| JoinDate | Date/Time | When student joined |
### Step 4: Set Primary Key
- Right-click `StudentID` > Click "Set Primary Key"
### Step 5: Save and Enter Data
- Click "View" > "Datasheet View"
- Type some example data into the table
---
## LESSON 2: Create a Second Table and Relationship
### Step 1: Create Second Table
- Go to "Create" > "Table Design"
- Save the table as `Classes`
### Step 2: Add Fields to `Classes`
| Field Name | Data Type |
|-------------|------------|
| ClassID | AutoNumber |
| ClassName | Short Text |
| TeacherName | Short Text |
### Step 3: Add Foreign Key to `Students` Table
- Go back to `Students` table (Design View)
- Add field: `ClassID` - Data Type: Number
### Step 4: Create Relationship
- Go to "Database Tools" > "Relationships"
- Add both tables
- Drag `ClassID` from `Classes` to `Students`
- Tick "Enforce Referential Integrity"
- Click "Create"
---
## LESSON 3: Create a Data Entry Form
### Step 1: Create Form
- Click on the `Students` table
- Go to "Create" > "Form"
- A form is created automatically
### Step 2: Modify Form (Optional)
- Go to "Design View"
- Add labels, spacing, drop-downs etc.
### Step 3: Add Drop-Down for Class
- Select `ClassID` field
- Change it to Combo Box
- Link it to `Classes` table
---
## LESSON 4: Queries (Search & Filter)
### Step 1: Create Query
- Go to "Create" > "Query Design"
- Add `Students` table
### Step 2: Add Fields to Show
- Double-click fields you want to display
### Step 3: Add Criteria to Filter Data
| Example | What It Does |
|-------------------------------|-------------------------------------|
| Age > 15 | Finds students older than 15 |
| Passed = Yes | Finds students who passed |
| Grade < 50 | Finds students with low grades |
| FirstName LIKE "A*" | Names starting with A |
| LastName NOT LIKE "K*" | Names NOT starting with K |
| Age BETWEEN 14 AND 16 | Finds age between 14 and 16 |
| Passed = Yes AND Grade > 70 | Passed and scored above 70 |
### Step 4: Run the Query
- Click "Run" (Red exclamation icon)
---
## LESSON 5: Sort Data
- Open table or query
- Click on the field column header
- Use "Sort A to Z" or "Sort Z to A"
---
## LESSON 6: Calculations
### Method 1: In Queries (Calculated Field)
- In query design, add new field:
`FinalGrade: [Grade] + 5`
- To find average:
Use Totals (sigma icon)
- Group By: `ClassID`
- AVG: `Grade`
### Method 2: In Forms/Reports (Calculated Control)
- In form/report design view:
- Add Text Box
- Type: `=Sum([Grade])` or `=Avg([Grade])`
---
## LESSON 7: Reports
### Step 1: Create a Report
- Click on a table or query
- Go to "Create" > "Report"
### Step 2: Modify Report
- In Design View:
- Add title (Report Header)
- Add page numbers (Page Footer)
- Format numbers: Right align, decimal places
### Step 3: Layout Options
- Choose: Tabular or Columnar format
- Use spacing and white space properly
### Step 4: Save and Print
- Save the report
- Print if needed
---
## Summary
You've now learned:
- Creating tables with correct fields
- Primary and foreign keys
- Table relationships
- Forms for entering data
- Queries for searching and filtering
- Sorting and calculations
- Reports for presenting data
You're ready for any IGCSE ICT database task!