Download Testbank ch 10

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IMDb wikipedia , lookup

Oracle Database wikipedia , lookup

Concurrency control wikipedia , lookup

Ingres (database) wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Database wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Functional Database Model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

SQL wikipedia , lookup

PL/SQL wikipedia , lookup

Clusterpoint wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Starting Out with Visual Basic 2010, 5th Ed by Tony Gaddis/Kip Irvine
TEST BANK
Chapter 10
Identify the letter of the choice that best completes the statement or answers the question.
____ 1.
A database _____________is organized into rows and columns.
a. grid
b. matrix
c. table
d. spreadsheet
____ 2.
A
a.
b.
c.
d.
is a column (or columns) that uniquely identifies each row of data in a database.
selector
main key
identifier
primary key
____ 3.
The SelectedValue property of a data-bound ListBox returns the value in the column specified by the ________ property.
a. ValueMember
b. ReturnColumn
c. ReturnField
d. DisplayMember
____ 4.
A ________ component passes data from one or more database tables to your program.
a. DataTransfer
b. DataSet
c. Connection
d. TableAdapter
____ 5.
A ________ is an in-memory copy of data read from database tables.
a. data control
b. dataset
c. connection
d. data adapter
____ 6.
A ________ statement in SQL retrieves data from a database.
a. Select
b. Search
c. Find
d. SearchTable
____ 7.
A table adapter’s _________ method is used to add a new row to a table.
a. Add
b. Append
c. Insert
d. Update
____ 8.
In an SQL query, the _____ wildcard character, used with the LIKE operator, will match multiple unknown characters.
a. &
b. #
c. *
d. %
Which statement does NOT accurately describe a database row?
____ 9.
Chapter 10
67
Starting Out with Visual Basic 2010, 5th Ed by Tony Gaddis/Kip Irvine
TEST BANK
a.
b.
c.
d.
A row contains related data about a single item such as a department.
A row contains one or more fields.
When discussing a table, we refer to the rows by name.
A row is part of a database table.
____ 10. Which table adapter method reads data from the database into the dataset?
a. Fill
b. Read
c. Select
d. Retrieve
____ 11. You use
to provide multiple selection conditions in an SQL statement.
a. relational operators
b. compound expressions
c. arithmetic operators
d. the & operator
____ 12. A _________ keeps track of a database name, location, and authentication information.
a. Data source
b. Data set
c. Connection object
d. Table adapter
____ 13. What is the simplest way to update a user's changes to the database?
a. No need to save user changes as this occurs automatically
b. Use the Update method of a table adapter
c. Click the diskette icon to save the dataset to the database
d. Call the SaveDataset method of the table adapter
____ 14. The following statements are true about a data source except
a. a data source is usually a database.
b. a data source can be a text file.
c. Data sets contain data retrieved from a data source.
d. Data can be retrieved from but not written back to a data source.
____ 15. Each database ________ is also known as as a row in a database table.
a. record
b. table
c. column
d. field
____ 16. A _______________ is the design of tables, columns and relationships between tables for the database.
a. data table
b. database schema
c. data set
d. relational model
____ 17. __________ allows individual controls such as text boxes and labels to be linked to and automatically display the contents
of a data source.
Chapter 10
68
Starting Out with Visual Basic 2010, 5th Ed by Tony Gaddis/Kip Irvine
TEST BANK
a.
b.
c.
d.
Data binding
A table adapter
A data grid
A data relation
____ 18. The SQL Select statement retrieves data from a database and returns it in a __________, a set of records matching the
selection criteria.
a. Subset
b. Dynaset
c. DataSource
d. Dataset
____ 19. All of the following are true about SQL except __________.
a. SQL provides a standard means of interacting with a database.
b. SQL consists of several keywords.
c. SQL stands for "Sequenced Query Language"
d. SQL is an industry-standard language.
____ 20. Assume the following table named Student exists in a database:
Name
Number
Address
GPA
Adams, Carol
123
Redford Hall
3.6
Baker, Paul
345
Kingman Hall
2.1
Jones, Jill
456
Bassett Hall
3.2
Smith, Mary
887
Redford Hall
3.8
Taylor, Darren
987
Bassett Hall
3.7
CumHrs
67
34
89
112
55
Which of the following SQL statements will return only the student name and GPA from the Student table for all
students having a GPA that is greater than or equal to 3.5?
a.
b.
c.
d.
SELECT
SELECT
SELECT
SELECT
Name, GPA FROM Student WHERE GPA >=3.5
* FROM Student WHERE GPA >= 3.5
Name, Number, GPA, CumHrs FROM Student WHERE GPA >= 3.5
Student WHERE GPA >= 3.5 And Name, GPA
____ 21. __________ is a tool provided by Visual Studio for creating and modifying SQL queries.
a. Server Explorer
b. SQL Explorer
c. Query Builder
d. SQL Toolbox
____ 22. The Where clause of an SQL statement specifies __________.
a. the location of the database being queried
b. which fields are to be displayed
c. specifies the order in which the rows should appear
d. specifies which rows should be retrieved
____ 23. The __________ control displays information from a dataset in row and column format.
a. DataAware
b. DataGridView
Chapter 10
69
Starting Out with Visual Basic 2010, 5th Ed by Tony Gaddis/Kip Irvine
TEST BANK
c.
d.
DataListView
DataTableView
____ 24. Which item describes the function of the following SQL statement?
SELECT ID, Last_Name, First_Name, Address
FROM Members
WHERE Last_Name = @LastName
a.
b.
c.
d.
a simple query
a parameterized query
a compound query
a wildcard query
____ 25. In SQL the bit type is equivalent to which Visual Basic data type?
a. Short
b. Boolean
c. Integer
d. String
____ 26. A unique student ID number could be used as a _________, whereas a student’s last name would not be suitable because
two students might have the last name.
a. Primary Key
b. Sort Key
c. Record Type
d. Data Source
____ 27. A complete set of data for a single student that includes the following information is called a __________.
Student ID, First Name, Last Name, Major, Class
a.
b.
c.
d.
Table
Column
Row
Field
____ 28. Which of the following statements is false?
a. A database can store more data more efficiently than sequential text files.
b. When using a large amount of data, most developers prefer to use a DBMS.
c. Visual Basic is used to interface with the user and a DBMS works directly with the data.
d. Visual Basic statements can directly access database fields without using the DBMS.
Chapter 10
70
Starting Out with Visual Basic 2010, 5th Ed by Tony Gaddis/Kip Irvine
TEST BANK
____ 29. The correct SQL syntax to sort a table by Last_Name in order of A-Z is ______.
a. SORT BY Last_Name ASCENDING
b. ORDER BY Last_Name Down
c. ORDER BY Last_Name ASC
d. ORDER BY Last_Name DESC
____ 30. Which of the following SQL WHERE clauses will select all students whose last name begins with “S”?
a. Where LastName Like “S%”
b. Where LastName Like “S”
c. Where LastName = “S%”
d. Where LastName = “S*”
Chapter 10
71
Starting Out with Visual Basic 2010, 5th Ed by Tony Gaddis/Kip Irvine
TEST BANK
Chapter 10
Answer Section
Answer
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
Chapter 10
c
d
a
d
b
a
c
d
c
a
b
c
b
d
a
b
a
d
c
a
c
d
b
b
b
a
c
d
c
a
Page Reference
599
599
660
603
603
633
628
636
599
614
636
607
649
603
599
600
615
633
633
636
638
635
603
652
612
599
599
597
635
636
72