Deck 14: Access Databases and SQL

Full screen (f)
exit full mode
Question
The Query Builder places the WHERE clause's condition in parentheses because the parentheses are required.
Use Space or
up arrow
down arrow
to flip the card.
Question
The syntax to add a record to a dataset is ____.

A) dataSetName.tableName.Add(valueField1[,valueField2…,valueFieldN])
B) dataSetName.tableName.AddRow(valueField1[,valueField2…,valueFieldN])
C) dataSetName.tableName.AddtableNameRow(valueField1[,valueField2…,valueFieldN])
D) dataSetName.tableName.AddRowtableName(valueField1[,valueField2…,valueFieldN])
Question
The statement SELECT YearWon,Title,ProductionCo FROM tblMovies WHERE YearWon >= 2006 selects all of the fields from records for the year 2006 and later.
Question
The statement SELECT YearWon FROM tblMovies WHERE Title = 'Chicago' selects the Chicago field from the YearWon record.
Question
The WHERE statement is the most commonly used statement in SQL.
Question
Which of the following sorts the records for the PartsDataSet by the Price field? Which of the following sorts the records for the PartsDataSet by the Price field?  <div style=padding-top: 35px>
Question
You use the REMOVE statement to delete records.
Question
You use the ____ clause,which contains a condition,to limit the records you want to view.

A) ORDER BY
B) WHERE
C) GROUP BY
D) UNION
Question
Most of the time,you will know in advance the values to include in the criteria of a query.
Question
One record is added to the AccountsDataSet.Which of the following statements will save the record in the Accounts database?

A) TblAccountsTableAdapter.Update(AccountsDataSet.tblAccounts)
B) TblAccountsTableAdapter.Save(AccountsDataSet.tblAccounts)
C) TblAccountsTableAdapter.Store(AccountsDataSet.tblAccounts)
D) TblAccountsBindingSource.Update(AccountsDataSet.tblAccounts)
Question
Because it is possible for an error to occur when saving data to a database,it's a good programming practice to place the Update method within the ____ block of a Try…Catch statement.

A) Try
B) Catch
C) Assert
D) Fail
Question
____ is a set of statements that allows you to access and manipulate the data stored in many database management systems on computers of all sizes,from large mainframes to small microcomputers.

A) TQL
B) LINQ
C) C#
D) SQL
Question
A Try…Catch statement ends with ____.

A) End
B) End Try…Catch
C) End Catch
D) End Try
Question
Which of the following locates the record whose PartNum field contains KL542,and then assigns the record to the row variable? Which of the following locates the record whose PartNum field contains KL542,and then assigns the record to the row variable?  <div style=padding-top: 35px>
Question
The default order of the ORDER BY clause is descending.
Question
You save a query that contains the SELECT statement by associating the query with one or more methods.
Question
Which of the following statements will delete the record associated with a DataRow variable named getRow? Which of the following statements will delete the record associated with a DataRow variable named getRow?  <div style=padding-top: 35px>
Question
If you want the records in a dataset to appear in a particular order when the application is started,you enter the Sort method in the form's ____.

A) Start event procedure
B) Load event procedure
C) Refresh event procedure
D) Click event procedure
Question
For the changes made to a dataset to be permanent,you need to save the changes to the database associated with the dataset.
Question
In order for an application to use a query during run time,you will need to save the query and then invoke it from code.
Question
Which of the following SELECT statements will select the ProdNum field from the tblProducts table,and then sort the records in descending order by the Price field? Which of the following SELECT statements will select the ProdNum field from the tblProducts table,and then sort the records in descending order by the Price field?  <div style=padding-top: 35px>
Question
The wildcard character is the ____.

A) %
B) &
C) *
D) @
Question
Click ____ on the shortcut menu to start the TableAdapter Query Configuration Wizard.

A) Add Configuration
B) Add Query
C) Add Link
D) Add TableAdapter
Question
The ____ clause is used to arrange the records in either ascending (the default)or descending order by one or more fields.

A) GROUP BY
B) WHERE
C) ORDER BY
D) JOIN
Question
The tblTruck table has two text fields named Make and Model,and one numeric field named Year.Which of the following statements adds the record 2013 Ford F150 to the table? The tblTruck table has two text fields named Make and Model,and one numeric field named Year.Which of the following statements adds the record 2013 Ford F150 to the table?  <div style=padding-top: 35px>
Question
The file that contains information about the tables,fields,records,and properties included in the dataset has an ____ extension.

A) .xst
B) .xsq
C) .xsd
D) .xsl
Question
Which of the following is not true regarding the Query Builder?

A) The table and its related fields are displayed in the Diagram pane.
B) You cannot view the results of the query in the Query Builder once it is executed.
C) You can manually type the SELECT statement instead of using the Query Builder.
D) You must click the Execute Query button for the query to run.
Question
You can use the ____ associated with a query to invoke the query during run time.

A) properties
B) methods
C) objects
D) values
Question
The FillByMake method is associated with a parameter query.Which of the following statements invokes the method and passes the contents of the txtMake control's Text property? The FillByMake method is associated with a parameter query.Which of the following statements invokes the method and passes the contents of the txtMake control's Text property?  <div style=padding-top: 35px>
Question
When you don't know the specific value to include in the criteria,you use a ____.

A) limited query
B) tagged query
C) structured query
D) parameter query
Question
Which of the following statements selects the Title and ProductionCo fields from records whose title begins with the word "The" followed by a space and zero or more characters,and then sorts the records in descending order by the ProductionCo field? Which of the following statements selects the Title and ProductionCo fields from records whose title begins with the word The followed by a space and zero or more characters,and then sorts the records in descending order by the ProductionCo field?  <div style=padding-top: 35px>
Question
The tblStudent table contains nine fields,one of which is the StudentID field.A user can type in any StudentID to select a particular student.The user provides 124541 as the StudentID to select.Which of the following statements deletes the student record specified by the user? The tblStudent table contains nine fields,one of which is the StudentID field.A user can type in any StudentID to select a particular student.The user provides 124541 as the StudentID to select.Which of the following statements deletes the student record specified by the user?  <div style=padding-top: 35px>
Question
An Insert query uses the ____ statement to add a record to a database.

A) INSERT
B) ADD
C) UPDATE
D) DELETE
Question
The .xsd file is called the dataset's ____ file.

A) schema
B) layout
C) format
D) standard
Question
The parameter marker is a(n)____.

A) ?
B) *
C) &
D) %
Question
A ____ is a query that uses the parameter marker in place of the criteria's value.

A) structured query
B) parameter query
C) limited query
D) replaceable query
Question
The ____ provides an easy way of associating the query with one or more methods.

A) TableAdapter Configuration Wizard
B) TableAdapter Modification Wizard
C) TableAdapter Dataset Configuration Wizard
D) TableAdapter Query Configuration Wizard
Question
A Delete query uses the ____ statement to delete a record from a database.

A) UPDATE
B) SELECT
C) INSERT
D) DELETE
Question
Which of the following SELECT statements will select the ItemNum and ItemDesc fields from the tblItems table?

A) SELECT ItemNum OR ItemDesc FROM tblItems
B) SELECT ItemNum AND ItemDesc FROM tblItems
C) SELECT ItemNum,ItemDesc IN tblItems
D) SELECT ItemNum,ItemDesc FROM tblItems
Question
You must first ____ to begin creating a SQL query.

A) start the TableAdapter Query Configuration Wizard
B) right-click the CollarsDataSet.xsd file,then click Open to open the DataSet Designer window
C) choose a query type
D) specify a SQL SELECT statement
Question
Three records were added to the ContractsDataSet.Write the statement to save the records in the Contracts database.
Question
What is SQL and how is it used?
Question
An application using the dataset should allow a user to type in a price to use to query the dataset.Which of the following clauses would allow a user to select the records for collars with a price of 15 or more?

A) WHERE Price >= 15
B) WHERE Price Like 15
C) WHERE Price >= ?
D) WHERE Price < ?
Question
Write a SQL SELECT statement that selects all of the fields and records in the table.Sort the records in ascending order by the MemberType field.
Question
Write a SQL SELECT statement that selects the MemberID,LastName,JoinDate,and MemberType fields from all of the records.
Question
What is a parameter query and how is it used?
Question
Write a SQL SELECT statement that allows the user to select the members with a fee greater than or equal to the fee amount provided by the user.The query should select the MemberID,LastName,FirstName,and Fee fields.
Question
Write a SQL SELECT statement that selects the MemberID,LastName,and FirstName fields for all family members.Sort the records in descending order by the JoinDate field.
Question
Write the statement to find the record of a contract with the last name Green and assign the record to a row variable that you declare.Then write the statement to delete that record from the database.
Question
Write a SQL SELECT statement that selects only the records for the Senior members.Select all of the fields.
Question
Write a SQL SELECT statement that selects the MemberID,LastName,and FirstName fields for members having a last name that begins with the letter J.
Question
Write a SQL SELECT statement that allows the user to provide a specific MemberID.The query should select all fields.
Question
Write the statement to add a new record to the dataset.
Question
Write a SQL SELECT statement that inserts the following record into the tblMembers table:
MemberID - 25631
Name - Jane Doe
Date Joined - 2012
Fee - 65
Membership Type - Adult
Question
Write the statement to sort the records in alphabetic order by last name.
Question
An application using the dataset allows the user to provide an ItemNum to select a record to delete from the dataset.Which function must also be used in the code for the Delete button on the form to work properly?

A) INSERT
B) InsertRecordQuery
C) DELETE
D) DeleteRecordQuery
Question
Write a SQL SELECT statement that deletes member 42315 from the tblMembers table.
Question
What method could be used to invoke the previous query during run time?

A) FillByPrice
B) SELECT
C) WHERE
D) Fill
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/58
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 14: Access Databases and SQL
1
The Query Builder places the WHERE clause's condition in parentheses because the parentheses are required.
False
2
The syntax to add a record to a dataset is ____.

A) dataSetName.tableName.Add(valueField1[,valueField2…,valueFieldN])
B) dataSetName.tableName.AddRow(valueField1[,valueField2…,valueFieldN])
C) dataSetName.tableName.AddtableNameRow(valueField1[,valueField2…,valueFieldN])
D) dataSetName.tableName.AddRowtableName(valueField1[,valueField2…,valueFieldN])
C
3
The statement SELECT YearWon,Title,ProductionCo FROM tblMovies WHERE YearWon >= 2006 selects all of the fields from records for the year 2006 and later.
True
4
The statement SELECT YearWon FROM tblMovies WHERE Title = 'Chicago' selects the Chicago field from the YearWon record.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
5
The WHERE statement is the most commonly used statement in SQL.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
6
Which of the following sorts the records for the PartsDataSet by the Price field? Which of the following sorts the records for the PartsDataSet by the Price field?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
7
You use the REMOVE statement to delete records.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
8
You use the ____ clause,which contains a condition,to limit the records you want to view.

A) ORDER BY
B) WHERE
C) GROUP BY
D) UNION
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
9
Most of the time,you will know in advance the values to include in the criteria of a query.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
10
One record is added to the AccountsDataSet.Which of the following statements will save the record in the Accounts database?

A) TblAccountsTableAdapter.Update(AccountsDataSet.tblAccounts)
B) TblAccountsTableAdapter.Save(AccountsDataSet.tblAccounts)
C) TblAccountsTableAdapter.Store(AccountsDataSet.tblAccounts)
D) TblAccountsBindingSource.Update(AccountsDataSet.tblAccounts)
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
11
Because it is possible for an error to occur when saving data to a database,it's a good programming practice to place the Update method within the ____ block of a Try…Catch statement.

A) Try
B) Catch
C) Assert
D) Fail
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
12
____ is a set of statements that allows you to access and manipulate the data stored in many database management systems on computers of all sizes,from large mainframes to small microcomputers.

A) TQL
B) LINQ
C) C#
D) SQL
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
13
A Try…Catch statement ends with ____.

A) End
B) End Try…Catch
C) End Catch
D) End Try
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
14
Which of the following locates the record whose PartNum field contains KL542,and then assigns the record to the row variable? Which of the following locates the record whose PartNum field contains KL542,and then assigns the record to the row variable?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
15
The default order of the ORDER BY clause is descending.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
16
You save a query that contains the SELECT statement by associating the query with one or more methods.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
17
Which of the following statements will delete the record associated with a DataRow variable named getRow? Which of the following statements will delete the record associated with a DataRow variable named getRow?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
18
If you want the records in a dataset to appear in a particular order when the application is started,you enter the Sort method in the form's ____.

A) Start event procedure
B) Load event procedure
C) Refresh event procedure
D) Click event procedure
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
19
For the changes made to a dataset to be permanent,you need to save the changes to the database associated with the dataset.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
20
In order for an application to use a query during run time,you will need to save the query and then invoke it from code.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following SELECT statements will select the ProdNum field from the tblProducts table,and then sort the records in descending order by the Price field? Which of the following SELECT statements will select the ProdNum field from the tblProducts table,and then sort the records in descending order by the Price field?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
22
The wildcard character is the ____.

A) %
B) &
C) *
D) @
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
23
Click ____ on the shortcut menu to start the TableAdapter Query Configuration Wizard.

A) Add Configuration
B) Add Query
C) Add Link
D) Add TableAdapter
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
24
The ____ clause is used to arrange the records in either ascending (the default)or descending order by one or more fields.

A) GROUP BY
B) WHERE
C) ORDER BY
D) JOIN
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
25
The tblTruck table has two text fields named Make and Model,and one numeric field named Year.Which of the following statements adds the record 2013 Ford F150 to the table? The tblTruck table has two text fields named Make and Model,and one numeric field named Year.Which of the following statements adds the record 2013 Ford F150 to the table?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
26
The file that contains information about the tables,fields,records,and properties included in the dataset has an ____ extension.

A) .xst
B) .xsq
C) .xsd
D) .xsl
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following is not true regarding the Query Builder?

A) The table and its related fields are displayed in the Diagram pane.
B) You cannot view the results of the query in the Query Builder once it is executed.
C) You can manually type the SELECT statement instead of using the Query Builder.
D) You must click the Execute Query button for the query to run.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
28
You can use the ____ associated with a query to invoke the query during run time.

A) properties
B) methods
C) objects
D) values
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
29
The FillByMake method is associated with a parameter query.Which of the following statements invokes the method and passes the contents of the txtMake control's Text property? The FillByMake method is associated with a parameter query.Which of the following statements invokes the method and passes the contents of the txtMake control's Text property?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
30
When you don't know the specific value to include in the criteria,you use a ____.

A) limited query
B) tagged query
C) structured query
D) parameter query
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
31
Which of the following statements selects the Title and ProductionCo fields from records whose title begins with the word "The" followed by a space and zero or more characters,and then sorts the records in descending order by the ProductionCo field? Which of the following statements selects the Title and ProductionCo fields from records whose title begins with the word The followed by a space and zero or more characters,and then sorts the records in descending order by the ProductionCo field?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
32
The tblStudent table contains nine fields,one of which is the StudentID field.A user can type in any StudentID to select a particular student.The user provides 124541 as the StudentID to select.Which of the following statements deletes the student record specified by the user? The tblStudent table contains nine fields,one of which is the StudentID field.A user can type in any StudentID to select a particular student.The user provides 124541 as the StudentID to select.Which of the following statements deletes the student record specified by the user?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
33
An Insert query uses the ____ statement to add a record to a database.

A) INSERT
B) ADD
C) UPDATE
D) DELETE
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
34
The .xsd file is called the dataset's ____ file.

A) schema
B) layout
C) format
D) standard
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
35
The parameter marker is a(n)____.

A) ?
B) *
C) &
D) %
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
36
A ____ is a query that uses the parameter marker in place of the criteria's value.

A) structured query
B) parameter query
C) limited query
D) replaceable query
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
37
The ____ provides an easy way of associating the query with one or more methods.

A) TableAdapter Configuration Wizard
B) TableAdapter Modification Wizard
C) TableAdapter Dataset Configuration Wizard
D) TableAdapter Query Configuration Wizard
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
38
A Delete query uses the ____ statement to delete a record from a database.

A) UPDATE
B) SELECT
C) INSERT
D) DELETE
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
39
Which of the following SELECT statements will select the ItemNum and ItemDesc fields from the tblItems table?

A) SELECT ItemNum OR ItemDesc FROM tblItems
B) SELECT ItemNum AND ItemDesc FROM tblItems
C) SELECT ItemNum,ItemDesc IN tblItems
D) SELECT ItemNum,ItemDesc FROM tblItems
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
40
You must first ____ to begin creating a SQL query.

A) start the TableAdapter Query Configuration Wizard
B) right-click the CollarsDataSet.xsd file,then click Open to open the DataSet Designer window
C) choose a query type
D) specify a SQL SELECT statement
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
41
Three records were added to the ContractsDataSet.Write the statement to save the records in the Contracts database.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
42
What is SQL and how is it used?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
43
An application using the dataset should allow a user to type in a price to use to query the dataset.Which of the following clauses would allow a user to select the records for collars with a price of 15 or more?

A) WHERE Price >= 15
B) WHERE Price Like 15
C) WHERE Price >= ?
D) WHERE Price < ?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
44
Write a SQL SELECT statement that selects all of the fields and records in the table.Sort the records in ascending order by the MemberType field.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
45
Write a SQL SELECT statement that selects the MemberID,LastName,JoinDate,and MemberType fields from all of the records.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
46
What is a parameter query and how is it used?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
47
Write a SQL SELECT statement that allows the user to select the members with a fee greater than or equal to the fee amount provided by the user.The query should select the MemberID,LastName,FirstName,and Fee fields.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
48
Write a SQL SELECT statement that selects the MemberID,LastName,and FirstName fields for all family members.Sort the records in descending order by the JoinDate field.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
49
Write the statement to find the record of a contract with the last name Green and assign the record to a row variable that you declare.Then write the statement to delete that record from the database.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
50
Write a SQL SELECT statement that selects only the records for the Senior members.Select all of the fields.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
51
Write a SQL SELECT statement that selects the MemberID,LastName,and FirstName fields for members having a last name that begins with the letter J.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
52
Write a SQL SELECT statement that allows the user to provide a specific MemberID.The query should select all fields.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
53
Write the statement to add a new record to the dataset.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
54
Write a SQL SELECT statement that inserts the following record into the tblMembers table:
MemberID - 25631
Name - Jane Doe
Date Joined - 2012
Fee - 65
Membership Type - Adult
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
55
Write the statement to sort the records in alphabetic order by last name.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
56
An application using the dataset allows the user to provide an ItemNum to select a record to delete from the dataset.Which function must also be used in the code for the Delete button on the form to work properly?

A) INSERT
B) InsertRecordQuery
C) DELETE
D) DeleteRecordQuery
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
57
Write a SQL SELECT statement that deletes member 42315 from the tblMembers table.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
58
What method could be used to invoke the previous query during run time?

A) FillByPrice
B) SELECT
C) WHERE
D) Fill
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 58 flashcards in this deck.