Microsoft MTA Database Fundamentals 98-364 Flashcards

1
Q

The terms “bitmap,” “b-tree,” and “hash” refer to which type of database structure? A. View B. Function C. Index D. Stored procedure E. Trigger

A

C. Index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

One reason to add an index is to: A. Decrease storage space. B. Increase database security. C. Improve performance of select statements. D. Improve performance of insert statements.

A

C. Improve performance of select statements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which key uniquely identifies a row in a table? A. foreign B. primary C. local D. superkey

A

B. primary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

At 3:00 P.M. (1500 hours), you create a backup of your database. At 4:00 P.M. (1600 hours), you create a table named Customer and import data into the table. At 5:00 P.M. (1700 hours), your server fails. You run a script to apply only the 3:00 P.M. backup to your database. What is the result of the script? A. The Customer table no longer exists. B. The Customer table is unaffected. C. The Customer table exists but has no data. D. The script fails.

A

A. The Customer table no longer exists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In which situation do you need to perform a restore on a database? A. when data becomes corrupted in the database B. when you need to roll back a transaction C. when you encounter an error in your application D. when data needs to be deleted from the database

A

A. when data becomes corrupted in the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which command should you use to give a user permission to read the data in a table? A. ALLOW SELECT B. LET READ C. PERMIT READ D. GRANT SELECT

A

D. GRANT SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You need to enable a new employee to authenticate to your database. Which command should you use? A. ALLOW USER B. CREATE USER C. ADD USER D. INSERT USER E. ALTER USER

A

B. CREATE USER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which keyword can be used in a create table statement? A. ORDER BY B. DISTINCT C. GROUP BY D. UNIQUE

A

D. UNIQUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You need to store product quantities, and you want to minimize the amount of storage space that is used. Which data type should you use? A. INTEGER B. DOUBLE C. COUNT D. FLOAT

A

A. INTEGER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You need to store product names that vary from three to 30 characters. You also need to minimize the amount of storage space that is used. Which data type should you use? A. VARCHAR (3, 30) B. CHAR (3, 30) C. VARCHAR (30) D. CHAR (30)

A

C. VARCHAR (30)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

One reason to create a stored procedure is to: A. Improve performance. B. Minimize storage space. C. Bypass case sensitivity requirements. D. Give the user control of the query logic.

A

A. Improve performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which permission does a user need in order to run a stored procedure? A. EXECUTE B. ALLOW C. CALL D. RUN

A

A. EXECUTE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You have a table named Product. You create a view that includes all the products from the Product table that are in the Furniture category. You execute a statement on the Product table that deletes all the products in the Furniture category. After you execute the statement, the result set of the view is: A. Empty B. Deleted C. Unchanged D. Archived

A

Answer : A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In SQL, an insert statement is used to add a: A. User to a database. B. Row of data to a table. C. Table to a database. D. Column to a table definition.

A

B. Row of data to a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You have two tables. Each table has three rows. How many rows will be included in the Cartesian product of these two tables? A. 0 B. 3 C. 6 D. 9

A

Answer : D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You are writing an SQL statement to retrieve rows from a table. Which data manipulation language (DML) command should you use? A. READ B. SELECT C. OUTPUT D. GET

A

B. SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which constraint ensures a unique value in the ID column for each customer? A. DISTINCT B. FOREIGN KEY C. SEQUENTIAL D. PRIMARY KEY

A

D. PRIMARY KEY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The component that holds information for a single entry in a table is called a: A. Data type B. Row C. Column D. View

A

Answer : B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

You execute the following statement: SELECT EmployeeID, FirstName, DepartmentName FROM Employee, Department - This type of operation is called a/an: A. Intersection B. Outer join C. Equi-join D. Cartesian product

A

D. Cartesian product

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which command should you use to add a column to an existing table? A. MODIFY B. ALTER C. UPDATE D. INSERT E. CHANGE

A

B. ALTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

You are writing a select statement to find every product whose name contains a specific character. Which keyword should you use in your where clause? A. FIND B. BETWEEN C. INCLUDES D. LIKE

A

D. LIKE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A database contains two tables named Customer and Order. You execute the following statement: DELETE FROM Order - WHERE CustomerID = 209 - What is the result? A. The first order for CustomerID 209 is deleted from the Order table. B. All orders for CustomerID 209 are deleted from the Order table, and CustomerID 209 is deleted from the Customer table. C. All orders for CustomerID 209 are deleted from the Order table. D. CustomerID 209 is deleted from the Customer table.

A

C. All orders for CustomerID 209 are deleted from the Order table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

You have a table that contains information about all students in your school. Which SQL keyword should you use to change a student’s first name in the table? A. UPDATE B. CHANGE C. SELECT D. INSERT

A

A. UPDATE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which keyword would you use in a select statement to return rows that meet a specific condition? A. WHERE B. UNION C. ORDER BY D. FROM

A

A. WHERE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which command should you use to remove a table from a database? A. REMOVE TABLE B. UPDATE TABLE C. DROP TABLE D. DELETE TABLE

A

C. DROP TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

You need to store the contact information for each student in your school database. You should store each student’s information in a: A. Stored procedure B. Function C. Row D. Variable

A

C. Row

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Which category of SQL statements is used to add, remove, and modify database structures? A. Data access language (DAL) B. Data manipulation language (DML) C. Data control language (DCL) D. Data definition language (DDL)

A

D. Data definition language (DDL)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

You have a Customer table and an Order table. You join the Customer table with the Order table by using the CustomerID column. The results include: All customers and their orders - -> Customers who have no orders Which type of join do these results represent? A. Complete join B. Partial join C. Inner join D. Outer join

A

D. Outer join

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Data in a database is stored in: A. Tables B. Queries C. Data types D. Stored procedures

A

A. Tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

You have a table named Student that contains 100 rows. Some of the rows have a NULL value in the FirstName column. You execute the following statement: DELETE FROM Student - What is the result? A. All rows in the table will be deleted. B. All rows containing a NULL value in the FirstName column will be deleted. C. You will receive an error message. D. All rows and the table definition will be deleted.

A

Answer : A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

You need to establish a set of permissions that you can routinely assign to new users. What should you create? A. Resource B. Group C. List D. Role

A

D. Role

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Which database term is used to describe the process of applying a backup to a damaged or corrupt database? A. Recover B. Restore C. Commit D. Attach

A

B. Restore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Denormalization is performed in order to: A. Reduce redundancy. B. Eliminate repeating groups. C. Create smaller tables. D. Improve query performance.

A

D. Improve query performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

You have a table named Product that contains one million rows. You need to search for product information in the Product table by using the product’s unique ID. What will make this type of search more efficient? A. A cursor B. A subquery C. A trigger D. An index

A

D. An index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Which two keys establish a relationship between two tables? (Choose two.) A. candidate B. foreign C. superkey D. local E. primary

A

Answer : B, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

One difference between a function and a stored procedure is that a function: A. Must be called from a trigger. B. Must return a value. C. Cannot contain a transaction. D. Cannot accept parameters.

A

B. Must return a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Which keyword must be included in a create view statement? A. WHERE B. ORDER BY C. UPDATE D. SELECT

A

Answer : D

38
Q

You need to remove a view named EmployeeView from your database. Which statement should you use? A. DELETE VIEW EmployeeView B. DELETE EmployeeView C. DROP EmployeeView D. DROP VIEW EmployeeView

A

D. DROP VIEW EmployeeView

39
Q

A named group of SQL statements that can be executed in a database is called a: A. Subroutine B. Formula C. Stored procedure D. Method

A

C. Stored procedure

40
Q

A view can be used to: A. Save an extra copy of data stored in a separate table. B. Limit access to specific rows or columns of data in a table. C. Ensure referential integrity. D. Save historical data before deleting it from the base table.

A

B. Limit access to specific rows or columns of data in a table.

41
Q

On which database structure does an update statement operate? A. Table B. User C. Trigger D. Role

A

A. Table

42
Q

You delete rows in a table named Order. The corresponding rows in the OrderItem table are automatically deleted. This process is an example of a/an: A. Inherited delete B. Cascade delete C. Functional delete D. Waterfall delete E. Domino delete

A

B. Cascade delete

43
Q

You have a table named Employee that includes four columns. You execute the following statement: SELECT * FROM Employee - Which columns are returned? A. all columns B. only the last column C. only the first column D. only the first and last columns

A

A. all columns

44
Q

Which two elements are required to define a column? (Choose two.) A. A name B. A key C. An index D. A data type

A

Answer : A, D

45
Q

What defines the amount of storage space that is allocated to a value in a column? A. format B. key C. data type D. validator

A

C. data type

46
Q

You are creating a table to store customer data. The AccountNumber column uses values that always consist of one letter and four digits. Which data type should you use for the AccountNumber column? A. CHAR B. BYTE C. DOUBLE D. SMALLINT

A

A. CHAR

47
Q

What is one difference between an update statement and a delete statement? A. An update statement can change only one row. B. A delete statement cannot use a where clause. C. An update statement does not remove rows from a table. D. A delete statement works only within a stored procedure.

A

C. An update statement does not remove rows from a table.

48
Q

You have a Department table and an Employee table in your database. You need to ensure that an employee can be assigned to only an existing department. What should you apply to the Employee table? A. A primary key B. An index C. A foreign key D. A unique constraint E. A data type

A

D. A unique constraint

49
Q

You need to store the first name, last name, and student ID for 100 students. This information will be stored in a table as: A. 100 items and three cells. B. 100 rows and three columns. C. three rows and 100 columns. D. three items and 100 cells.

A

B. 100 rows and three columns.

50
Q

What are three valid data manipulation language (DML) commands? (Choose three.) A. INSERT B. COMMIT C. DELETE D. OUTPUT E. UPDATE

A

Answer : ACE Explanation: Data manipulation languages have their functional capability organized by the initial word in a statement, which is almost always a verb. In the case of SQL, these verbs are: -> SELECT … FROM … WHERE … -> INSERT INTO … VALUES … -> UPDATE … SET … WHERE … -> DELETE FROM … WHERE …

51
Q

You assign User1 a set of permissions that include the WITH GRANT OPTION. The WITH GRANT OPTION enables User1 to: A. request a log of permission use. B. delegate permissions to other users. C. create new database users. D. view other users’ permissions.

A

C. create new database users.

52
Q

Which type of index changes the order in which the data is stored in a table? A. non-sequential B. sequential C. non-clustered D. clustered

A

A. non-sequential

53
Q

Which statement should you use to remove a foreign key? A. ALTER TABLE B. DELETE TABLE C. DELETE FOREIGN KEY D. ALTER FOREIGN KEY

A

A. ALTER TABLE

54
Q

First normal form requires that a database excludes: A. Foreign keys B. Composite keys C. Duplicate rows D. Repeating groups

A

D. Repeating groups

55
Q

You execute a statement inside a transaction to delete 100 rows from a table. The transaction fails after only 40 rows are deleted. What is the result in the database? A. The table will be corrupted. B. Forty (40) rows will be deleted from the table. C. The transaction will restart. D. No rows will be deleted from the table.

A

D. No rows will be deleted from the table.

56
Q

You have a table that contains product IDs and product names. You need to write an UPDATE statement to change the name of a specific product to glass. What should you include in the update statement? A. SET ProduetName = ‘glass’ B. LET ProduetName = ‘glass’ C. EXEC ProduetName = ‘glass’ D. ASSIGN ProduetName = ‘glass’

A

A. SET ProduetName = ‘glass’

57
Q

On which database structure does an insert statement operate? A. Role B. Trigger C. User D. Stored procedure E. Table

A

E. Table

58
Q

You have a table of products with fields for ProductID, Name, and Price. You need to write an UPDATE statement that sets the value in the InStock field to Yes for a specific ProductID. Which clause should you use in your update statement? A. THAT B. WHERE C. GROUP BY D. HAVING

A

B. WHERE

59
Q

You need to combine the results of two queries into a single result that contains all of the rows from both queries. Which Structured Query Language (SQL) statement should you use? A. TRUNCATE B. JOIN C. EXCEPT D. UNION

A

D. UNION

60
Q

You accept an IT internship at a local charity. The charity wants you to help them with compliance and auditing requirements. You need to ensure that a column or combination of columns uniquely identifies each row of a table. Which constraint should you define? A. Primary key B. Secondary key C. Foreign key D. Default key

A

C. Foreign key

61
Q

While attending college, you accept an IT internship at a local charity. The charity needs to report on data that is related and exists in two tables. You need to establish a relationship between the data that is in the two tables. Which constraint should you define? A. Foreign key B. Index key C. Link key D. Default key

A

B. Index key

62
Q

You have two tables named Salesperson and Sales. You need to ensure that each record in the Sales table has a valid associated salesperson record in the Salesperson table. Which database object should you add to the Sales table? A. Nonclustered index B. Primary key C. Foreign key D. Clustered index

A

B. Primary key

63
Q

You need to rename a column in a database table. Which data definition language (DDL) statement should you use? A. ALTER B. INSERT C. CREATE D. UPDATE

A

A. ALTER

64
Q
A

B

65
Q
A

D

66
Q
A

D

67
Q
A

A

68
Q
A

B

69
Q
A

D

70
Q
A

A

71
Q
A

D

72
Q
A

A

73
Q
A

D

74
Q
A

C

75
Q
A

C

76
Q
A
77
Q
A
78
Q
A

A

79
Q
A

A

80
Q
A

A

81
Q
A
82
Q
A
83
Q
A
84
Q
A
85
Q
A
86
Q
A

D

87
Q
A

D

88
Q
A

A

89
Q
A

A

90
Q
A

B

91
Q
A

D

92
Q
A

D