Cyber Security  ·  Level 6
Secure Databases
Chapter 3: Create a database
📚 1 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • Create a database using your chosen DBMS that matches the approved design specifications.
  • Define tables, fields, and relationships accurately according to the database schema.
  • Apply primary keys, foreign keys, and constraints to keep your data reliable and consistent.
  • Set up security controls like user accounts, roles, and privileges to protect your database.
  • Implement stored procedures, triggers, and views correctly to enhance database functionality and security.
  • Insert sample data accurately to test how your tables, relationships, and security rules work.
  • Document your database creation clearly, following your organization's standards and security policies.

Mastering these skills ensures you build secure, reliable databases that keep data safe and support real-world business needs.

Creating and managing databases securely is a critical skill for cyber security professionals tasked with protecting sensitive data in Kenya's diverse institutional environments. Whether working with financial institutions like KCB or managing health records at county hospitals, understanding how to query databases efficiently and securely underpins effective data governance and threat mitigation. This chapter focuses on querying databases using MySQL, a widely adopted open-source relational database management system, to equip learners with practical and security-conscious SQL skills.

3.1 Querying a database using MySQL

In the Kenyan cyber security context, querying a database is essential for extracting, analyzing, and securing data stored in relational databases. Cyber security professionals must be proficient with SQL (Structured Query Language) to investigate potential breaches, audit access logs, and ensure data integrity. MySQL remains popular in many Kenyan organizations due to its robustness and community support, making it a practical skill for professionals safeguarding data assets in sectors such as education, finance, and public administration.

3.1.1 Identify categories of SQL statements

SQL statements fall into distinct categories, each serving specific roles in database interaction. Understanding these categories enables cyber security experts to control data access appropriately and design queries that minimize vulnerabilities.

Data Query Language (DQL)

  • Purpose: Retrieves data from databases, mainly through the SELECT statement.
  • Security Aspect: Limiting DQL queries reduces exposure of sensitive information, critical in institutions like the National Hospital Insurance Fund (NHIF).
  • Example: Querying patient records to verify access without exposing unnecessary data fields.
  • Operation: DQL does not modify data but can influence audit trails when used in security monitoring.
  • Risk: Poorly designed SELECT queries may lead to data exposure or SQL injection if inputs are not sanitized.

Data Definition Language (DDL)

  • Purpose: Defines or alters database structures using statements like CREATE, ALTER, and DROP.
  • Security Aspect: DDL permissions must be restricted to prevent unauthorized schema changes, which could compromise data integrity.
  • Example: Altering table structures in a county government database for tax records requires strict access control.
  • Operation: DDL commands affect database schema, impacting how data is stored and accessed.
  • Risk: Unauthorized DDL changes may create backdoors or disrupt auditing mechanisms.

Data Manipulation Language (DML)

  • Purpose: Manipulates data within tables using INSERT, UPDATE, DELETE.
  • Security Aspect: DML operations must be logged to trace unauthorized data alterations, especially in banking systems like Equity Bank.
  • Example: Updating customer loan status records while ensuring transaction logs are maintained.
  • Operation: DML commands change the content but not the structure of the database.
  • Risk: Unchecked DML commands can lead to data corruption or loss.

Data Control Language (DCL)

  • Purpose: Controls access permissions with GRANT and REVOKE.
  • Security Aspect: DCL is fundamental in enforcing the principle of least privilege across institutions such as universities or SACCOs.
  • Example: Granting read-only access to auditors in a retail business database.
  • Operation: DCL commands manage who can perform what operations on database objects.
  • Risk: Misconfigured DCL can lead to privilege escalation or unauthorized data access.

3.1.2 Design SQL statements

Effective SQL statement design balances query efficiency, readability, and security. In Kenya’s cyber security landscape, well-designed SQL statements help prevent injection attacks and reduce system load, maintaining data confidentiality and availability.

Principles of SQL statement design

  • Clarity: Write statements that are easy to read and maintain, facilitating audits and reviews in institutions such as county government offices.
  • Efficiency: Optimize queries to reduce execution time, important for large datasets in telecommunications companies.
  • Security: Use parameterized queries or prepared statements to prevent SQL injection attacks.
  • Modularity: Break complex queries into smaller, reusable components to simplify debugging and updates.
  • Compliance: Ensure statements comply with data protection laws like Kenya’s Data Protection Act to safeguard personal data.

Components of SQL statements

  • Clauses: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY define data retrieval parameters.
  • Expressions: Conditions and calculations applied within queries to filter or compute data.
  • Functions: Built-in functions such as COUNT(), AVG(), used to aggregate data for reports in sectors like insurance.
  • Operators: Logical and comparison operators to refine search criteria.
  • Subqueries: Nested queries allowing complex data extraction often used in fraud detection systems.

Security considerations in SQL statement design

  • Input validation: Ensures only expected data types and values are processed.
  • Use of least privilege: Design queries that operate within the minimum required permissions.
  • Avoid dynamic SQL: Prefer static or parameterized queries to limit injection risks.
  • Auditability: Include mechanisms to log query execution for forensic analysis.
  • Data masking: Implement query-level controls to hide sensitive fields such as PINs or passwords.

Tools supporting SQL statement design

  • MySQL Workbench: Provides visual query builders and syntax checking, aiding cybersecurity teams in crafting secure queries.
  • SQL parsers and linters: Detect syntax errors and potential security flaws before deployment.
  • Version control systems: Track changes in SQL scripts to maintain accountability in organizations like KRA.
  • Query profiling tools: Analyze query performance to optimize execution plans.
  • Security scanners: Identify injection vulnerabilities and insecure coding patterns.

3.1.3 Design SQL Queries

Designing SQL queries requires a systematic approach to extract meaningful and secure data insights. Kenyan cyber security professionals must tailor queries to the specific security and operational contexts of their organizations.

Understanding query requirements

  • Data needs: Identify what data is necessary and relevant to the security task.
  • Access rights: Determine who will execute the query and their permission levels.
  • Output format: Define how results should be presented for effective analysis.
  • Performance constraints: Consider database size and system load to avoid disruptions in service.
  • Regulatory compliance: Ensure queries do not expose protected personal data unnecessarily.

Structuring SQL queries

  • Select clause precision: Limit columns to only those needed, minimizing data exposure.
  • Filtering criteria: Use WHERE clauses to target specific records, improving efficiency.
  • Joining tables: Combine related data securely without creating cross-site data leaks.
  • Aggregation: Use GROUP BY and HAVING to summarize data for reports, e.g., summarizing transaction anomalies in SACCOs.
  • Ordering results: ORDER BY helps prioritize data review, such as sorting flagged access attempts by timestamp.

Query optimization techniques

  • Index utilization: Design queries to leverage existing indexes for faster data retrieval.
  • Avoiding subquery pitfalls: Replace nested queries with JOINs where possible to improve performance.
  • Limiting result sets: Use LIMIT clauses to reduce load during preliminary data analysis.
  • Caching results: Store frequent query results temporarily to reduce repeated processing.
  • Analyzing query plans: Use EXPLAIN statements to understand and improve query execution paths.

Incorporating security in query design

  • Parameterization: Always design queries to accept parameters rather than concatenating strings.
  • Role-based filtering: Embed logic to restrict data visibility based on user roles.
  • Data anonymization: Incorporate functions that mask sensitive data fields in query outputs.
  • Error handling: Avoid detailed error messages that could reveal database structure to attackers.
  • Logging queries: Ensure all executed queries are logged for accountability and incident investigation.

3.1.4 Use SQL statements to query a database

Executing SQL statements effectively requires technical proficiency and awareness of security best practices. Cyber security professionals in Kenya utilize these skills to monitor and protect data assets across diverse sectors.

Setting up the MySQL environment

  • Installation: Deploy MySQL server on secure infrastructure, following Kenya ICT Authority guidelines.
  • User accounts: Create database users with least privilege, e.g., read-only accounts for auditors.
  • Connection methods: Use secure protocols like SSL/TLS for remote database connections.
  • Client tools: Utilize MySQL command-line client or graphical interfaces like phpMyAdmin.
  • Backup preparation: Establish backup routines before running queries that modify data.

Executing SELECT queries

  • Syntax: Use SELECT statements to retrieve data, specifying columns and conditions.
  • Filtering: Apply WHERE clauses to narrow down results.
  • Sorting: Use ORDER BY to organize output.
  • Limiting: Employ LIMIT to control the number of returned rows.
  • Example: Querying loan application statuses at a SACCO to detect irregularities.

Executing data modification statements

  • INSERT: Add new records with careful validation to prevent injection.
  • UPDATE: Modify existing records while ensuring changes are logged.
  • DELETE: Remove records cautiously, with backup and audit trails.
  • Transactions: Use BEGIN, COMMIT, and ROLLBACK to maintain data integrity during batch operations.
  • Example: Updating employee access rights in a university database following a security audit.

Monitoring and troubleshooting query execution

  • Error diagnostics: Interpret MySQL error codes to resolve syntax or permission issues.
  • Performance monitoring: Use SHOW PROCESSLIST to track running queries.
  • Lock management: Identify and resolve table locks that hinder database availability.
  • Query logging: Enable general and slow query logs for security analysis.
  • Example: Investigating slow query logs at a county government office to detect potential denial-of-service attempts.

Practice Questions

  1. Explain the different categories of SQL statements and their significance in securing a database in a Kenyan financial institution. (10 marks)
  2. Describe five principles of designing secure SQL statements and how they reduce the risk of data breaches. (10 marks)
  3. Outline the steps you would take to design an efficient and secure SQL query to extract audit logs from a hospital database. (10 marks)
  4. Demonstrate how you would execute a SELECT query in MySQL to retrieve data on customer transactions exceeding Ksh 100,000. (10 marks)

Chapter Summary

This chapter focused on querying a database using MySQL, starting with the identification of different categories of SQL statements. It explained the roles of data definition, data manipulation, and data control statements in managing databases effectively. The chapter then guided the design of SQL statements, emphasizing the correct syntax and structure needed to perform various database operations. Building on this foundation, it covered the design of SQL queries, detailing how to retrieve specific data by filtering, sorting, and joining tables. The practical application of these concepts was demonstrated through the use of SQL statements to query a database, highlighting how to extract meaningful information efficiently. Overall, the chapter provided a comprehensive understanding of constructing and executing SQL queries within MySQL to manage and interact with databases securely and effectively.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

A. Written Assessment

  1. Which of the following is NOT a category of SQL statement? (2 marks)
    a) Data Definition Language (DDL)
    b) Data Manipulation Language (DML)
    c) Data Encryption Language (DEL)
    d) Data Control Language (DCL)

  2. Explain the purpose of the SQL SELECT statement in querying a database. (3 marks)

  3. Identify and describe three categories of SQL statements used in managing a database. (6 marks)

  4. Write an SQL query to retrieve the names and phone numbers of all customers from a table named CustomerDetails. (4 marks)

  5. What is the difference between the WHERE clause and the HAVING clause in SQL queries? (4 marks)

  6. Design an SQL statement to update the email address of a user with user_id 1001 in a table named Users. (4 marks)

  7. Describe how the JOIN operation works in SQL and give an example of when it would be used in a cybersecurity context. (5 marks)

  8. Explain why parameterized queries are important in preventing SQL injection attacks. (4 marks)

  9. Write an SQL query that counts the number of login attempts per user from a table named LoginAttempts. (4 marks)

  10. What role does the GRANT statement play in database security management? (3 marks)

Show Answers
  1. c) Data Encryption Language (DEL)
    Explanation: DEL is not a recognized category of SQL statements. The main categories are DDL, DML, DCL, and TCL.

  2. The SELECT statement is used to retrieve data from one or more tables in a database. It allows filtering and specifying which columns to display, essential for extracting relevant information efficiently.

  3. Data Definition Language (DDL): Defines and modifies database structure, such as creating or altering tables.

  4. Data Manipulation Language (DML): Handles data operations like inserting, updating, deleting, and retrieving data.
  5. Data Control Language (DCL): Manages permissions and access control, including GRANT and REVOKE commands.

SELECT name, phone_number FROM CustomerDetails;
  1. The WHERE clause filters rows before grouping, affecting individual records, while the HAVING clause filters groups after aggregation functions like COUNT or SUM are applied.

UPDATE Users SET email = 'newemail@example.com' WHERE user_id = 1001;
  1. JOIN combines rows from two or more tables based on a related column. In cybersecurity, JOIN can be used to link user activity logs with user profile information to detect suspicious behavior.

  2. Parameterized queries separate SQL code from data inputs, preventing attackers from injecting malicious SQL code, thus reducing the risk of SQL injection vulnerabilities.

SELECT user_id, COUNT(*) AS login_attempts FROM LoginAttempts GROUP BY user_id;
  1. The GRANT statement assigns specific privileges to users or roles, controlling what operations they can perform on database objects, which is critical for enforcing security policies.

B. Oral Assessment

  1. Discuss how SQL injection attacks exploit poorly designed SQL queries and outline strategies to secure SQL queries in a Kenyan financial institution.

  2. Explain the role of SQL query optimization in protecting sensitive data within large healthcare databases such as those managed by Kenyatta National Hospital.

Answer Guide

Question 1 key points:

  • SQL injection occurs when user inputs are improperly sanitized, allowing attackers to manipulate SQL statements.
  • Use of parameterized queries and prepared statements prevents injection by separating code from data.
  • Implementing least privilege access via GRANT statements limits potential damage.
  • Regular security audits and input validation enhance defense.
  • Educating developers on secure coding practices is essential.

Question 2 key points:

  • Query optimization reduces processing time and resource consumption, minimizing exposure of sensitive data during long queries.
  • Efficient queries lower the risk of time-based attacks and data leakage.
  • Proper indexing and query plans help secure access paths to data.
  • Query optimization supports compliance with data protection laws by ensuring timely and secure data retrieval.
  • Monitoring query performance can detect anomalies indicating potential security breaches.

C. Case Study

The Nairobi County Health Department maintains a database of patient records and access logs. Recently, they experienced unauthorized access attempts suspected to involve exploitation of weak SQL queries.

Tasks:
a) Identify three categories of SQL statements relevant to managing and securing the patient database. (6 marks)
b) Design an SQL query to list all patients who have visited the hospital in the last 30 days. (5 marks)
c) Propose two SQL-based security measures to prevent unauthorized data access in this context. (4 marks)

Suggested Approach

a)

  • Data Definition Language (DDL): To define or alter tables holding patient and access data.
  • Data Manipulation Language (DML): For querying patient visits and updating records.
  • Data Control Language (DCL): To manage user permissions and restrict access to sensitive data.

b)

SELECT patient_id, patient_name, visit_date  
FROM PatientVisits  
WHERE visit_date >= CURDATE() - INTERVAL 30 DAY;

c)

  • Implement parameterized queries to prevent SQL injection attacks in all database interactions.
  • Use GRANT and REVOKE statements to enforce the principle of least privilege, ensuring only authorized personnel can query sensitive tables.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. Identify and describe the main categories of SQL statements relevant to securing databases in a Kenyan banking environment such as Equity Bank. (4 marks)
  2. Explain the importance of designing precise SQL statements when querying sensitive customer data in a SACCO database. (4 marks)
  3. Differentiate between a SQL query and a SQL statement, providing examples applicable in a hospital patient records system. (4 marks)
  4. Write a SQL SELECT statement to retrieve all active user accounts from a county government employee database. (4 marks)
  5. Describe the role of the WHERE clause in filtering data, illustrating with an example from a retail business inventory database. (4 marks)
  6. What are the security considerations when using SQL queries to access data in the Kenya Revenue Authority (KRA) taxpayer database? (4 marks)
  7. Explain the use of JOIN operations in SQL with an example involving two tables: Employees and AccessLogs in a university’s IT department. (4 marks)
  8. Outline the steps to design an SQL query that extracts records of users who failed login attempts more than three times in a hotel management system. (4 marks)
  9. Discuss how parameterized queries help prevent SQL injection attacks in an online banking system. (4 marks)
  10. Describe the function of the GROUP BY clause in SQL and provide an example of its use in a cooperative society’s member contributions database. (4 marks)
Section A - Answers
  1. Categories of SQL statements include Data Definition Language (DDL) for creating and modifying schema, Data Manipulation Language (DML) for querying and updating data, Data Control Language (DCL) for managing permissions, and Transaction Control Language (TCL) for transaction handling. In Equity Bank, DCL is critical for controlling user access to customer data.
  2. Precise SQL statement design ensures that only intended data is accessed or modified, reducing the risk of unauthorized data exposure or corruption in SACCO databases holding member financial details.
  3. A SQL statement is any command executed on the database, such as CREATE or INSERT. A SQL query specifically retrieves data, for example, SELECT * FROM Patients WHERE Status='Admitted' in a hospital system.
  4. sql SELECT * FROM Employees WHERE Status = 'Active';
  5. The WHERE clause filters records to return only those meeting specified conditions, e.g., SELECT * FROM Inventory WHERE Quantity < 10; retrieves items low in stock for a retail business.
  6. Security considerations include restricting query access via roles, encrypting sensitive fields, and avoiding excessive data exposure to prevent leaks of taxpayer information.
  7. JOIN operations combine rows from two tables based on related columns, e.g., SELECT Employees.Name, AccessLogs.LoginTime FROM Employees JOIN AccessLogs ON Employees.ID = AccessLogs.EmployeeID; useful for auditing university IT access.
  8. Steps: identify relevant tables, determine columns for login attempts, use WHERE clause to filter failed attempts, group by user ID, and filter groups having failed attempts > 3.
  9. Parameterized queries separate code from data input, preventing malicious input from altering SQL logic, thus mitigating SQL injection risks in online banking platforms.
  10. GROUP BY aggregates data by specified columns, e.g., SELECT MemberID, SUM(Contribution) FROM Contributions GROUP BY MemberID; summarises total contributions per member in a cooperative society.

SECTION B (60 Marks) - Answer any TWO Questions

Question 11 (Compulsory - 20 marks)
The Nairobi County Health Department maintains a patient database that contains sensitive personal and medical information. The department needs to generate reports on patients with chronic diseases for targeted healthcare programs.
a) Design SQL statements to create tables suitable for storing patient and medical condition data, ensuring data integrity and security. (10 marks)
b) Write SQL queries to extract all patients diagnosed with hypertension and diabetes, including their contact details, ensuring compliance with data privacy principles. (10 marks)

Question 12 (20 marks)
Discuss the design and execution of SQL queries to audit user access logs in a financial institution such as KCB Bank. Include how to identify suspicious login patterns and the role of SQL in cybersecurity monitoring.

Question 13 (20 marks)
Explain the differences between DDL, DML, DCL, and TCL SQL statements, and illustrate how each category can be used to enhance database security in a county government payroll system.

Question 14 (20 marks)
A retail chain uses a MySQL database to manage inventory and sales data. Describe how to design and implement SQL queries that generate sales reports by product category and region, while ensuring the queries do not expose sensitive business data to unauthorized users.

Section B - Answers

Question 11
a) Tables should include primary keys, foreign keys, and constraints such as NOT NULL to enforce data integrity. For example, a Patients table with PatientID as PK, and a Conditions table linked via PatientID as FK. Use appropriate data types and consider encryption for sensitive fields like contact details.
b) Queries should use SELECT statements with JOINs between Patients and Conditions tables, filtering WHERE Condition IN ('Hypertension', 'Diabetes'). Access controls and views can restrict exposure to authorized roles only.

Question 12
Design SQL queries to extract login timestamps, user IDs, and IP addresses from AccessLogs, using GROUP BY and HAVING clauses to detect multiple failed attempts or logins from unusual locations. SQL facilitates automation of monitoring by enabling complex filters and aggregations critical for cybersecurity.

Question 13
DDL statements like CREATE and ALTER define and modify database structure, essential for enforcing security schema. DML commands (SELECT, INSERT) handle data retrieval and changes, which must be carefully controlled. DCL commands (GRANT, REVOKE) manage user privileges, directly impacting security. TCL (COMMIT, ROLLBACK) ensures transaction integrity, preventing partial data exposure.

Question 14
Design queries using SELECT with GROUP BY on product categories and regions. Use views and roles to limit data access. Implement WHERE clauses to filter data and avoid exposing sensitive cost or supplier information. Parameterized queries prevent injection attacks, maintaining data confidentiality.

References

  1. TVET CDACC - Secure Databases Curriculum (Cycle 3, 2025)
  2. TVET CDACC - Secure Databases Occupational Standards
  3. Data Protection Act, 2019
  4. Computer Misuse and Cybercrimes Act, 2018

Chapter Practical Activities

Practical 1: Execute Basic MySQL Queries on Sample Database

Cyber Security · Level 6
Secure Databases
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Create and execute MySQL queries to retrieve customer names, order dates, and total order amounts from the sample database 'customer_db' as per the provided specifications.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Laptop with MySQL Workbench installedSample MySQL database dump file (customer_db.sql)
MySQL Server (version 8.0 or higher)USB flash drive for data transfer
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Laptop with MySQL Workbench installed1 Pc per Candidate
2Sample MySQL database dump file (customer_db.sql)1 Pc per Candidate
3MySQL Server (version 8.0 or higher)1 Pc per Candidate
4USB flash drive for data transfer1 Pc per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Setup and Database Import
Candidate installs or accesses MySQL Server and MySQL Workbench
(Award 2 marks if MySQL Server and Workbench are correctly accessed or installed)
2
Candidate imports the provided sample database dump file 'customer_db.sql' successfully
(Award 3 marks if database import completes without errors)
3
Sub-Total5
TASK 2: Write and Execute Basic Queries
Candidate writes a query to list all customer names from the 'customers' table
(Award 3 marks if query syntax is correct and retrieves customer names)
3
Candidate writes a query to retrieve all order dates from the 'orders' table
(Award 3 marks if query syntax is correct and retrieves order dates)
3
Candidate writes a query to calculate total order amount per order from the 'order_details' table
(Award 4 marks if query correctly sums amounts grouped by order ID)
4
Candidate executes all queries successfully and displays correct output
(Award 5 marks if all queries run without errors and output matches expected results)
5
Sub-Total15
PRODUCT CHECKLIST
Queries return accurate and complete data as specified (customer names, order dates, total order amounts)
(Award 10 marks if all query results are accurate, complete, and formatted clearly)
10
Sub-Total10
GRAND TOTAL30
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)

Practical 2: Classify SQL statement categories

Cyber Security · Level 6
Secure Databases
PRACTICAL ASSESSMENT
TIME: 3 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Classify a list of 16 specific SQL statements into their correct categories: DDL, DML, DCL, and TCL on the provided chart template.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
PenList of 16 SQL statements printed on A4 sheets
CalculatorClassification chart template (DDL, DML, DCL, TCL)
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1List of 16 SQL statements printed on A4 sheets1 Set per Candidate
2Classification chart template (DDL, DML, DCL, TCL)1 Sheet per Candidate
3Pen1 Pc per Candidate
4Calculator1 Pc per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Identification and classification of SQL statements
Candidate wears appropriate PPE (e.g., lab coat, if applicable)
(Award 1 mark for PPE compliance or zero)
1
Candidate correctly reads and understands each SQL statement
(Award 1 mark for each correctly understood group of 5-6 statements, max 3)
3
Candidate correctly classifies statements into DDL category
(Award 1 mark for each correct DDL statement classification, max 4)
4
Candidate correctly classifies statements into DML category
(Award 1 mark for each correct DML statement classification, max 4)
4
Candidate correctly classifies statements into DCL category
(Award 1 mark for each correct DCL statement classification, max 2)
2
Candidate correctly classifies statements into TCL category
(Award 1 mark for each correct TCL statement classification, max 3)
3
Candidate submits completed classification chart on time
(Award 1 mark if submitted within allocated time or zero)
1
Sub-Total18
PRODUCT CHECKLIST
Classification chart correctly completed with all 16 SQL statements accurately categorized
(Award 1 mark for each correct category assignment, max 7)
7
Sub-Total7
GRAND TOTAL25
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)
🔒

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒Design and Execute SELECT SQL Queries on Employee DatabasePractical 3
🔒Create and execute INSERT SQL statements for employee recordsPractical 4
🔒Develop and execute UPDATE SQL statements to modify employee recordsPractical 5
🔒Formulate and Execute DELETE SQL Statements to Remove RecordsPractical 6
🔒Construct complex SQL queries with subqueries on a sales databasePractical 7
🔒Create Secure Database Tables Using SQL CREATE TABLE StatementsPractical 8
🔒Write SQL Statements for User Privileges and Access ControlPractical 9
🔒Execute combined SQL operations on a MySQL databasePractical 10
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

Create a free account
Test Yourself 18 questions Start quiz ▾
0%
0 / 2
🔒

16 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • Create a database using your chosen DBMS that matches the approved design specifications.
  • Define tables, fields, and relationships accurately according to the database schema.
  • Apply primary keys, foreign keys, and constraints to keep your data reliable and consistent.
  • Set up security controls like user accounts, roles, and privileges to protect your database.
  • Implement stored procedures, triggers, and views correctly to enhance database functionality and security.
  • Insert sample data accurately to test how your tables, relationships, and security rules work.
  • Document your database creation clearly, following your organization's standards and security policies.

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.