SDA

Free SDA practice questions

10 questions from our SDA practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the SDA practice exams

Question 1 of 10, Data Modeling and Database Design

A data architect is designing a custom Invoice Line object that will receive about 30 million records per year. Lines must always belong to an Invoice, but a few sales users who cannot see an invoice must still be able to own and edit specific lines assigned to them. Which relationship should the architect choose?

  1. AA lookup relationship from Invoice Line to Invoice with the field marked required and deletion of a referenced invoice prevented Correct answer
  2. BA master-detail relationship from Invoice Line to Invoice with the sharing setting that allows Read access on the master to edit details
  3. CA junction object between Invoice and User so that each assigned sales user receives access to the lines through the junction record
  4. DA master-detail relationship with reparenting allowed so that lines can be moved under an invoice the sales user is able to access

Answer and explanation: Detail records in a master-detail relationship have no owner and inherit access from the master, so a user who cannot see the invoice could never own or edit a line. A required lookup that prevents deleting the parent keeps lines tied to an invoice while letting each line have its own owner and sharing. Reparenting or relaxing the master's access level still keeps access tied to the invoice, and a junction object does not give line-level ownership.

Question 2 of 10, Data Modeling and Database Design

A university needs to record which Students attend which Courses, along with the grade earned in each enrolment. Each student takes many courses and each course has many students. Enrolments should be removed when either the student or the course is deleted. What is the recommended data model?

  1. AA custom Enrolment junction object with two master-detail relationships, one to Student and one to Course, holding the grade Correct answer
  2. BTwo lookup relationships on a custom Enrolment object, with a nightly scheduled flow that deletes enrolments whose student or course is gone
  3. CA multi-select picklist of course codes on Student, with a long text area field that stores the grade for each code entered
  4. DA lookup from Student to Course and a second lookup from Course to Student, with the grade kept on whichever record was updated last

Answer and explanation: A junction object with two master-detail relationships is the standard pattern for many-to-many with attributes: the grade lives on the junction record and deleting either master cascades to it. Multi-select picklists cannot carry per-enrolment attributes or be reported reliably. Lookups plus a scheduled cleanup flow work but add needless automation and leave orphans between runs, and reciprocal lookups can only hold one related record each.

Question 3 of 10, Data Modeling and Database Design

Universal Containers keeps 400 million shipment events in an on-premises SQL database that exposes an OData 4.0 endpoint. Sales reps need to see a customer's recent shipment events on the Account page in real time, but the company does not want to consume Salesforce data storage for them. Which approach meets the requirements?

  1. AUse Salesforce Connect external objects for the events, related to Account through an indirect lookup on an external ID Correct answer
  2. BLoad the shipment events into a custom big object indexed by account number and show them on the Account page with a Lightning component
  3. CReplicate the events nightly into a custom object with Bulk API 2.0 and archive anything older than ninety days into a second custom object
  4. DStore the events as Files attached to each Account, generated by a daily export job that writes one CSV file per customer from the SQL database

Answer and explanation: Salesforce Connect external objects read OData data on demand without copying it into Salesforce, and an indirect lookup joins the external rows to Account through a unique external ID. A big object or a replicated custom object both store the data in Salesforce and are not real time, with the custom object consuming data storage. Daily CSV files consume file storage, are stale, and cannot be queried as records.

Question 4 of 10, Master Data Management

A bank wants a single view of each customer across six systems without changing those systems or copying full customer data into a hub. The hub should only hold matching keys and links to the source records. Which MDM style is this?

  1. ACentralized style
  2. BConsolidation style
  3. CRegistry style Correct answer
  4. DCoexistence style

Answer and explanation: Registry style keeps only identifiers and cross-references, building the unified view at read time from the sources, with no changes to them. Consolidation copies data into a hub for a golden record used for reporting, coexistence also synchronizes the golden record back, and centralized style makes the hub the only authoring system.

Question 5 of 10, Salesforce Data Management

A company wants to back up all Salesforce data weekly and be able to restore specific records with their relationships after accidental deletions or bad data loads. Which approach provides this most completely?

  1. AA full sandbox refreshed every week, which holds a copy of production data that can be copied back when needed
  2. BThe weekly Data Export Service, with export files stored on a shared drive for administrators to reload with Data Loader
  3. CThe Recycle Bin, which keeps deleted records for 15 days so administrators can restore them with their child records
  4. DA backup and recovery solution that captures data and metadata and restores records with their relationships Correct answer

Answer and explanation: A backup and recovery product, such as Salesforce Backup or an AppExchange solution, captures data and metadata and restores records with their relationships. Data Export files can be reloaded but rebuilding relationships and IDs is manual. The Recycle Bin does not help with bad updates and is time limited, and sandboxes are not backups and cannot be copied back to production.

Question 6 of 10, Salesforce Data Management

Sales reps keep creating duplicate leads. The business wants reps to be warned and to see possible matches when they save a lead that matches an existing contact by email, but still be allowed to save it, while the duplicates are reported. Which configuration meets this?

  1. AA before-save record-triggered flow that searches contacts by email and, if it finds one, assigns the lead to a data steward queue
  2. BA matching rule on Lead that compares to Contact by email, used by a duplicate rule set to Allow with an alert and reporting enabled Correct answer
  3. CA duplicate rule on Lead set to Block on create and edit, using the standard contact matching rule with an alert to the user
  4. DA validation rule on Lead that uses VLOOKUP to compare the email with contacts and shows an error message when they match

Answer and explanation: Duplicate rules can compare leads with contacts through a cross-object matching rule, and the Allow action with alert and report shows matches while still letting the user save and creating duplicate record sets for reporting. A validation rule or a Block action prevents the save, which the business does not want, and VLOOKUP works only on custom objects. A flow that reassigns the lead neither warns the user nor shows the matches.

Question 7 of 10, Data Governance

A healthcare provider must encrypt patient diagnosis fields at rest while still allowing users to filter list views on them with exact-match criteria. Keys must be rotated and controlled by the company. Which solution should the architect recommend?

  1. AField-level security that hides the diagnosis fields from all profiles except clinicians, combined with sandbox data masking
  2. BShield Platform Encryption with probabilistic encryption on all fields, plus a separate formula field that copies each diagnosis
  3. CClassic encrypted custom fields with masking characters shown to users who do not have the View Encrypted Data permission
  4. DShield Platform Encryption with deterministic encryption on the diagnosis fields and tenant secrets managed by the company Correct answer

Answer and explanation: Deterministic encryption in Shield Platform Encryption keeps fields encrypted at rest but still supports exact-match filtering, and customers manage tenant secrets and key rotation. Classic encrypted fields cannot be filtered and offer limited key control. Probabilistic encryption blocks filtering and a copying formula field would expose plaintext, while field-level security controls visibility but does not encrypt anything.

Question 8 of 10, Large Data Volume Considerations

A query on a custom object with 8 million records filters on a custom text field Region__c and is timing out. The Query Plan tool shows a table scan. The filter typically returns about 20,000 records. What should the data architect do first?

  1. ARequest a custom index on Region__c from Salesforce Support, since the filter is selective enough to use it Correct answer
  2. BAdd an ORDER BY clause on Region__c and a LIMIT of 50,000 rows so the query optimizer sorts more efficiently
  3. CConvert Region__c to a formula field that references the owner's region, so the value is calculated at runtime
  4. DChange the filter to use a LIKE operator with a leading wildcard so that partial region names also match

Answer and explanation: Twenty thousand rows out of 8 million is well under the selectivity threshold for a custom index, so an index on Region__c lets the optimizer avoid the table scan. A leading wildcard makes the filter non-selective, and ORDER BY with LIMIT does not make the filter itself selective. A cross-object formula field cannot be indexed and is calculated at runtime, which is slower.

Question 9 of 10, Large Data Volume Considerations

A custom object has a lookup to Account. One Account named Unassigned is the parent of 900,000 records, and inserts into the object are failing with lock errors. What is this condition called, and how should it be addressed?

  1. ASelectivity failure; request a custom index on the lookup field so inserts no longer lock the parent
  2. BOwnership skew; give the owner of the Unassigned account the View All Data permission so the lock is released
  3. CLookup skew; spread the records across several placeholder parents or leave the lookup blank where possible Correct answer
  4. DSharing skew; change the custom object to Public Read Only so that parent locks are not acquired

Answer and explanation: When a very large number of records point to the same lookup parent, inserts and updates contend for a lock on that parent, which is lookup skew; spreading records over multiple parents or leaving the lookup null reduces contention. Ownership skew is about record owners, an index does not affect row locking, and changing sharing defaults does not remove parent locks.

Question 10 of 10, Data Migration

A legacy system has 1.5 million attachments related to accounts and cases. They must be migrated into Salesforce Files and appear on the right records. Which approach should the architect use?

  1. AInsert ContentVersion records with the file data and set FirstPublishLocationId to the related record's ID Correct answer
  2. BInsert ContentDocument records directly with the binary data and a ParentId field for the related record
  3. CInsert Attachment records with ParentId set, then run the platform conversion that turns them into Files
  4. DUpload all files to a single Library, then ask users to link each file to its record from the Files tab

Answer and explanation: Creating ContentVersion records with FirstPublishLocationId stores each file and links it to the related record in one step. Loading Attachment records keeps the legacy model and needs another conversion. Manual linking is impractical at this volume, and ContentDocument records are created automatically from ContentVersion rather than inserted directly.