Grade 12 results are out. Where to check yours

Unit notes and practice questions

Grade 12 Information Technology unit 3: Database Management System

Everything here is for unit 3 of the Grade 12 Information Technology textbook: what the chapter covers, the short notes, practice questions with their answers, and the lesson video where one exists.

Get it on Google Play
4
Cards
10
Practice questions on unit 3
60–99
The textbook pages for unit 3

What unit 3 covers

  1. 1.Overview of Relational Database Management System
  2. 2.Database Manipulation Using SQL
  3. 3.Using SQL in Microsoft Access
  4. 4.Data Definition Language (DDL)
  5. 5.Data Manipulation Language
  6. 6.Data Query Language: SELECT Command

Short notes for unit 3

The cards filed under this chapter on the Grade 12 Information Technology page. Open one at a time.

When you use it

Use when updating existing records or removing specific records from a table.

Watch out

Executing UPDATE or DELETE without a WHERE clause affects every single row in the table, permanently overwriting or deleting all data.

Drafted from Grade 12 Information Communication Technology, pages 60-99, then checked twice before it went up

CategoryCommandsPurpose
DDLCREATE, ALTER, DROPDefines and modifies database and table structures.
DMLINSERT, UPDATE, DELETEManipulates and manages records stored within tables.
DQLSELECTQueries and retrieves data records from tables.

When you use it

Use this classification to identify the function of different Structured Query Language statements.

Watch out

Do not confuse DDL commands that alter table structure with DML commands that modify row contents.

Drafted from Grade 12 Information Communication Technology, pages 60-99, then checked twice before it went up

ClauseFunctionRequired
SELECTLists the fields to retrieveYes
FROMLists the source tablesYes
WHEREFilters records based on specified criteriaOptional
ORDER BYSorts results in ascending (ASC) or descending (DESC) orderOptional

When you use it

Use when writing queries to retrieve, filter, or sort data from one or more tables.

Watch out

Ascending order (ASC) is the default in ORDER BY. Field names in SELECT must match the table definition exactly.

Drafted from Grade 12 Information Communication Technology, pages 60-99, then checked twice before it went up

When you use it

Use when linking two tables together using CREATE TABLE or ALTER TABLE statements.

Watch out

The foreign key in the child table must have the exact same data type as the primary key it references in the parent table. Always create tables and relationships before populating them with records.

Drafted from Grade 12 Information Communication Technology, pages 60-99, then checked twice before it went up

Practice questions on unit 3

10 multiple-choice questions written against this chapter, each with its answer and the reason. Try one before you open the answer.

Question 1

In a relational database, what does a single row in a table represent?

  1. A.An attribute
  2. B.A record or tuple
  3. C.A data type
  4. D.A database schema
Show the answer and why

Answer: B A record or tuple

Why

In a relational database, each column represents an attribute or field, while each row represents a record (also called a tuple).

Question 2

Which category of SQL commands is used to create, modify, or delete the structure of tables in a database?

  1. A.Data Manipulation Language (DML)
  2. B.Data Definition Language (DDL)
  3. C.Data Query Language (DQL)
  4. D.Data Control Language (DCL)
Show the answer and why

Answer: B Data Definition Language (DDL)

Why

Data Definition Language (DDL) contains commands such as CREATE TABLE, ALTER TABLE, and DROP TABLE that define and alter database structures.

Question 3

According to the data types used in MS Access, how much storage size does a Yes/No field occupy?

  1. A.1 bit
  2. B.1 byte
  3. C.4 bytes
  4. D.8 bytes
Show the answer and why

Answer: A 1 bit

Why

In MS Access, the Yes/No data type holds one of two states (such as Yes/No, True/False, or On/Off) and uses 1 bit of storage.

Question 4

In an SQL SELECT statement, what does the asterisk symbol (*) signify?

  1. A.Only primary key columns
  2. B.The first row in the table
  3. C.All columns in the table
  4. D.Only columns containing numerical data
Show the answer and why

Answer: C All columns in the table

Why

When the SELECT keyword is followed by an asterisk (*), it instructs the database to return all columns (fields) from the table.

Question 5

What is the maximum allowable character size for the TEXT data type in MS Access SQL?

  1. A.Up to 255 characters
  2. B.Up to 4,000 characters
  3. C.Up to 63,999 characters
  4. D.Up to 2,147,483,647 characters
Show the answer and why

Answer: C Up to 63,999 characters

Why

In MS Access, the CHAR data type stores up to 255 characters, whereas the TEXT data type is used for lengthy text and stores up to 63,999 characters.

Question 6

A school administrator in Hawassa executes the following SQL command:
UPDATE Teacher SET T_Salary = 15000;
What is the result of running this command?

  1. A.Only the first teacher's salary is changed to 15,000 birr.
  2. B.The salary of all teachers in the table is changed to 15,000 birr.
  3. C.An error occurs because a WHERE clause is mandatory in every UPDATE statement.
  4. D.Only teachers earning less than 15,000 birr have their salary increased.
Show the answer and why

Answer: B The salary of all teachers in the table is changed to 15,000 birr.

Why

If the WHERE clause is omitted from an UPDATE statement, the specified modification is applied to every record in the table.

Question 7

Which SQL clause is used to sort query results, and what is its default sorting order?

  1. A.ORDER BY, descending
  2. B.GROUP BY, ascending
  3. C.ORDER BY, ascending
  4. D.SORT BY, ascending
Show the answer and why

Answer: C ORDER BY, ascending

Why

The ORDER BY clause specifies how to sort results. Ascending order (ASC) is the default sorting order if neither ASC nor DESC is specified.

Question 8

What is the key difference between the DELETE command and the DROP TABLE command in SQL?

  1. A.DELETE removes the table structure, while DROP TABLE only deletes rows.
  2. B.DELETE removes data records while keeping the table structure, while DROP TABLE deletes the entire table.
  3. C.DELETE is a DDL command, while DROP TABLE is a DML command.
  4. D.DELETE removes only one record at a time, while DROP TABLE removes selected records.
Show the answer and why

Answer: B DELETE removes data records while keeping the table structure, while DROP TABLE deletes the entire table.

Why

The DELETE command (DML) removes records from a table without destroying the table structure, whereas DROP TABLE (DDL) removes the table and its structure completely.

Question 9

Which SQL command correctly modifies an existing table named COURSE to set C_Department as a foreign key that references D_Number in the DEPARTMENT table?

  1. A.ALTER TABLE COURSE ADD FOREIGN KEY (C_Department) REFERENCES DEPARTMENT (D_Number);
  2. B.UPDATE TABLE COURSE ADD FOREIGN KEY C_Department TO DEPARTMENT (D_Number);
  3. C.ALTER TABLE COURSE SET FOREIGN KEY (C_Department) = DEPARTMENT.D_Number;
  4. D.MODIFY TABLE COURSE FOREIGN KEY (C_Department) REFERENCES DEPARTMENT (D_Number);
Show the answer and why

Answer: A ALTER TABLE COURSE ADD FOREIGN KEY (C_Department) REFERENCES DEPARTMENT (D_Number);

Why

To establish a relationship on an existing table using DDL, the syntax is: ALTER TABLE table_name ADD FOREIGN KEY (column_name) REFERENCES parent_table (primary_key_column);.

Question 10

Consider the following SQL query executed on a SALES table:
SELECT CustomerId, SalesDate FROM SALES WHERE SalesDate BETWEEN '01-01-2020' AND '30-02-2020';
Which records are returned by this query?

  1. A.Only sales made strictly after 01-01-2020 and strictly before 30-02-2020
  2. B.Only sales made exactly on 01-01-2020 or on 30-02-2020
  3. C.All sales from 01-01-2020 to 30-02-2020, inclusive of both endpoint dates
  4. D.All sales outside the dates 01-01-2020 and 30-02-2020
Show the answer and why

Answer: C All sales from 01-01-2020 to 30-02-2020, inclusive of both endpoint dates

Why

The BETWEEN ... AND condition defines a range where both the start point ('01-01-2020') and the end point ('30-02-2020') are included as part of the range.

The app holds 12 questions on this unit, marked as you go. These are the first 10.

The textbook pages for unit 3

Unit 3 runs from page 60 to page 99 of the Ministry of Education edition.

Ministry of Education edition, English, 210 pages

Download the PDF

Practise this unit in the app

Temari turns this chapter into timed practice and marks it as you go, with an AI tutor to explain anything that did not land.

Start free

Temari.et is also an Android app, free on Google Play.

Sign inCreate your account