DP-700 · Workspace Lifecycle Management
29 cards
SQL Database Source Control
-
Quick check
A team creates tables directly in a test database and commits the database from the Source control panel. What reaches the repository?
AThe rows of each table, exported as data files
Commit captures the definitions of the objects. The rows that the tables contain stay in the database.
BThe object definitions, written as code files
Right. The service reads the object definitions from the live database and writes them to the remote repository, one .sql file per object.
CA backup of the database that Update can restore
There is no backup in the repository. Update builds the code and applies only the differences to the database.
3 / 29
-
Quick check
A developer clones the repository and wants to build the generated SQL project on a laptop with the SQL projects extension. Which manual change to the project file has a supported purpose?
AAdding a reference to the master.dacpac file
Right. To build the project locally with SQL tools, you can add a reference to master.dacpac. Other manual edits are overwritten on the next commit from Fabric.
BListing each table file, so that the build can find the tables
Fabric generates and updates the project file with the metadata it needs. Lasting changes belong in object files, not in a hand-written list.
CRemoving the exclusion of .sharedQueries, so that the queries are validated too
The exclusion is there on purpose. Shared queries are scripts to run, not part of the database model, so the build must leave them out.
6 / 29
-
Quick check
In the code-first flow, why does a developer first commit a new SQL database that has no objects?
ASo that Fabric copies the sample rows into the repository
A commit writes object definitions and project metadata. Table rows are not part of it.
BSo that the first Update all can run without a build
Every update from source control includes a build of the SQL project. Committing an empty database does not remove that step.
CSo that the empty SQL project and its metadata reach Git
Right. The empty commit creates the project and the item metadata in the repository, so the developer has a folder to clone and add .sql files to.
9 / 29
-
Keep your progress in the app
That’s 3 of 11 quick checks. In the app they stay answered, and every lesson remembers where you left off.
Keep reading hereOpens in your browser. Nothing to install.
Start studying -
Quick check
During an update from source control, what does the SqlPackage publish step do with the .dacpac file?
AIt replaces the database with a new one built from the package
The publish is differential. It does not recreate the database, and objects that did not change are left alone.
BIt works out and applies the changes that make the database match it
Right. The publish determines the changes necessary to update the database so that it matches the model in the .dacpac file.
CIt checks the syntax of each .sql file and reports the errors
Checking the syntax is the job of the build, which runs first and produces the .dacpac file.
11 / 29
-
Quick check
Fabric publishes with /p:ScriptDatabaseOptions = false. What does that value tell you about an update from source control?
AThe update does not set or change the properties of the target database
Right. ScriptDatabaseOptions decides whether target database properties are set or updated as part of the publish, and Fabric turns it off.
BThe update skips the build and publishes the .sql files directly
Every update builds the SQL project first. This option only concerns database properties during the publish.
CThe update runs without transactional statements
Transactional statements are controlled by IncludeTransactionalScripts, which Fabric sets to true.
14 / 29
-
Quick check
Two developers each run Update all. For Ana the update fails on a file with invalid syntax. For Ben it succeeds, but the database shows Uncommitted. What should each one do?
AAna commits from Fabric, and Ben reverts his own change in source control
This is the swap. A failed update needs the bad change reverted in source control, and an Uncommitted status after a good update is cleared with a commit from Fabric.
BBoth run Update all again until the status changes
Running the update again applies the same code. Ana's file is still invalid, and Ben's database still differs from the repository files in form.
CAna reverts the change in source control, and Ben commits from Fabric
Right. Invalid code must be reverted manually in source control. An Uncommitted status right after a successful update only needs a commit from Fabric.
17 / 29
-
Quick check
A team expects a new environment built from the repository to match the source database exactly. Which two things will be missing?
AThe stored procedures and the views
Procedures and views are object definitions, and object definitions are exactly what the project carries.
BThe SQL project file and the Shared Queries scripts
Both are in the repository. Fabric generates the project file and tracks the Shared Queries scripts in source control.
CThe table rows and database-level settings such as collation
Right. The tables arrive new and empty, and settings such as collation and compatibility level are not included in the integration.
19 / 29
-
Quick check
In the MERGE script for dbo.Colors, the value list holds Red, Green, and Blue. The table in the test database also holds a row for Yellow. What does the script do with Yellow on the next deployment?
AIt keeps the row, because the script only inserts and updates
The statement has a third clause, WHEN NOT MATCHED BY SOURCE THEN DELETE, which handles rows that are not in the value list.
BIt deletes the row
Right. Yellow exists in the table but not in the value list, so the WHEN NOT MATCHED BY SOURCE clause deletes it.
CIt stops the deployment and reports a conflict
MERGE does not treat an extra row as an error. Each row falls into one of the three clauses, and this one falls into the delete clause.
22 / 29
-
Quick check
A pull request from a feature branch into the primary branch was completed an hour ago. A tester connects to the database in the primary workspace and cannot find the new stored procedure. Why?
AThe pull request changed the primary branch, and the workspace was not updated
Right. Completing a pull request updates source control only. The primary database changes when someone selects Update in the primary workspace.
BThe stored procedure was left in the feature workspace, because merges only move tables
A merge moves all the code of the branch, including procedures. The code is in the primary branch and has not been applied yet.
CThe merge takes several hours to reach the database
There is no delayed automatic sync. The database changes when the workspace is updated from source control.
25 / 29
-
Quick check
A developer wants to publish a compiled database model from the command line. Which part of the SqlPackage command points to the .dacpac file?
A/TargetConnectionString
The target connection string identifies the database that receives the changes, not the package.
B/Action:Publish
The action tells SqlPackage which operation to run. It does not say where the package is.
C/SourceFile
Right. /SourceFile names the .dacpac file that is the source of the publish.
27 / 29
-
Quick check
Which statement about a SQL database under Fabric source control is correct?
ACompleting a pull request applies the merged code to the database of the primary workspace
Completing a pull request updates source control. The primary database changes when the primary workspace is updated.
BA manual edit to the generated project file is kept by Fabric on later commits
Fabric generates and updates the project file, so a manual edit is overwritten on the next commit from Fabric.
CAn update builds the project into a dacpac and publishes only the differences
Right. The build validates the code and produces the dacpac, and the SqlPackage publish applies the changes needed to match it.
29 / 29
-
11 quick checks · then the test
In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.
Take this lesson’s test → Next lesson: Warehouse Database ProjectsOpens in your browser. Nothing to install.
Start studying
The whole course, on your computer and your phone
Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.
Opens in your browser. Nothing to install.
Start studying“This app is the ‘One Lake’ for preparing the certification exams. Really worth it.”
