Microsoft MTA Database Fundamentals 98-364 Flashcards
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
C. Index
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.
C. Improve performance of select statements.
Which key uniquely identifies a row in a table? A. foreign B. primary C. local D. superkey
B. primary
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. The Customer table no longer exists.
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. when data becomes corrupted in the database
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
D. GRANT SELECT
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
B. CREATE USER
Which keyword can be used in a create table statement? A. ORDER BY B. DISTINCT C. GROUP BY D. UNIQUE
D. UNIQUE
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. INTEGER
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)
C. VARCHAR (30)
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. Improve performance.
Which permission does a user need in order to run a stored procedure? A. EXECUTE B. ALLOW C. CALL D. RUN
A. EXECUTE
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
Answer : A
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.
B. Row of data to a table.
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
Answer : D
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
B. SELECT
Which constraint ensures a unique value in the ID column for each customer? A. DISTINCT B. FOREIGN KEY C. SEQUENTIAL D. PRIMARY KEY
D. PRIMARY KEY
The component that holds information for a single entry in a table is called a: A. Data type B. Row C. Column D. View
Answer : B
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
D. Cartesian product
Which command should you use to add a column to an existing table? A. MODIFY B. ALTER C. UPDATE D. INSERT E. CHANGE
B. ALTER
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
D. LIKE
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.
C. All orders for CustomerID 209 are deleted from the Order table.
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. UPDATE
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. WHERE
Which command should you use to remove a table from a database? A. REMOVE TABLE B. UPDATE TABLE C. DROP TABLE D. DELETE TABLE
C. DROP TABLE
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
C. Row
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)
D. Data definition language (DDL)
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
D. Outer join
Data in a database is stored in: A. Tables B. Queries C. Data types D. Stored procedures
A. Tables
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.
Answer : A
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
D. Role
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
B. Restore
Denormalization is performed in order to: A. Reduce redundancy. B. Eliminate repeating groups. C. Create smaller tables. D. Improve query performance.
D. Improve query performance.
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
D. An index
Which two keys establish a relationship between two tables? (Choose two.) A. candidate B. foreign C. superkey D. local E. primary
Answer : B, E
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.
B. Must return a value.