DP-800: Developing AI-Enabled Database Solutions practice questions, page 4 of 4, with answer review and explanations.
Question 16
Case Study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Existing Environment - Azure Environment - Fabrikam has a single Azure subscription in the East US 2 Azure region. The subscription contains an Azure SQL database named DB1. DB1 contains the following tables: • Patients • Employees • Procedures • Transactions • UsefulPrompts • ProcedureDocuments You store a column master key as a secret in Azure Key Vault. You have an on-premises application named TransactionProcessing that uses a hard-coded username and password in a connection string to access DB1. Problem Statements - Users report that after executing a long-running stored procedure named sp_UpdateProcedureForPatient, updates to the underlying data are sometimes inconsistent. Requirements - Planned Changes - Fabrikam plans to manage all changes to Azure SQL Database objects by using source control in GitHub. Every pull request submitted to production will be validated before it can be merged. Deployments must use the Release configuration. Security Requirements - Fabrikam identifies the following security requirements: • The TransactionProcessing application must use a passwordless connection to DB1. • The Employees table contains two columns named TaxID and Salary that must be encrypted at rest. • Auditors must have a tamper-evident history of transactions with cryptographic proof of changes to the employee data. Database Performance Requirements Records accessed by using sp_UpdateProcedureForPatient must NOT be changed by other transactions while the stored procedure runs. AI Search, Embeddings, and Vector Indexing Fabrikam identifies the following AI-related requirements: • Queries to the ProcedureDocuments table must use Reciprocal Rank Fusion (RRF). • Users must be able to query the data in DB1 by using prompts in Copilot in Microsoft Fabric. • The UsefulPrompts table will store prompts that doctors can use to help diagnose patient illness by connecting to an Azure OpenAI endpoint. Development Requirements - Fabrikam identifies the following development requirements: • Provide the functionality to retrieve all the transactions of a given patient between two dates, showing a running total. • Expose a Data API builder (DAB) configuration file to enable Azure services to perform the following operations over a REST API: o Read data from the procedures table without authentication. o Read and insert data into the Transactions table once authenticated. o Execute the sp_UpdateProcedurePatient stored procedure. • Provide the functionality to retrieve a list of the names of patients who underwent medical procedures during the last 30 days. • Information for each medical procedure will be stored in a table. The table will be used with a large language model (LLM) for user querying and will have the following structure. DAB - You create a DAB configuration file that meets the development requirements for DB1 and includes the following entities. You need to create a solution that meets the development requirements for retrieving the patient lists. How should you complete the Transact-SQL code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
Question 17
You have an Azure SQL database named ToDo that contains a table named dbo.ToDo. Your company plans to develop an Azure Functions app to run whenever the rows in dbo.ToDo change. The app will process INSERT, UPDATE, and DELETE events by using the Azure SQL trigger binding. You need to configure ToDo to support the planned app. What should you do?
Enable change tracking on ToDo and dbo.ToDo.
On dbo.ToDo, create a Data Manipulation Language (DML) trigger that calls the Azure Functions HTTP endpoint.
Enable change data capture (CDC) on ToDo and dbo.ToDo.
On dbo.ToDo, create a Data Definition Language (DDL) trigger that calls the Azure Functions HTTP endpoint.
Question 18
You have an Azure SQL database that contains a table named dbo.Customers. dbo.Customers contains the following columns: • CustomerId (int)(primary key) • ProfileJson (nvarchar(max)) You have an application that returns phone numbers in a format of +000 000-000-0000. The phone numbers are stored in ProfileJson. You need to write a query that returns: • One row per customer • A PhoneNUmerals column that contains only the digits How should you complete the Transact-SQL query? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.
Question 19
You have an Azure SQL database named SalesDB that supports an ecommerce application. SalesDB contains a table named dbo.Orders that has a clustered index on a column named OrderId. dbo.Orders receives continuous OLTP inserts and updates during business hours. Your analytics team runs hourly aggregate queries that scan dbo.Orders to calculate revenue trends for recent dates. You need to improve the performance of the hourly analytics queries without significantly affecting OLTP throughput. The solution must meet the following requirements: • Support near-real-time (NRT) analytics on the dbo.Orders table. • Reduce read time when retrieving analytical data from dbo.Orders. • Support indexing only rows that match a predicate, such as Active = 1. Which type of index should you use for each requirement? To answer, drag the appropriate index types to the correct requirements. Each index type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.
Question 20
You have an Azure SQL database that stores sales data and contains tables named Sales and Products. Sales contains three columns named SalesDate, ProductKey, and TotalSale, Sales is 10 TB and is loaded nightly by using a batch process. Most reporting queries scan large portions of Sales, filter on SalesDate or ProductKey, and use SUM() to aggregate TotalSale. Products is relatively small and is used primarily for point lookups and joins to Sales. You need to recommend which indexes to create to optimize the reporting queries. The solution must minimize storage requirements. Which type of index should you recommend for each table? To answer, drag the appropriate index types to the correct tables. Each index type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.