Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Integrity | AGRANT UPDATE ON accounts TO bank_manager; | |
| 2UPDATE accounts SET balance = 999999 WHERE accountId = 7; | BThe change was made by an unauthorised person and was accepted without any check, so the balance is no longer accurate and integrity is broken. | |
| 3Only authorised users may change a balance, which protects integrity | CA tampered balance: an unauthorised change that breaks data integrity | |
| 4A balance must stay accurate, so a rule blocks impossible changes | DALTER TABLE accounts ADD CHECK (balance >= 0); | |
| 5GRANT UPDATE ON accounts TO PUBLIC; | EData stays accurate and unaltered unless an authorised person changes it | |
| 6A customer edits their own balance from 500 to 5000, and the bank accepts it as correct. | FEvery user can change balances, so anyone could tamper with them and integrity is not protected. Only authorised users should get UPDATE. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Integrity — Data stays accurate and unaltered unless an authorised person changes it, so a tampered bank balance breaks integrity.UPDATE accounts SET balance = 9999
WHERE id = 4;if storedBalance ≠ expectedBalance then
print "Tampering detected"
end ifif role = "admin" then
balance ← newBalance
end ifGRANT SELECT ON accounts TO customer;balance DECIMAL(10,2) CHECK (balance >= 0)