1.
You have a table named Table1. A sample of the data in Table1 is shown in the following table. There is a defined nonclustered index on the SalesOrderNumber column. The following query executes against the table: WHERE 'SO3' = LEFT(SalesOrderNumber,3) You need to minimize the amount page I/O that is generated when the query runs. What should you do?
2.
You have a table that has an XML column named XMLOrderHeader. You need to design a stored procedure that extracts the order header values and stores them in a table. The solution must meet the following requirements: Extract many values Minimize the development effort What should the solution include?
3.
Users frequently update millions of rows in a table at a time. Users report that it takes a long time to update the rows. You need to recommend a solution to reduce the time it takes to update the rows. The solution must be developed in the minimum amount of time. What should you do?
4.
You have a database that contains two tables. Both the XACT_ABORT database option and the IMPLICIT_TRANSACTIONS database option are set to OFF. You need to update both tables. If an update fails on either table, neither table should be updated. What should you do?
5.
You are a database developer on an instance of SQL Server 2008. You have a WorkOrder table and a WorkOrderDetail table. The WorkOrder table contains one row for each work order, and the WorkOrderDetail table contains line items of work performed for each work order. You want to create a FOREIGN KEY constraint to relate the two tables. You want to ensure that if a work order identifier in the WorkOrder table is updated, that the corresponding rows in the WorkOrderDetail table are also updated to maintain referential integrity. What should you do?
6.
You are a database developer on an instance of SQL Server 2008. You are creating a SalaryAudit table to record custom audit information about salary changes for employees. You have two payroll clerks that are allowed to process salary updates for the twenty departments within your company. At regular intervals, the clerks process salary updates for a large number of employees. The table will contain the following columns: This audit information will be rarely used, but internal auditors will perform ad hoc queries on the table during company-wide audits that occur every three years. After each audit is complete and the finalized audit reports have been filed, the SalaryAudit table will be backed up, and all rows for the audit period will be removed from the table. You want to minimize storage requirements for the table as much as possible, but support the other requirements with minimal effort. Which action should you take?
7.
You are a database developer on an instance of SQL Server 2008. Weekly, your finance department receives XML from several branch offices. The data in these XML files must meet certain validation requirements. You currently have an XSD file that you want to use to validate the XML documents. What should you do?
8.
You use SQL Server 2008 to design a database that will hold incoming XML responses for an EDI system. You have the following requirements: The data is accessible to heterogeneous platforms. The database stores various types of reports from multiple sources. The solution allows search by keywords. The database stores large amounts of data. The database is scalable. You need to design the database to meet the given requirements. What should you do?
9.
You are a database developer on an instance of SQL Server 2008. Your Prod database contains tables that contain purchasing-related data. The database contains the following tables: You need to create queries against the tables that use dynamic SQL. Your IT management has recently implemented security policies mandating that all Transact-SQL code must minimize the likelihood of SQL injection attacks. What should you do to minimize the likelihood of SQL injection attacks?
10.
You are a database developer. You plan to design a database solution by using SQL Server 2008. The database will contain a table that will store customer data as XML data. The data supports an application that cannot be altered. You plan to prevent the following types of errors in the XML data. NULL values in the Customer Name field Non-numeric values in the Customer Telephone field. Invalid values in the Gender field You need to implement the plan without modifying the application. What should you do?