ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions

N5 Computing Science 2019 Question 8

2 marks · Data dictionary and validation

State a suitable type of validation for the bookRef field. Another book by V R Singh is to be added to the table. The SQL statement below is used to insert this record. INSERT INTO Book (bookRef, title, author, publisher) VALUES ("0745198374564","V R Singh","I’ll Do It Yesterday","East Rand"); Explain why the SQL statement will not produce the intended result. Three records from a database table are shown below. Book bookRef title author publisher 0783567328120 The Cat’s Pyjamas R J Petersen Germiston 0703487922417 Grass Is Green V R Singh East Rand 0724603125633 Climb the Hill R McGrath Brown

Marking scheme

Length (check) or presence (check) Accept implementation examples of validation, LEN(bookRef) = 13 The data/values are input in the wrong order. “V R Singh” and “I’ll do it yesterday” wrong way round.

Previous question: N5 Computing Science 2019 Question 7

Next question: N5 Computing Science 2019 Question 9