You are designing a document repository application that will contain over 100,000 documents. The
repository will have the following specifications:
Documents can be associated to 30 different properties
Most documents will have less than 10 properties defined
You need to design a single table for the application. The solution must use the minimum amount of
storage space.
What should you include in the design?
You are a database developer on an instance of SQL Server 2008. Your Sales database contains sales
and marketing information for your company. You receive an XML file in the following format that contains
leads from sales representatives in the field:
You load the XML into an xml variable named @x and execute the following Transact-SQL:
EXEC sp_xml_preparedocument @idoc OUTPUT, @x
SELECT * INTO dbo.SalesLeads
FROM OPENXML(@idoc, 'LeadData/Salesperson', 1)
WITH (ID int, Leads xml 'DailyLeads');
EXEC sp_xml_removedocument @idoc;
What will be the result?
You are a database administrator on an instance of SQL Server. You have users in many geographical
regions.
You need to provide data access to all of your regional offices. Each regional office updates its own regional
data. You want each regional office to be responsible for backing up and maintaining its own data. Each
regional office has access to only its data. However, at the company headquarters, you need to be able to
access data from all regions. Which action should you take?
You are designing a database table for a content management system. Users will store images and videos
in the database.You need to ensure that the database can store files that are 20 MB or less. The solution
must minimize the amount of space required to store the data.
Which data type should you use?
You are a database developer on an instance of SQL Server 2008. Your Prod database contains many
parameterized queries, and you have set the PARAMETERIZATION option to FORCED for the Prod
database.
You have several stored procedures that execute a specific query. You want to use simple parameterization
for the query, instead of forced parameterization.
Which action should you take?
You have a stored procedure that uses a cursor. The stored procedure updates several related tables. You
discover that the stored procedure runs slowly and uses a significant amount of resources on the database
server.
You need to recommend changes to the stored procedure to meet the following requirements:
Minimize execution time
Minimize development effort
Minimize server resource requirements
What should you recommend?
You are a database developer. You create a database by using SQL Server 2008 in an enterprise
environment.
The database contains two stored procedures named ModifySales and RetrieveSalesTrend:
The ModifySales stored procedure uses a transaction that updates a table named SalesOrders.
The RetrieveSalesTrend stored procedure retrieves and aggregates data from the SalesOrders table for
a sales trend analysis report.
Both stored procedures are executed frequently each day.
Users report a considerable wait time while they run the sales trend analysis report.
You need to ensure that sales trend analysis report runs as quickly as possible.
What should you do?
You have a table that contains 5 million rows. The table has a clustered index. You plan to add an
additional index on a column that contains 80 percent null values. The column is used extensively in
WHERE clauses.
You need to implement an index strategy for the column. The solution must minimize the amount of storage
space required for the index.
Which type of index should you use?
You manage SQL Server 2008 instances for a large retail organization. You want to design a reporting
solution to allow users read-only access to data in databases on different instances.
Users generating reports only need read-only access. Users in different locations have different uses for
the data. Some users perform complex reporting that is resource-intensive.
You want to provide reporting capability with optimum responsiveness for all users, while minimizing
administration effort and performance impact to production systems using the data.
Which action should you take?
You maintain a database named Sales on a SQL Server 2008 instance named SQL1. This SQL server is
located at your company's main office in
Chicago. The Sales database contains sales and inventory-related data for your company.
Your company recently acquired another company that maintains its sales and inventory data in an Oracle
database. You want employees of the
acquired company to continue to use Oracle database tools to maintain and access sales and inventory-
related data.
On a weekly basis, you need to produce historical sales reports that query and aggregate data from both
databases. The following requirements
must also be met:
Authorized users at the main office must be able to run frequent queries against both databases to
determine available inventory quantities.
No employees of the recently acquired company should be able to access data stored at the main office.
Which action should you take?