[Free] Download New Updated (February 2016) Microsoft 70-459 Practice Tests Topic 6, Database Application Scenario

Ensurepass

Topic 6, Database Application Scenario

 

Application Information

You have two servers named SQL1 and SQL2 that have SQL Server 2012 installed.

 

You have an application that isused to schedule and manage conferences.

 

Users report that the application has many errors and is very slow.

 

You are updating the application to resolve the issues.

 

You plan to create a new database on SQL1 to support the application. A junior databaseadministrator has created all the scripts that will be used to create the database. The script that you plan to use to create the tables for the new database is shown in Tables.sql. The script that you plan to use to create the stored procedures for the new database is shown in StoredProcedures.sql. The script that you plan to use to create the indexes for the new database is shown in Indexes.sql. (Line numbers are included for reference only.)

 

A database named DB2 resides on SQL2. DB2 has a table named SpeakerAudit that will audit changes to a table named Speakers.

 

A stored procedure named usp_UpdateSpeakersName will be executed only by other stored procedures. The stored procedures executing usp_UpdateSpeakersName will always handle transactions.

 

A stored procedure named usp_SelectSpeakersByName will be used to retrieve the names of speakers. Usp_SelectSpeakersByName can read uncommitted data.

 

A stored procedure named usp_GetFutureSessions will be used to retrieve sessions that will occur in the future.

&n
bsp;

Procedures.sql

clip_image002

clip_image004

 

Indexes.sql

clip_image006

 

Tables.sql

clip_image008

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 30

You need to provide referential integrity between the Sessions table and Speakers table. Which code segment should you add at line 47 of Tables.sql?

 

clip_image010

 

A.

Option A

B.

Option B

C.

OptionC

D.

Option D

 

Correct Answer: C

Explanation:

References:

http://msdn.microsoft.com/en-us/library/ms189049.aspx

http://msdn.microsoft.com/en-us/library/ms179610.aspx

http://msdn.microsoft.com/en-us/library/ff878370.aspx

 

 

QUESTION 31

You need to add a new column namedConfirmed to the Attendees table. The solution must meet the following requirements:

 

clip_image012Have a default value of false.

clip_image012[1]Minimize the amount of disk space used.

 

Which code block should you use?

 

A.

ALTER TABLE Attendees

ADD Confirmed bit DEFAULT 0;

B.

ALTERTABLE Attendees

ADD Confirmed char(1) DEFAULT ‘0’;

C.

ALTER TABLE Attendees

ADD Confirmed char(1) DEFAULT ‘1’;

D.

ALTER TABLE Attendees

ADD Confirmed bit DEFAULT 1;

 

Correct Answer: A

Explanation:

Reference:

http://msdn.microsoft.com/en-us/library/ms177603.aspx

 

 

QUESTION 32

You are evaluating the table design. You need to recommend a change to Tables.sql that reduces the amount of time it takes for usp_AttendeesReport to execute. What should you add at line 14 of Tables.sql?

 

A.

FullName AS (FirstName + ‘ ‘ + LastName),

B.

FullName nvarchar(100) NOT NULL DEFAULT (dbo.CreateFullName(FirstName, LastName)),

C.

FullName AS (FirstName + ‘ ‘ + LastName) PERSISTED,

D.

FullName nvarchar(100) NOT NULL CONSTRAINT DF_FullName DEFAULT (dbo. CreateFullName (FirstName, LastName)),

 

Correct Answer: C

Explanation:

References:

http://msdn.microsoft.com/en-us/library/ms188300.aspx

http://msdn.microsoft.com/en-us/library/ms191250.aspx

 

 

QUESTION 33

You need to modify usp_SelectSpeakersByName to support server-side paging. The solution must minimize the amount of development effort required. What should you add to usp_SelectSpeakersByName?

 

A.

a table variable

B.

an OFFSET-FETCH clause

C.

the ROWNUMBER keyword

D.

a recursive common table expression

 

Correct Answer: B

Explanation:

References:

http://www.mssqltips.com/sqlservertip/2696/comparing-performance-for-different-sql-server-paging-methods/

http://msdn.microsoft.com/en-us/library/ms188385.aspx

http://msdn.microsoft.com/en-us/library/ms180152.aspx

http://msdn.microsoft.com/en-us/library/ms186243.aspx

http://msdn.microsoft.com/en-us/library/ms186734.aspx

http://www.sqlserver-training.com/how-to-use-offset-fetch-option-in-sql-server-order-by-clause/

http://www.sqlservercentral.com/blogs/juggling_with_sql/2011/11/30/using-offset-and-fetch/

 

 

 

 

 

QUESTION 34

You executeusp_TestSpeakers. You discover that usp_SelectSpeakersByName uses inefficient execution plans. You need to update usp_SelectSpeakersByName to ensure that the most efficient execution plan is used. What should you add at line 30 of Procedures.sql?

 

A.

OPTION (FCRCESCAN)

B.

OPTION (OPTIMIZE FOR UNKNOWN)

C.

OPTION (OPTIMIZE FOR (@LastName = ‘Anderson’))

D.

OPTION (FORCESEEK)

 

Correct Answer: B

Explanation:

References:

http://msdn.microsoft.com/en-us/library/ms181714.aspx

 

Free VCE & PDF File for Microsoft 70-459 Real Exam

Instant Access to Free VCE Files: MCSE|MCSA|MCITP…
Instant Access to Free PDF Files: MCSE|MCSA|MCITP…