Professional Documents
Culture Documents
ch08 TE Eng
ch08 TE Eng
Activity 7
9. (a) 8,4
(b) SELECT * FROM members ORDER BY join_date DESC;
10. (a) 5
(c) SELECT * FROM members WHERE last_name IN("Wu",
"Fan") ORDER BY join_date;
11. (a) Display the records for members whose last name is ‘Wu’.
(b) Display the records for members whose identity number is greater than 5 in
the order of their last names.
(c) Display the last name, the first name and height for all members.
(d) Display the records for members whose first name starts with ‘B’.
(e) Display the total numbers of members.
Extended Activity
2.
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers
Concept Map
1. E
2. C
3. F
4. A
5. B
6. D
Concept Checker
1. T
2. T
3. F
4. F
5. F
Short Questions
1. In the past, a ‘manual filing system’ (a card file or a filing cabinet system) was
used to store data. The problems of using a manual filing system are that only
one person could look at a file at a time, people would have to move to the place
where the data is stored, and it is much more difficult and slower in searching
and sorting files. (1) Now, using a DBMS, we can store, search and sort data
quickly and accurately. (1)
However, the disadvantages of computerized databases are that it requires cost
for training staff, (1) and there are security concerns about databases on
networks. (1)
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers
• able to specify a location/district and then display all the customers’
information in that location;
• able to print a price list of frozen foods;
• very easy to use; and
• password protected.
(any five × 1)
4.
Database object Function
Table Storing data
Query Searching, sorting, collecting and manipulating data
Form Producing customized user interfaces for the database system
Report Producing customized reports for printing on paper
Macro Performing simple automated operations
Module Performing more complex automated operations
(Correct function for each object × 1)
Long Questions
1. (a) six (1)
data type (1)
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers
description (1)
(b) (i) 50 (1)
(ii) This will perform a field presence check so that users must enter a
name for the field. (1)
(c)
Option Value changed to Purpose
Validation >0 Implement a range check to
Rule ensure the number entered is
greater than 0. (1)
Required Yes Perform a field presence check
to ensure a number is entered.
(1)
(d)
Option Value changed to Purpose
Default Value $1,000 As most students will have paid
$1,000, it helps avoid typing the
value and set this as the default
value. (1)
Validation Between 500 and Perform a range check to ensure
Rule 2,000 that the amount paid is between
500 and 2,000. (1)
Validation Text Incorrect data This is the text which will
entered into the appear when data fails to pass
‘paid’ field the validation rule. (1)
(e) A primary key is a field which is unique for identifying every record from
each other. (1)
(f) Because more than one student may have the same name. (1)
2. (a)
Field name Data type Field length
mem_id numeric 4
first_name text 20
last_name text 20
street text 50
district text 20
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers
zone text 2
tel_no numeric 8
(each correct pair of data type and field length × 1)
(b)
Field name Data type Field length
class_code text 3
subject text 50
teacher text 20
level text 3
class_size numeric 2
(each correct pair of data type and field length × 1)
3. (a) The field ‘age’ should not be used (1) because its value would be changed
year by year. (1) Thus, a lot of updates have to be made on this field for
every record. (1) Instead, the date of birth of the students, data which is not
changed usually, can be used as a field to replace ‘age’. (1)
(b) Some fields may be empty in value (1) which is a waste of disk storage
space. (1) Also, it is a poor design with the following two reasons:
• If a student is studying six courses, this cannot be represented in the
table. (1)
• If a student is only studying one course, then four fields are left empty
and this is a considerable waste of space. (1)
(c) The field ‘courses_taken’ (1) stored more than one value. (1) A field should
be designed to contain only one value. (2)
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers
(g) SELECT * FROM cars WHERE price BETWEEN 200000 AND
400000; (1)
(h) SELECT count(*) FROM cars WHERE sunroof = "No"; (1)
(i) SELECT make, MAX(engine_size) FROM cars GROUP BY
make; (1)
(j) SELECT make, AVG(price) FROM cars GROUP BY make; (1)
(k) SELECT MAX(price) FROM cars; (1)
(l) SELECT make, model, price*1.1 AS new_price FROM
cars; (1)
© Pearson Education Asia Limited 2009 NSS ICT Compulsory Textbook Answers