Font size
WorksheetsSyed: Chapter 9 Databases: IGCSE Computer Science
Total questions: 80
Worksheet time: 2hrs 38mins
What is the primary distinction between data and information?
Data is unorganized, while information is organized
Data is processed, while information is raw
Data includes images, while information does not
Data is stored on a computer, while information is not
Which of the following best describes data?
Raw material for information
Processed information
Structured information
Random collection of facts
What types of items can be classified as data?
Only numbers and letters
Only images and characters
Only organized information
Numbers, letters, characters, and images
What is the purpose of organizing data into a database?
To make data more unstructured
To remove meaning and context
To provide raw material for information
To structure data in a meaningful way
Sarah is trying to understand the concept of data and information. She learns that data can be anything stored on a computer, such as numbers, letters, characters, and images. How would you differentiate data from information based on Sarah's understanding?
Data is unorganized, while information is organized
Data includes only numbers and letters, while information includes images
Data is processed, while information is raw
Data is stored on a computer, while information is not
Alex is studying databases for his computer science class. He learns that a database is a collection of structured data. How would you define a database based on Alex's understanding?
A random assortment of data
Unstructured information on a computer
Processed and organized data
Information without any meaning or context
Emily is confused about the concept of data. She thinks data refers only to numbers and letters. How would you correct Emily's misconception?
Data is raw material for information
Data is processed information
Data is structured information
Data includes numbers, letters, characters, and images
James is learning about the different types of items that can be classified as data. He asks for clarification on what constitutes data. What would be the most appropriate response?
Only numbers and letters
Only images and characters
Only organized information
Numbers, letters, characters, and images
Lily is curious about why data is organized into a database. How would you explain the purpose of organizing data to Lily?
To make data more unstructured
To remove meaning and context
To provide raw material for information
To structure data in a meaningful way
Data can be anything that can be stored on a computer, like numbers, letters, characters, images, and so on. Information is data that has been processed and organized to provide (a) and (b) .
meaning
context
numbers
letters
images
processing
What is a database primarily composed of?
Unstructured data
Structured data stored on paper
Structured collection of data
Random assortment of data
What forms a record in a database?
A collection of tables
A collection of fields
A collection of queries
Random assortment of data
Sarah is learning about databases and wonders how data about various objects is stored. How would you explain the storage of objects' data to Sarah?
In paragraphs
In tables
In files
In images
How are data entered in a database?
As paragraphs
In a random format
In a tabular format
As images
What is the purpose of a query in a database?
To organize data into tables
To define data types
To find full records or specific fields
To enter data into the database
Alex is confused about what constitutes a record in a database. How would you clarify the concept of a record to Alex?
A collection of tables
A collection of fields
A collection of queries
A collection of rows
A column in a database table is referred to as a (a) .
field
row
cell
A collection of fields related to one object forms a (a) , such as all information about a specific person.
record
document
file
Data types define the type of value that can be stored in a table column. For example, Integer, Boolean, (a) , etc.
string
image
video
In a database, data is entered in a tabular format, that is, organized as (a) to provide meaningful information.
tables
attributes
rows and columns
What is the primary purpose of a primary key in a database?
To store data
To ensure duplication in different records
To uniquely identify each record
To run queries on data
What does a primary key uniquely identify in a database? (a)
Records
Tables
Data types
Fields
Match the following!
Database
Structured collection of data.
Field
Single piece of data within a database.
Record
Collection of related fields.
Primary Key
Unique identifier for records.
Information
Processed and organized data.
What does SQL stand for?
Standardized Query Language
Structured Query Language
Sequential Query Language
Simplified Query Language
SQL is a standard language used in most databases for tasks like: Define tables, change tables, add data to tables, search for data from tables, and perform calculations using data from tables. SQL stands for (a)
Which of the following is NOT a function of SQL?
Defining tables
Adding data to tables
Managing network connections
Searching for data from tables
SQL commands are used to interact with which type of databases?
Relational databases
NoSQL databases
File-based databases
Object-oriented databases
Match the following
Text/Alphanumeric
Combination of letters/symbols/numbers
Character
Single letter, number, or symbol.
Boolean
One of two options: True/False, Yes/No.
Integer
Whole number.
Date/Time
A date or a time.
Text/Alphanumeric data type allows for the storage of______?
only numbers
only letters
any combination of letters, symbols, and numbers
single letter, number, or symbol
Boolean data type consists of (a) options.
two
one
three
Integer data type includes (a) numbers.
whole
fractional
negative
Real data type allows for numbers with at least one (a) .
decimal place
negative sign
fractional part
Date/Time data type can represent both (a)
dates and times.
Only Dates.
Only time.
"Lisa"
"Anna"
"123.4"
"%"
"L"
TRUE
FALSE
666
5562
"TRUE"
"Road123"
"123.4"
"%"
"L"
666
5562
"!"
"@"
"#"
"abc"
"def"
"2.718"
"999"
Logical operators are symbols that perform a comparison resulting in (a) .
True or False
Greater than or equal to
Addition
Multiplication
The logical operator "=" is used to check if two values are (a) .
equal to
greater than
less than
The ">" operator checks if the left operand is (a) the right operand.
greater than
less than
equal to
The "<" operator checks if the left operand is (a) the right operand.
less than
greater than
equal to
The "<=" operator checks if the left operand is (a) the right operand.
less than or equal to
greater than or equal to
not equal to
The ">=" operator checks if the left operand is (a) the right operand.
greater than or equal to
less than or equal to
not equal to
The "<>" operator checks if the left operand is (a) the right operand.
Not equal to
Greater than
Less than
<
evaluate the given expression.
10>=10
9<15
10<>5
11=11
12<=12
15>=20
20+10=35
'apple'='apple'
'cat'='dog'
2*4=8
6<>6
12+5<11
The SELECT statement allows you to select a set of ________ from a table.
records
fields
conditions
values
Given a table named "employee" with columns "id", "name", and "department", write an SQL query to select only the names of the employees.
(a)
SELECT name FROM students;
SELECT id FROM students;
SELECT name FROM employee;
In a table named "orders" with columns "order_id", "customer_name", and "order_date", write an SQL query to select only the order dates.
(a) order_date (b) orders;
SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY
Given a table named "products" with columns "product_id", "product_name", and "price", write an SQL query to select only the product names.
(a)
SELECT product_name FROM products;
SELECT product_id FROM products;
SELECT price FROM products;
In a table named "students" with columns "student_id", "student_name", and "grade", write an SQL query to select only the student names.
SELECT (a) FROM (b) ;
students
student_name
student_id, grade
student_id
grade
student_name, grade
In a table named "students" with columns "student_id", "student_name", and "grade", write an SQL query to select all data.
SELECT (a) FROM (b) ;
students
*
ALL
student_id
grade
EVERYTHING
Given a table named "inventory" with columns "item_id", "item_name", and "quantity", write an SQL query to select only the item names.
(a) item_name (b) (c) ;
SELECT
inventory
FROM
FILTER
item_id
WHERE
quantity
GROUP BY
Including a WHERE clause in the SELECT statement allows you to select only specific data. Which Boolean operator is used to combine conditions where both conditions need to be satisfied?
AND
OR
NOT
XOR
Combining conditions in a WHERE clause requires a Boolean operator. Which operator is used when at least one of two conditions needs to be satisfied?
AND
OR
NOT
XOR
In SQL, the WHERE clause is used to filter records based on specified conditions. Which operator is used for exact matching in the WHERE clause?
=
!=
<>
Given a table named "employees" with columns "emp_id", "emp_name", and "department", write an SQL query to select only the employee names who work in the 'HR' department.
SELECT (a) FROM employees (b) emp_name (c) (d) = 'HR';
*
AND
department
WHERE
ALL
DISTINCT
emp_id
JOIN
GROUP BY
Given a table named "students" with columns "student_id", "student_name", and "age", write an SQL query to select all data of students with the name "lisa".
SELECT (a) FROM students (b) student_name="Lisa";
*
WHERE
ALL
student_name
Given a table named "orders" with columns "order_id", "customer_name", and "order_date", write an SQL query to select orders made by customer 'Alice' on January 1, 2023.
SELECT * FROM orders WHERE (a) (b) (c)
Given a table named "inventory" with columns "item_id", "item_name", and "quantity", write an SQL query to select all items with a quantity greater than 10.
(a) * FROM (b) (c) (d) ;
Given a table named "students" with columns "StudentID", "Name","Age","Class","Computer" and "Math", write an SQL query to select student IDs, names, and math scores of students whose math scores are greater than or equal to 70.
SELECT (a)
(b) students
WHERE (c)
Given a table named "students" with columns "student_id", "name", and "score", write an SQL query to select all columns of students except those with the name 'Alina'.
SELECT (a)
FROM students
(b) name (c) ‘Alina’;
Given a table named "employees" with columns "emp_id", "emp_name", and "salary", write an SQL query to select all columns of employees and order the result by salary in descending order.
SELECT * FROM employees (a) salary (b) ;
Given a table named "products" with columns "product_id", "product_name", and "price", write an SQL query to select all columns of products and order the result by product name in ascending order.
SELECT * FROM products (a) product_name (b) ;
Given a table named "orders" with columns "order_id", "customer_name", and "order_date", write an SQL query to select all columns of orders and order the result by order date in descending order.
(a)
Given a table named "sales" with columns "sale_id", "customer_name", and "amount", write an SQL query to select all columns of sales and order the result by amount in ascending order.\
(a)
Given a table named "students" with columns "student_id", "name", and "age", write an SQL query to select all columns of students and order the result by age in ascending order.
(a)
Given a table named "customers" with columns "customer_id", "customer_name", and "email", write an SQL query to select all columns of customers and order the result by email in descending order.
SELECT * FROM (a) ORDER BY (b) (c) ;
Given a table named "expenses" with a column "cost", write an SQL query to calculate the total expenses incurred.
(a)
Given a table named "customers", write an SQL query to count the total number of customers.
SELECT (a) FROM customers;
Given a table named "sales" with a column "amount", write an SQL query to calculate the total sales amount.
SELECT (a) (amount) FROM sales;
Given a table named "orders" with a column "price", write an SQL query to calculate the total price of all orders.
(a)
Given a table named "students" with a column "grade", write an SQL query to count the total number of students who scored above 80.
SELECT (a) FROM students WHERE (b)
Given a table named "orders" with columns "order_id" and "status", write an SQL query to count the total number of completed orders placed by customer 'Alice'.
SELECT COUNT(*) FROM orders WHERE (a)
Match the following
SELECT
Choose specific data.
WHERE
Filter records.
ORDER BY
Sort result set.
ASC / DESC
Ascending / Descending order.
COUNT()
Count number of rows.
WHERE clause is used to (a) records.
ORDER BY sorts data in (a) order.
SQL (a) allows specifying conditions.
DESC sorts data in (a) order.
ASC sorts data in (a) order.
SQL (a) function adds up values.
Match the following!
WHERE
SQL Filtering
ORDER BY
SQL Sorting
ASC / DESC
Sorting Order in SQL
