Computing Science Exam Worksheet With Answers - Simon Fraser University Page 24

ADVERTISEMENT

169) If a DataGridView control is filled from a table whose DataAdapter uses an SQL statement of the
169)
form
SELECT * FROM clause ORDER BY field ASC
the result will be the display (in ascending order) of all records that are contained in the table or
tables designated by clause.
Answer:
True
False
170) If a DataGridView control is filled from a table whose DataAdapter uses the SQL statement (with
170)
the database MEGACITIES)
SELECT * FROM Cities WHERE city Like 'S%'
the result will be the display of all of the records from the Cities table that contain the letter S in the
name listed in their city field.
Answer:
True
False
171) An SQL clause of the form
171)
tblA INNER JOIN tblB ON foreign key of tblA=primary key of tblB
causes two tables to be joined.
Answer:
True
False
172) The statement
172)
dgvDisplay.DataSource = dt
(where dgvDisplay is the name of a DataGridView control and dt is a data table) will display the
contents of a data table in a data grid.
Answer:
True
False
173) The Washington State Department of Motor Vehicles maintains a database on all licensed drivers
173)
and the cars that they own within the state. In the first table (Names) they have a listing of all of the
names of all licensed drivers; they have created a unique license number to identify each individual
within this database. In a related second table (Vehicles), the cars owned by Washington State
drivers are tracked. Since drivers often own more than one car, an individual's name (and their
corresponding driver's license number) is likely to appear more than once in this second table.
Therefore, we say that there is a one-to-many relationship from the names table to the vehicles
table in this database.
Answer:
True
False
SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.
The following exercises refer to the Countries table discussed in the text. The table has three fields country, pop2005, and
monetaryUnit with country as the key field. In these exercises, give an SQL statement that can be used to accomplish the
stated task.
174) Show the records from Countries in descending order based on the 2005 population.
174)
Answer: SELECT * FROM Countries ORDER BY pop2005 DESC
175) Show the records from Countries whose monetary unit has five characters.
175)
Answer: SELECT * FROM Countries WHERE monetaryUnit Like '_____'
24

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education