Gr 12 – Trace tables

Debugging pseudocode by stepping through it with a trace table  Here are three pseudocode trace table exercises with their solutions. NOTES: You must have a column in the solution for the line number. The loops must be clearly visible ie the lines numbers get repeated...

Gr 12 – Search Array

In SQL there is an IN statement that looks for a value within a given list. Example. SELECT town FROM tblTowns WHERE town IN (‘Johannesburg’, ‘Pretoria’, ‘Cape Town’); How does one code the same thing in Java when using a regular...

Gr11 12 – Data Validation

Data Validation Overview. V1 Validation first, followed by verification. Validation – does the data match the template? Example: The date template could be “yyyy-MM-dd” Verification – the data does match the template but is it valid? Example: “2026-14-13” matches the...

Gr11 12 – SQL database

It is easy to think that a database has some sort of logic, intelligence and self-awareness. It is does not. A database is like a suitcase of clothes. Some items “go with” other items but the clothes themselves do not understand their relationship with one...

Gr12 – SQL. Random numbers

Random numbers with predictable starting and ending values eg 1 – 10, 1 – 100, 1 -1000In SQL we use the RND( ) function. Inside the round brackets goes the seed value (an integer value) Generating a random number requires a few steps. A) Generating a...