Microsoft certification · Exam DP-800

DP-800 Mock Exam Page 3

Developing AI-Enabled Database Solutions

Free DP-800 questions on Topic 2, Misc. Questions Types, each with the answer and an explanation.

20 questions · 34 minutes · free, no sign-up

Topic 2, Misc. Questions Types questions

21–23 of 23 free
Question 21 Choose 1
You have a SQL database in Microsoft Fabric that contains a table named dbo.Orders, dbo.Orders has a clustered index, contains three years of data, and is partitioned by a column named OrderDate by month.
You need to remove all the rows for the oldest month. The solution must minimize the impact on other queries that access the data in dbo.orders.
Solution: Run the following Transact-SQL statement.
DELETE FROM dbo.Orders
WHERE OrderDate < DATEADD(nonth, -36, SYSUTCDATETIME());
Does this meet the goal?
Show answerHide answer

Correct answer: B No

Explanation

Explanation

This question tests how to remove one month of data from a large partitioned table with the least impact on other queries. A DELETE with a WHERE clause removes rows one at a time, logs every row, and holds locks for the whole operation. On a table with three years of data, this creates heavy log activity and blocking. A partition level operation is the better approach because it affects only the target partition.

✅ B. No
The solution does not meet the goal. A DELETE statement removes rows individually and writes a log entry for each one, which uses large amounts of transaction log space and holds locks that can block other queries on dbo.Orders. It also ignores the monthly partitioning. TRUNCATE TABLE with WITH (PARTITIONS (1)) removes the oldest month with far less logging and locking.

❌ A. Yes
Choosing Yes assumes that a filtered DELETE is an efficient way to clear the oldest month. It is not, because it scans and removes each row, generates heavy transaction logging, and can escalate locks, which slows or blocks other queries reading the table. The table is partitioned by month, so a partition level truncate is the correct way to minimize the impact.

🔧 Reference
🔗 TRUNCATE TABLE (Transact-SQL) – Microsoft Learn → confirms that TRUNCATE TABLE can remove all rows from specified partitions using WITH PARTITIONS, and uses fewer log and system resources than DELETE, which logs every row it removes.
Question 22 Choose 1
You have an SDK-style SQL database project stored in a Git repository. The project targets an Azure SQL database.
The CI build fails with unresolved reference errors when the project ieferences system objects.
You need to update the SQL database project to ensure that dotnet build validates successfully by including the correct system objects in the database model for Azure SQL Database.
Solution: Add the Microsoft.SqlServer.Dacpacs.Mastet NuGet package to the project. Does this meet the goal?
Show answerHide answer

Correct answer: B No

Explanation

Explanation:

This question examines how to resolve validation errors caused by system object references in SQL database projects that target Azure SQL Database. The build process performs reference validation, and by default, the project model does not include system objects, which leads to errors when the project references them. The solution must add the correct master.dacpac for the target platform, but the specified package name must match Azure SQL Database, not SQL Server.

✔️ Correct Option:

The proposed solution adds the Microsoft.SqlServer.Dacpacs.Master NuGet package. This package contains the system object model for SQL Server, not Azure SQL Database. When the project targets Azure SQL Database, the correct package is Microsoft.SqlServer.Dacpacs.Azure.Master . Therefore, using the SQL Server version cannot correctly include the Azure SQL Database system objects, and the build still fails to validate successfully.

❌ Incorrect Options:

A. Yes:
This is incorrect. Although adding a master package is the correct direction, the package specified in the question is the SQL Server version rather than the Azure SQL Database version. The platform mismatch prevents the reference errors from being fully resolved.

🔧 Reference:
→ SQL projects system objects - Confirms that for Azure SQL Database, you must use Microsoft.SqlServer.Dacpacs.Azure.Master to include the correct system object model.
Question 23
Your company has an ecommerce catalog in a Microsoft SQL Server 202b database named SalesDB SalesDB contains a table named products, products contains the following columns:

• product.id (int)
• product_name (nvarchar(200))
• description (nvarchar(max))
• category (nvarchar(50))
• brand (nvarchar(W))
• price (decimal)
• sku (nvarchar(40))

The description fields ate updated dairy by a content pipeline, and price can change multiple times per day. You want customers to be able to submit natural language queries and apply structured filters for brand and price. You plan to store embeddings in a new VECTOR(1536) column and use VECTOR_SEARCH(... METRIC=’ cosine' ...).
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:

This question assesses the design considerations for implementing vector search in SQL Server 2025. It covers the composition of text for generating embeddings, the separation of semantic search from structured filtering, and the underlying data type of the vector column.

✅ Correct Option:

Statement 1 (Yes):
Concatenating product_name, category, and description provides a rich semantic context that captures the product's key attributes and meaning. This supports natural language queries where customers search by intent or product features, making it a sound strategy for building the embedding text.

Statement 3 (Yes):
The VECTOR(1536) column stores embeddings as single-precision floating-point numbers. SQL Server's vector data type internally uses float(32) for each dimension to represent the array of numeric values, confirming that the underlying base type is float(32).

❌ Incorrect Options:

Statement 2 (No):
Including price in the embedding text is not required because price is a structured numeric field that changes frequently. Since the scenario explicitly requires applying structured filters for price, it is handled through standard T-SQL WHERE clauses. Including price in the semantic embedding would add noise and require regeneration whenever the price changes, which is inefficient.

🔧 Reference:
→ Vector search in the SQL Server EF Core Provider - Confirms the vector data type is used to store embeddings as arrays of numbers for similarity search.

→ CREATE VECTOR INDEX (Transact-SQL) - Demonstrates using traditional indexes for filtering on columns like category while using vector search for semantic matching.

That's the last free question in Topic 2, Misc. Questions Types

You've seen the free 30% (23 of 77 questions). Full access unlocks every question and full-length DP-800 mock exams (60 questions, 100 minutes), a different mock on every attempt.

Unlock full mock exam
Full mock exam

Sit the DP-800 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real DP-800 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full DP-800 mock exam
  • 60questions per mock
  • 100 mintime limit
  • 87questions in the bank
  • Newmock on every attempt