Microsoft 70-464 - Developing Microsoft SQL Server 2012/2014 Databases Exam

Question #6 (Topic: Testlet 1)
Scenario 1
Application Information
Your company receives invoices in XML format from customers. Currently, the invoices are stored as files and processed by a desktop application. The application
has several performance and security issues. The application is being migrated to a SQL Server-based solution. A schema named InvoiceSchema has been
created for the invoices xml.
The data in the invoices is sometimes incomplete. The incomplete data must be stored and processed as-is. Users cannot filter the data provided through views.
You are designing a SQL Server database named DB1 that will be used to receive, process, and securely store the invoice data. A third-party Microsoft .NET
Framework component will be purchased to perform tax calculations. The third-party tax component will be provided as a DLL file named Treytax.dll and a source
code file named Amortize.cs. The component will expose a class named TreyResearch and a method named Amortize(). The files are located in c:\temp\.
The following graphic shows the planned tables:
[Microsoft-70-464-1.0/xmlfile-2_1.jpg]
You have a sequence named Accounting.InvoiceID_Seq.
You plan to create two certificates named CERT1 and CERT2. You will create CERT1 in master. You will create CERT2 in DB1.
You have a legacy application that requires the ability to generate dynamic T-SQL statements against DB1. A sample of the queries generated by the legacy
application appears in Legacy.sql.
Application Requirements
The planned database has the following requirements:
All tables must be disk-based
All stored procedures must be signed.
The original XML invoices must be stored in the database.
An XML schema must be used to validate the invoice data.
Dynamic T-SQL statements must be converted to stored procedures.
Access to the .NET Framework tax components must be available to T-SQL objects.
Columns must be defined by using data types that minimize the amount of space used by each table.
Invoices stored in the InvoiceStatus table must refer to an invoice by the same identifier used by the Invoice table.
To protect against the theft of backup disks, invoice data must be protected by using the highest level of encryption.
The solution must provide a table-valued function that provides users with the ability to filter invoices by customer.
Indexes must be optimized periodically based on their fragmentation by using the minimum amount of administrative effort.
Usp_InsertInvoices.sql
[Microsoft-70-464-1.0/xmlfile-4_1.png]
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the customer's country. The remaining eight digits are the customer's account
number.
The following is a sample of a customer invoice in XML format:
[Microsoft-70-464-1.0/xmlfile-5_1.png]
InvoicesByCustomer.sql
[Microsoft-70-464-1.0/xmlfile-5_2.png]
Legacy.sql
[Microsoft-70-464-1.0/xmlfile-5_3.png]
CountryFromID.sql
[Microsoft-70-464-1.0/xmlfile-6_1.png]
IndexManagement.sql
[Microsoft-70-464-1.0/xmlfile-7_1.png]

You need to modify the function in CountryFromID.sql to ensure that the country name is returned instead of the country ID.
Which line of code should you modify in CountryFromID.sql?
A. 04 B. 05 C. 06 D. 19
Answer: D
Question #7 (Topic: Testlet 1)
Scenario 1
Application Information
Your company receives invoices in XML format from customers. Currently, the invoices are stored as files and processed by a desktop application. The application
has several performance and security issues. The application is being migrated to a SQL Server-based solution. A schema named InvoiceSchema has been
created for the invoices xml.
The data in the invoices is sometimes incomplete. The incomplete data must be stored and processed as-is. Users cannot filter the data provided through views.
You are designing a SQL Server database named DB1 that will be used to receive, process, and securely store the invoice data. A third-party Microsoft .NET
Framework component will be purchased to perform tax calculations. The third-party tax component will be provided as a DLL file named Treytax.dll and a source
code file named Amortize.cs. The component will expose a class named TreyResearch and a method named Amortize(). The files are located in c:\temp\.
The following graphic shows the planned tables:
[Microsoft-70-464-1.0/xmlfile-2_1.jpg]
You have a sequence named Accounting.InvoiceID_Seq.
You plan to create two certificates named CERT1 and CERT2. You will create CERT1 in master. You will create CERT2 in DB1.
You have a legacy application that requires the ability to generate dynamic T-SQL statements against DB1. A sample of the queries generated by the legacy
application appears in Legacy.sql.
Application Requirements
The planned database has the following requirements:
All tables must be disk-based
All stored procedures must be signed.
The original XML invoices must be stored in the database.
An XML schema must be used to validate the invoice data.
Dynamic T-SQL statements must be converted to stored procedures.
Access to the .NET Framework tax components must be available to T-SQL objects.
Columns must be defined by using data types that minimize the amount of space used by each table.
Invoices stored in the InvoiceStatus table must refer to an invoice by the same identifier used by the Invoice table.
To protect against the theft of backup disks, invoice data must be protected by using the highest level of encryption.
The solution must provide a table-valued function that provides users with the ability to filter invoices by customer.
Indexes must be optimized periodically based on their fragmentation by using the minimum amount of administrative effort.
Usp_InsertInvoices.sql
[Microsoft-70-464-1.0/xmlfile-4_1.png]
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the customer's country. The remaining eight digits are the customer's account
number.
The following is a sample of a customer invoice in XML format:
[Microsoft-70-464-1.0/xmlfile-5_1.png]
InvoicesByCustomer.sql
[Microsoft-70-464-1.0/xmlfile-5_2.png]
Legacy.sql
[Microsoft-70-464-1.0/xmlfile-5_3.png]
CountryFromID.sql
[Microsoft-70-464-1.0/xmlfile-6_1.png]
IndexManagement.sql
[Microsoft-70-464-1.0/xmlfile-7_1.png]

You execute IndexManagement.sql and you receive the following error message:
"Msg 512, Level 16, State 1, Line 12
Subquery returned more than 1 value. This is not permitted when the subquery follows =,! =, <, <= ,>, > = or when the subquery is used as an expression."
You need to ensure that IndexManagement.sql executes properly.
Which WHILE statement should you use at line 18?
A. WHILE SUM(@RowNumber) < (SELECT @counter FROM @indextable) B. WHILE @counter < (SELECT COUNT(RowNumber) FROM @indextable) C. WHILE COUNT(@RowNumber) < (SELECT @counter FROM @indextable) D. WHILE @counter < (SELECT SUM(RowNumber) FROM @indextabie)
Answer: B
Question #8 (Topic: Testlet 1)
Scenario 1
Application Information
Your company receives invoices in XML format from customers. Currently, the invoices are stored as files and processed by a desktop application. The application
has several performance and security issues. The application is being migrated to a SQL Server-based solution. A schema named InvoiceSchema has been
created for the invoices xml.
The data in the invoices is sometimes incomplete. The incomplete data must be stored and processed as-is. Users cannot filter the data provided through views.
You are designing a SQL Server database named DB1 that will be used to receive, process, and securely store the invoice data. A third-party Microsoft .NET
Framework component will be purchased to perform tax calculations. The third-party tax component will be provided as a DLL file named Treytax.dll and a source
code file named Amortize.cs. The component will expose a class named TreyResearch and a method named Amortize(). The files are located in c:\temp\.
The following graphic shows the planned tables:
[Microsoft-70-464-1.0/xmlfile-2_1.jpg]
You have a sequence named Accounting.InvoiceID_Seq.
You plan to create two certificates named CERT1 and CERT2. You will create CERT1 in master. You will create CERT2 in DB1.
You have a legacy application that requires the ability to generate dynamic T-SQL statements against DB1. A sample of the queries generated by the legacy
application appears in Legacy.sql.
Application Requirements
The planned database has the following requirements:
All tables must be disk-based
All stored procedures must be signed.
The original XML invoices must be stored in the database.
An XML schema must be used to validate the invoice data.
Dynamic T-SQL statements must be converted to stored procedures.
Access to the .NET Framework tax components must be available to T-SQL objects.
Columns must be defined by using data types that minimize the amount of space used by each table.
Invoices stored in the InvoiceStatus table must refer to an invoice by the same identifier used by the Invoice table.
To protect against the theft of backup disks, invoice data must be protected by using the highest level of encryption.
The solution must provide a table-valued function that provides users with the ability to filter invoices by customer.
Indexes must be optimized periodically based on their fragmentation by using the minimum amount of administrative effort.
Usp_InsertInvoices.sql
[Microsoft-70-464-1.0/xmlfile-4_1.png]
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the customer's country. The remaining eight digits are the customer's account
number.
The following is a sample of a customer invoice in XML format:
[Microsoft-70-464-1.0/xmlfile-5_1.png]
InvoicesByCustomer.sql
[Microsoft-70-464-1.0/xmlfile-5_2.png]
Legacy.sql
[Microsoft-70-464-1.0/xmlfile-5_3.png]
CountryFromID.sql
[Microsoft-70-464-1.0/xmlfile-6_1.png]
IndexManagement.sql
[Microsoft-70-464-1.0/xmlfile-7_1.png]

You need to convert the functionality of Legacy.sql to use a stored procedure.
Which code segment should the stored procedure contain?
[Microsoft-70-464-1.0/xmlfile-14_1.jpg]
A. Option A B. Option B C. Option C D. Option D
Answer: D
Question #9 (Topic: Testlet 1)
Scenario 1
Application Information
Your company receives invoices in XML format from customers. Currently, the invoices are stored as files and processed by a desktop application. The application
has several performance and security issues. The application is being migrated to a SQL Server-based solution. A schema named InvoiceSchema has been
created for the invoices xml.
The data in the invoices is sometimes incomplete. The incomplete data must be stored and processed as-is. Users cannot filter the data provided through views.
You are designing a SQL Server database named DB1 that will be used to receive, process, and securely store the invoice data. A third-party Microsoft .NET
Framework component will be purchased to perform tax calculations. The third-party tax component will be provided as a DLL file named Treytax.dll and a source
code file named Amortize.cs. The component will expose a class named TreyResearch and a method named Amortize(). The files are located in c:\temp\.
The following graphic shows the planned tables:
[Microsoft-70-464-1.0/xmlfile-2_1.jpg]
You have a sequence named Accounting.InvoiceID_Seq.
You plan to create two certificates named CERT1 and CERT2. You will create CERT1 in master. You will create CERT2 in DB1.
You have a legacy application that requires the ability to generate dynamic T-SQL statements against DB1. A sample of the queries generated by the legacy
application appears in Legacy.sql.
Application Requirements
The planned database has the following requirements:
All tables must be disk-based
All stored procedures must be signed.
The original XML invoices must be stored in the database.
An XML schema must be used to validate the invoice data.
Dynamic T-SQL statements must be converted to stored procedures.
Access to the .NET Framework tax components must be available to T-SQL objects.
Columns must be defined by using data types that minimize the amount of space used by each table.
Invoices stored in the InvoiceStatus table must refer to an invoice by the same identifier used by the Invoice table.
To protect against the theft of backup disks, invoice data must be protected by using the highest level of encryption.
The solution must provide a table-valued function that provides users with the ability to filter invoices by customer.
Indexes must be optimized periodically based on their fragmentation by using the minimum amount of administrative effort.
Usp_InsertInvoices.sql
[Microsoft-70-464-1.0/xmlfile-4_1.png]
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the customer's country. The remaining eight digits are the customer's account
number.
The following is a sample of a customer invoice in XML format:
[Microsoft-70-464-1.0/xmlfile-5_1.png]
InvoicesByCustomer.sql
[Microsoft-70-464-1.0/xmlfile-5_2.png]
Legacy.sql
[Microsoft-70-464-1.0/xmlfile-5_3.png]
CountryFromID.sql
[Microsoft-70-464-1.0/xmlfile-6_1.png]
IndexManagement.sql
[Microsoft-70-464-1.0/xmlfile-7_1.png]

You need to create a function that filters invoices by CustomerID. The SELECT statement for the function is contained in InvoicesByCustomer.sql.
Which code segment should you use to complete the function?
[Microsoft-70-464-1.0/xmlfile-15_1.jpg]
A. Option A B. Option B C. Option C D. Option D
Answer: A
Question #10 (Topic: Testlet 1)
Scenario 1
Application Information
Your company receives invoices in XML format from customers. Currently, the invoices are stored as files and processed by a desktop application. The application
has several performance and security issues. The application is being migrated to a SQL Server-based solution. A schema named InvoiceSchema has been
created for the invoices xml.
The data in the invoices is sometimes incomplete. The incomplete data must be stored and processed as-is. Users cannot filter the data provided through views.
You are designing a SQL Server database named DB1 that will be used to receive, process, and securely store the invoice data. A third-party Microsoft .NET
Framework component will be purchased to perform tax calculations. The third-party tax component will be provided as a DLL file named Treytax.dll and a source
code file named Amortize.cs. The component will expose a class named TreyResearch and a method named Amortize(). The files are located in c:\temp\.
The following graphic shows the planned tables:
[Microsoft-70-464-1.0/xmlfile-2_1.jpg]
You have a sequence named Accounting.InvoiceID_Seq.
You plan to create two certificates named CERT1 and CERT2. You will create CERT1 in master. You will create CERT2 in DB1.
You have a legacy application that requires the ability to generate dynamic T-SQL statements against DB1. A sample of the queries generated by the legacy
application appears in Legacy.sql.
Application Requirements
The planned database has the following requirements:
All tables must be disk-based
All stored procedures must be signed.
The original XML invoices must be stored in the database.
An XML schema must be used to validate the invoice data.
Dynamic T-SQL statements must be converted to stored procedures.
Access to the .NET Framework tax components must be available to T-SQL objects.
Columns must be defined by using data types that minimize the amount of space used by each table.
Invoices stored in the InvoiceStatus table must refer to an invoice by the same identifier used by the Invoice table.
To protect against the theft of backup disks, invoice data must be protected by using the highest level of encryption.
The solution must provide a table-valued function that provides users with the ability to filter invoices by customer.
Indexes must be optimized periodically based on their fragmentation by using the minimum amount of administrative effort.
Usp_InsertInvoices.sql
[Microsoft-70-464-1.0/xmlfile-4_1.png]
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the customer's country. The remaining eight digits are the customer's account
number.
The following is a sample of a customer invoice in XML format:
[Microsoft-70-464-1.0/xmlfile-5_1.png]
InvoicesByCustomer.sql
[Microsoft-70-464-1.0/xmlfile-5_2.png]
Legacy.sql
[Microsoft-70-464-1.0/xmlfile-5_3.png]
CountryFromID.sql
[Microsoft-70-464-1.0/xmlfile-6_1.png]
IndexManagement.sql
[Microsoft-70-464-1.0/xmlfile-7_1.png]

DRAG DROP
You need to build a stored procedure that amortizes the invoice amount. Which code segment should you use to create the stored procedure? To answer, move
the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.
Select and Place:
[Microsoft-70-464-1.0/xmlfile-16_1.png]
Answer: [Microsoft-70-464-1.0/xmlfile-17_1.png]
Download Exam
Page: 2 / 42
Total 209 questions