0% found this document useful (0 votes)
6 views5 pages

Lesson 1 db

This document is a lesson plan for Grade 11 students on creating a simple database using Microsoft Access. It covers the basics of database theory, the steps to create a database with one table, and the preparation for future lessons involving Delphi. Students are instructed to save their work in a specific folder for use in subsequent lessons.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Lesson 1 db

This document is a lesson plan for Grade 11 students on creating a simple database using Microsoft Access. It covers the basics of database theory, the steps to create a database with one table, and the preparation for future lessons involving Delphi. Students are instructed to save their work in a specific folder for use in subsequent lessons.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

KHARWASTAN SECONDARY

GRADE 11 GOOGLE CLASSROOM TERM 2 ACTIVITY


DATABASE AND DELPHI
LESSON 1: CREATING A DATABASE
N.B.
 This worksheet will take you through each step of a simple database design with 1 table and thereafter in
Lesson 2 we will use Delphi to link to the database created in this lesson.
 By now you should have read through the theory of databases in the 2 units uploaded in this Google
classroom.

1. Database theory basics/review


a. A database is an electronic filing system.
b. It is comprised of rows and columns which makes up a database table.
c. Each column is referred to as a field of information.
d. Each row is a combination of fields which makes up a record.
e. A primary key is a unique field that is used to identify a record.
f. A single database can have 1 or more tables.
g. The main idea is to design a database and close it and thereafter from Delphi using code interact
with the database by:
i. Viewing records
ii. Adding new records
iii. Deleting old records
iv. Updating/editing records
v. Determining/calculating other statistics

2. Creating your first database


a. Create a folder on your desktop and rename GR11 DATABASE LESSON 1 2020. Close the folder.
b. Open Microsoft Access. (whichever version you have)

c. Select Blank database. (Depending on the version you have the pictures may differ and the outlook of
the blank database might be different but select either way.)

1|P ag e “ A I M F O R E X C E L L E N C E ” … E C M
d. Change the File Name from Database1 to KSSdb and thereafter click on the yellow folder icon to
browse location to save the file.

e. A File New Database dialog box will now open. Search for your folder you save in step 1 on your
desktop and select/open it.
Change the Save as type by selecting Microsoft Access 2002-2003 format as below and click ok.

f. Notice the File Name now as a file extension .mdb.


Click on Create.

g. The database opens and ready for you to design your table.

2|P ag e “ A I M F O R E X C E L L E N C E ” … E C M
h. Select the View icon/shortcut on top left corner. There are 2 View options that we will be working
with viz. Design View and Table View.

The Save As dialog box opens for you to save your table and rename it. Save as LearnerTbl. Click ok.

i. The following Design View opens for us to design the Fields of the LearnerTbl.

j. We are now going to type each field name and the data type of the expected data for each field.
Type the field names under Field Name and select the data types under Data Type as below.
For now we will not use the description column.

3|P ag e “ A I M F O R E X C E L L E N C E ” … E C M
N.B.
Go back to each field that has Short Text as its data type. Select each field one at a time and change
the field size under General at the bottom as follows:
AdminNo - change field size to 5
FullName - change field size to 40
Gender - change field size to 1
GradeDiv - change field size to 3

k. Thereafter go back to the View icon/shortcut on top left and select.


Select Yes to save the table changes.

4|P ag e “ A I M F O R E X C E L L E N C E ” … E C M
l. The following blank table in your design opens.

m. Now type few records as sample below.

n. Click on save and close the database. You have now designed your first database called KSSdb with 1
table called LearnerTbl and it should be saved in your project folder from step 1 as below.

N.B

 Do not delete this folder with the database you created. It will be used in Lesson 2 with a Delphi project.
 You can now create and design and practice new databases with 1 table each until it becomes easy n
different folders.
 You will only need to design your own database from ‘scratch’ for PAT. For every other classwork database
question or exam database question, the database will be provided for you and you will be tested on the
Delphi code that interacts with the database.
 In Lesson 2 you will be using the KSSdb you just created in this lesson.

5|P ag e “ A I M F O R E X C E L L E N C E ” … E C M

You might also like