Courseiva

CCNA Data Modeling and Database Design Questions

41 questions · Data Modeling and Database Design · All types, answers revealed

1
MCQmedium

An architect is modeling a 'Subscription' service where Customers have multiple active subscriptions. Which approach best handles the 'Current' vs 'Historical' subscription data for reporting?

A.Use two separate objects for Current and Historical subscriptions.
B.Use a single object with 'Status' and 'Date' fields.
C.Delete historical records to save storage space.
D.Use a multi-select picklist to track history.
AnswerB

A single object with a status field and date range is the most efficient design. It allows for simple filtering (e.g., WHERE Status = 'Active') and makes historical reporting straightforward. This pattern is easy to maintain and scales well as the number of subscription records grows.

Why this answer

Using a combination of a status field and a date range is the standard way to model active versus historical subscriptions. By flagging records as 'Active' and using the 'End Date' field, the architect allows the system to easily filter for current records while maintaining a full history. This design supports both operational reporting and long-term analytical tracking, which is essential for subscription-based business models.

Exam trap

Candidates often try to create separate objects for historical and current records, leading to complex data synchronization challenges rather than utilizing simpler status-driven schemas.

2
MCQmedium

An organization wants to use 'Person Accounts' to manage B2C relationships. Which consideration is most important for a Data Architect when evaluating this change?

A.Person Accounts can be disabled by contacting Salesforce Support.
B.They replace the need for custom objects for B2C data.
C.They fundamentally change the object model and are non-reversible.
D.They require a Business Account for every Person Account.
AnswerC

Person Accounts merge the Account and Contact entities. This is a irreversible change that affects almost every part of the system, including API integrations and reporting. A data architect must perform a thorough impact analysis because this change is permanent and alters the core structure of the database.

Why this answer

Person Accounts merge the Account and Contact models into a single entity, which has long-term implications for the data schema. Once enabled, this change cannot be reversed, and it impacts existing integrations, custom code, and reporting. A Data Architect must ensure that all third-party systems are updated to handle the new object structure, as the standard Account-Contact hierarchy is fundamentally altered, potentially breaking legacy processes that expect distinct objects.

Exam trap

Candidates often treat Person Accounts as a minor configuration change, failing to realize the massive, permanent impact on the data model and existing integrations.

3
MCQmedium

A company is migrating legacy data and needs to preserve the CreatedDate and CreatedById. Which feature should they enable?

A.Data Loader batch settings
B.Set Audit Fields permission
C.Field History Tracking
D.Owner migration setting
AnswerB

The 'Set Audit Fields' permission is the specific security requirement needed to override system-managed fields. When this is enabled for the integration user, the system allows the ingestion of original creation timestamps and user IDs, ensuring that legacy data maintains its historical integrity after the migration.

Why this answer

By default, Salesforce sets the CreatedDate and CreatedById to the time and user of the import. To preserve historical audit logs, Salesforce provides the 'Set Audit Fields' permission. This is vital for data migration projects where historical accuracy is required for compliance and reporting.

Without this, the audit trail of the legacy system is lost, which can lead to significant regulatory and reporting issues.

Exam trap

Candidates frequently assume that standard administrative permissions are sufficient, forgetting that 'Set Audit Fields' is a specialized, high-privilege permission that must be explicitly enabled in the org.

4
MCQeasy

An org has a custom object 'Invoice__c' with a Lookup to Account. Users frequently complain that deleting an Account leaves orphaned Invoice records, and reports show Invoices with no Account. The business wants the platform to prevent an Invoice from being saved without a valid Account. Which change should the architect make?

A.Convert the Lookup to a Master-Detail relationship from Invoice__c to Account.
B.Mark the Lookup field as required on the page layout only.
C.Create a validation rule that checks whether the Account field is blank.
D.Enable a duplicate rule that flags Invoices with a null Account.
AnswerA

Master-Detail makes the parent reference mandatory at the database level, so an Invoice cannot be saved without a valid Account regardless of whether it is created in the UI, via API, or through data loading. It also blocks Account deletion while Invoices exist, directly resolving the orphaned-record problem.

Why this answer

A Master-Detail relationship enforces the parent reference at the data layer, so records cannot be saved without a valid Account and referenced Accounts cannot be deleted while children exist. This is the native way to eliminate orphaned child records across UI, API, and data-load paths.

Exam trap

The trap here is relying on page layout requirements or validation rules, which can be bypassed or do not stop parent deletion, instead of a Master-Detail relationship that enforces integrity natively.

5
Multi-Selecthard

An architect is choosing between storing a new data domain in a custom object versus using Big Objects in Salesforce. The dataset is expected to reach billions of records with append-only writes and infrequent, key-based reads. Which two characteristics make Big Objects the appropriate choice for this scenario? (Choose two.)

Select 2 answers
A.Big Objects support full DML operations including update and delete through the standard user interface.
B.Big Objects replicate data across every Salesforce instance for real-time reporting in standard reports.
C.Big Objects allow roll-up summary fields and validation rules on the object.
D.Big Objects provide an indexed, query-optimized access path for retrieving records by defined key fields.
E.Big Objects are designed to store and query massive volumes of data on the Salesforce platform.
AnswersD, E

Big Objects use an index defined by the architect over selected fields, enabling efficient retrieval by those keys even at massive scale. This matches the scenario's infrequent, key-based read pattern and is a defining advantage over custom objects, which do not scale to billions of rows with predictable query performance.

Why this answer

Big Objects exist to handle data volumes beyond what custom objects can practically store, and they add an architect-defined index that makes key-based retrieval efficient at that scale. Together, scalability and indexed async query access are the two defining reasons to choose Big Objects for this append-only, high-volume domain.

Exam trap

The trap here is assuming Big Objects behave like custom objects with full DML, roll-ups, and standard reporting, when they are intentionally limited to high-volume, indexed, mostly append-only use cases.

6
MCQmedium

Universal Containers wants to track complex relationships between Accounts where one Account can be a subsidiary of many others, and an Account can have many parent companies. Which modeling approach should the Architect recommend?

A.Add multiple self-lookup fields on the Account object.
B.Create a Text field to store a comma-separated list of parent IDs.
C.Implement a custom junction object with two lookup fields to the Account object.
D.Use a master-detail relationship between the Account and a custom object.
AnswerC

A custom junction object provides a flexible many-to-many link between two Account records. This model supports unlimited relationships, enables the inclusion of additional attributes about the connection, and integrates perfectly with standard Salesforce features like related lists, sharing rules, and report types for comprehensive hierarchy visibility.

Why this answer

Many-to-many relationships are best handled using a junction object in Salesforce. By creating a custom object, you can link two Account records while storing additional metadata like the nature or duration of the relationship. This approach overcomes the limitations of standard lookup fields, which only support one-to-many structures, ensuring data integrity and allowing for robust reporting across complex corporate hierarchies.

Exam trap

Candidates often try to use standard parent-child lookup fields on the Account object, which cannot support a many-to-many relationship structure between two Account records.

7
MCQmedium

An architect is building a data model for a subscription service. They need to calculate the total revenue across all related 'Invoice' records for an 'Account'. Which approach should they use?

A.Write a Trigger to calculate and update the total on the Account.
B.Use a Roll-up Summary field on the Account object.
C.Create a Flow that triggers on every Invoice insert.
D.Calculate the revenue dynamically using a Formula field.
AnswerB

Roll-up summary fields provide an out-of-the-box solution for aggregating data from child records. They are performance-optimized by Salesforce and maintain data consistency without the risk of logic errors associated with custom code. This is the recommended approach for any aggregation across master-detail relationships in a standard data model.

Why this answer

Roll-up summary fields are the native, declarative way to perform aggregate calculations across master-detail relationships. They are highly efficient, automatically updated by the platform, and require no code. This ensures the revenue data is always accurate and available for reporting, dashboards, and list views, which is essential for sales teams tracking customer lifetime value.

Exam trap

Candidates often propose writing custom trigger code or asynchronous batch jobs for simple aggregations, overlooking native declarative features that provide automated and efficient roll-up calculations.

8
MCQeasy

An administrator wants to convert an existing custom lookup relationship on the 'Project' object pointing to the 'Client' object into a master-detail relationship. Which precondition must be satisfied before this conversion can be completed successfully?

A.All existing child records must have a non-null value populated in the lookup field.
B.The parent object must have fewer than 10,000 child records associated with it.
C.The organization-wide default for the child object must be set to Public Read/Write.
D.All custom reporting types referencing the objects must be temporarily deleted prior to conversion.
AnswerA

Master-detail relationships require every child record to reference a parent, so the lookup field must be populated on all existing Project records before conversion. Null values would leave orphaned children, which Salesforce rejects during the conversion process.

Why this answer

Converting a lookup relationship to a master-detail relationship requires that every existing child record currently in the database possesses a populated, valid value for the lookup field. If any orphan records exist where the lookup field is blank, the database cannot establish the mandatory parent-child integrity required by master-detail semantics, causing the conversion operation to fail.

Exam trap

Candidates often believe Salesforce will automatically populate missing values or ignore empty lookup fields during a conversion to a master-detail relationship.

9
MCQmedium

Universal Containers requires a data model where a Child object must have exactly one Parent object that is mandatory. If the Parent is deleted, the Child must be deleted. Which relationship should the Architect select?

A.Lookup relationship
B.Self-relationship
C.Master-Detail relationship
D.External lookup relationship
AnswerC

Master-Detail relationships enforce a strict ownership model where the child record is dependent on the parent. The relationship field is mandatory, and the system automatically enforces a cascade delete when the parent is deleted, directly satisfying the requirement for mandatory association and lifecycle management.

Why this answer

A Master-Detail relationship creates a tight coupling where the child's lifecycle is strictly governed by the parent. Deleting the parent automatically triggers a cascade delete of all associated children. This is essential for maintaining referential integrity in parent-child hierarchies where the child cannot exist in isolation, ensuring the database remains clean and logically consistent without requiring custom automation for cleanup tasks.

Exam trap

Candidates might choose a Lookup relationship with required configuration, missing that only Master-Detail relationships guarantee strict lifecycle dependency and cascade deletion.

10
MCQeasy

A nonprofit needs to record donations. Each donation is made by exactly one donor Account, and the organization wants a Donor's lifetime giving total displayed on the Account record itself, updated automatically whenever a Donation is created or edited. What should the architect configure?

A.A trigger on Donation that posts the Amount to a custom field on Account using an aggregate SOQL query.
B.A scheduled Flow that runs nightly to query all Donations and update a numeric field on each Account.
C.A cross-object formula field on Account that sums the Amount field of all related Donation records.
D.A roll-up summary field on Account that sums the Amount field of related Donation records, with Donation in a Master-Detail relationship to Account.
AnswerD

Roll-up summary fields are designed precisely for this scenario: they aggregate child records onto the parent. Because Donation is the detail and Account is the master, the Account can display a SUM of the Donation Amount field. The value recalculates automatically when donations are created, edited, or deleted, requiring no code.

Why this answer

Roll-up summary fields exist to aggregate values from detail records onto a master record. With Donation in a Master-Detail relationship to Account, the architect can create a roll-up summary field on Account that sums the Amount field of all related donations. The total updates automatically on insert, update, and delete, with no code and no scheduled job.

Exam trap

The trap here is confusing a cross-object formula field, which can only reference one related parent record, with a roll-up summary field, which aggregates many child records.

11
MCQmedium

A financial services firm stores portfolio holdings in a custom object with 4 million records. Analysts frequently filter holdings by Account and by a calculated risk score derived from multiple fields on the holding record. The architect wants to minimize query time when users filter by risk score in list views and reports. Which approach should the architect take?

A.Create a formula field for the risk score and rely on Salesforce to index it automatically for filtering.
B.Create a numeric custom field to store the risk score, populate it via a before-save record-triggered flow, and request a custom index on that field.
C.Create a roll-up summary field on a parent object to calculate the risk score and filter on the parent.
D.Enable Big Object storage for the holdings and query it with SOQL to improve filter performance.
AnswerB

A stored numeric field can be indexed, and Salesforce supports custom indexes on external IDs or fields requested through Support. Populating it with a before-save flow keeps it current without consuming additional DML, so filtering by risk score in list views and reports uses the index and performs well at scale.

Why this answer

To filter efficiently on a computed value at scale, the value must be stored in a field that can carry a custom index. A before-save record-triggered flow updates the stored field without extra DML, and a custom index lets list views and reports filter on it quickly. Formula fields, roll-up summaries, and Big Objects cannot provide indexed filtering on a per-record calculated score.

Exam trap

The trap here is believing formula fields are indexed for filtering, when in fact only stored fields with a custom index can accelerate queries at scale.

12
MCQmedium

When designing a data model for a multi-region deployment, what is the best way to handle global picklist values?

A.Copy values to every object
B.Use Global Value Sets
C.Use a custom metadata type
D.Use a text field
AnswerB

Global Value Sets provide a centralized, reusable list of picklist values. This ensures that the same set of options is available across multiple objects, guaranteeing data consistency. It simplifies administration because changes are propagated automatically, making it the best architectural choice for maintaining data integrity in global deployments.

Why this answer

Global Value Sets allow for centralized management of picklist values across multiple objects and regions. This ensures consistency in reporting and data entry, as the same set of values is used consistently. If a value needs to be updated, it only needs to be changed in one place, which reduces the risk of data inconsistency and makes the maintenance of global data models much more efficient.

Exam trap

Candidates often suggest creating multiple independent picklists for different regions, which creates massive technical debt and makes global reporting impossible across the entire organization.

13
MCQhard

Which TWO factors should be considered when choosing between a Master-Detail and a Lookup relationship for a new custom object? (Choose two)

A.Security and sharing inheritance
B.The number of records
C.Need for Rollup Summary fields
D.The color of the object
E.The API name prefix
AnswerA, C

Master-Detail relationships force child records to inherit the sharing and security settings of the parent. In contrast, Lookup relationships allow the child to have its own independent sharing rules, making this a fundamental design decision for data access control and visibility across different user profiles.

Why this answer

Choosing the correct relationship involves evaluating data ownership and security requirements. Master-Detail relationships propagate security settings from the parent to the child, which is a key architectural decision. Lookup relationships offer independent sharing, which is vital when child records should have distinct visibility regardless of the parent.

Architects must weigh these against the need for cascade deletes and rollup summaries to ensure the model aligns with business processes.

Exam trap

Candidates often confuse Lookup relationships with Master-Detail by assuming Lookups can automatically calculate rollup summary fields or enforce cascade deletes without custom automation.

14
MCQmedium

A Data Architect is analyzing a legacy system migration. Which THREE factors should be evaluated before deciding between a Lookup or a Master-Detail relationship?

A.Whether child records should be automatically deleted if the parent is deleted.
B.The need for roll-up summary fields on the parent object.
C.The number of child records expected to be created.
D.Whether the child record needs to have its own owner.
E.The color of the record detail page header.
AnswerA, B, D

Master-detail relationships feature cascading deletes, where child records are automatically removed when their parent is deleted. If the business requirement dictates that records should persist independently of the parent, a Lookup relationship is necessary to avoid data loss and maintain the integrity of the child records.

Why this answer

Choosing the right relationship is foundational to Salesforce architecture. Factors like data ownership, lifecycle dependency, and reporting needs drive the decision. A Master-Detail relationship implies structural dependency, while a Lookup offers flexibility.

Understanding these nuances early in the migration prevents architectural debt, ensures correct security enforcement, and aligns the data model with the organization's business process requirements for record access and summarization.

Exam trap

Candidates often overlook the security and ownership implications, forgetting that child records in a Master-Detail relationship do not have their own owner field and inherit parent security.

15
Multi-Selecthard

An enterprise architect is evaluating data storage strategies for a telecommunications client experiencing rapid data growth of fifty million call detail records annually. Which TWO strategies should the architect implement to maintain database query performance and platform data limits? Choose 2 answers.

Select 2 answers
A.Store the call detail records in standard custom objects with indexes applied to all foreign keys.
B.Utilize Salesforce Big Objects to store historical call records asynchronously and index primary lookup keys.
C.Configure Salesforce Connect with OData adapters to federate call detail records from an external data lake.
D.Create hierarchical custom object structures linking every call record directly to the Account master object.
E.Rely on standard Salesforce report archives to automatically move historical records out of reporting tables.
AnswersB, C

Big Objects store billions of records on a separate, non-transactional index, so historical call detail records leave standard object storage and its limits. Asynchronous writes and indexed lookup keys keep queries performant while preserving the required access path.

Why this answer

When dealing with massive data volumes exceeding standard transactional limits, traditional custom objects will quickly degrade platform performance and storage capacity. Offloading historical analytical data to Salesforce Big Objects or external systems via Salesforce Connect preserves core transactional limits. Additionally, implementing strict data archiving strategies prevents data skew and maintains query optimization.

Exam trap

Candidates often suggest custom objects or external objects without considering the specific performance benefits of Big Objects for massive, non-transactional historical data sets.

16
MCQmedium

Which design approach is best for handling a 'Data Warehouse' requirement within Salesforce when dealing with millions of records?

A.Use standard objects and archive periodically.
B.Implement Big Objects for high-volume storage.
C.Store all data in a single custom object.
D.Use a custom field to store external reference IDs.
AnswerB

Big Objects are purpose-built for massive scale, allowing storage and querying of billions of records. They do not count against the standard record count limits and offer optimized performance for analytical queries. This is the optimal architecture for data-intensive requirements, ensuring that the CRM platform remains fast and responsive.

Why this answer

For high-volume data, architects should utilize Big Objects or External Objects to prevent hitting platform storage limits and performance degradation. Big Objects are specifically designed to store and query massive amounts of data efficiently. This strategy is vital for data management, as it keeps the core CRM performance high while still maintaining accessibility to historical archives needed for operational reporting or compliance purposes.

Exam trap

Candidates mistakenly suggest standard custom objects for long-term archiving of tens of millions of records, ignoring platform storage limits and data skew.

17
MCQmedium

An architect is designing a schema to store product information. Each product has many versions, and each version has many components. What is the most efficient way to model this relationship?

A.Flatten everything into one giant object with 100+ custom fields.
B.Use a JSON field to store the hierarchy as a string.
C.Model as three separate objects with Master-Detail relationships.
D.Create a separate object for every possible component.
AnswerC

A Master-Detail model enforces referential integrity and allows for easy aggregation of data through roll-up summaries. This hierarchy is the most efficient way to store, query, and manage complex product data. It ensures that every component is correctly linked to its parent version, which is linked to its parent product.

Why this answer

Creating a hierarchical relationship using lookup or master-detail fields on 'Product', 'Version', and 'Component' objects is the most scalable way to represent this structure. By isolating each layer, the architect ensures that reporting, security, and maintenance are simplified. This hierarchical model is cleaner than attempting to flatten the data, as it preserves parent-child integrity at every level.

Exam trap

Candidates frequently attempt to flatten the data into a single object or use too many lookups, failing to realize that Master-Detail relationships are necessary for proper hierarchical rollups and security.

18
MCQmedium

When designing a custom Data Model, when should an architect choose a 'Lookup' relationship over a 'Master-Detail' relationship?

A.When the child records must inherit the parent's security.
B.When the child record must have its own sharing settings.
C.When the child must be deleted when the parent is deleted.
D.When you need to create a Roll-up Summary field.
AnswerB

Lookup relationships are independent, allowing for granular sharing controls on both the parent and the child. If the business requirement demands that the child object has its own unique security rules separate from the parent, then a lookup relationship is the architecturally correct choice.

Why this answer

Lookup relationships offer flexibility where the parent and child records are logically distinct and can exist independently. This is ideal for scenarios where sharing is decoupled or when the child records should not be deleted upon parent deletion. By understanding these nuances, an architect avoids the 'cascading' consequences of Master-Detail relationships, which is vital for designing a loosely coupled, maintainable system that satisfies complex business requirements without unnecessary record interdependencies.

Exam trap

Candidates often choose Master-Detail relationships for convenience without considering that it forces child records to inherit parent sharing, which violates complex business security requirements.

19
MCQeasy

A healthcare company needs to store patient consent records that must be retained for ten years and are rarely accessed after the first year. The records include sensitive data and must be queryable by compliance officers using standard reports. Which storage strategy should the architect recommend?

A.Archive consent records to an external data warehouse and delete them from Salesforce after one year.
B.Store all consent records as standard custom object records and rely on Salesforce's default data retention.
C.Store consent records in a custom object with field history tracking enabled and purge old records annually.
D.Create a Big Object to store consent records and use Async SOQL or a custom index to query them for compliance reporting.
AnswerD

Big Objects are designed for long-term retention of large data volumes and support custom indexes for efficient queries. Compliance officers can query them through Async SOQL or by exposing them via a Lightning component, and the data remains in Salesforce without consuming standard data storage.

Why this answer

Big Objects are the Salesforce-native option for retaining large volumes of rarely accessed data for long periods while keeping it queryable. They do not consume standard data storage and support indexes for compliance queries. Standard custom objects, external warehouses, and field history tracking cannot simultaneously satisfy long-term retention and native reporting requirements.

Exam trap

The trap here is assuming field history tracking or external archiving preserves full records for compliance reporting, when only Big Objects keep them queryable in Salesforce long term.

20
MCQhard

Refer to the exhibit. The architect observes this error during bulk Opportunity updates. Which action resolves the issue while adhering to best practices?

A.Increase the SOQL query limit by contacting Salesforce Support.
B.Add a static variable to track if the query has been executed.
C.Move the query outside the loop and store results in a Map.
D.Change the trigger to run in a 'without sharing' context.
AnswerC

Moving the query outside the loop is the standard pattern for bulkifying Apex code. By fetching all necessary PricebookEntry records into a Map at once, the logic can access them in constant time without re-querying the database, effectively eliminating the risk of exceeding SOQL limits during bulk data processing.

Why this answer

The error indicates a SOQL query inside a loop, a common mistake in bulk operations. Moving the query outside the loop into a Map or List ensures that data is retrieved in a single call, optimizing performance and staying within governor limits. This is a crucial skill for architects to ensure that data models remain performant when processing high volumes of records in automated triggers.

Exam trap

Candidates often confuse SOQL injection prevention with bulkification, failing to recognize that querying inside a loop rapidly exhausts governor limits regardless of data syntax.

21
MCQhard

Refer to the exhibit. The query is part of a bulk apex process. What is the potential risk with this query in a large-scale data environment?

A.The query fails because nested SOQL is not supported.
B.The query will cause a SOQL injection vulnerability.
C.The query will hit governor limits if the result set is too large.
D.The query is invalid because it misses the 'FROM' clause.
AnswerC

Large result sets retrieved via nested queries consume significant heap space and CPU time. If the number of contacts associated with the queried accounts exceeds memory or CPU limits, the apex process will fail. Architects must use batch Apex or limit the result set to ensure reliability in large orgs.

Why this answer

The primary risk is hitting the SOQL 'Too many query rows' limit or 'CPU time' limit when joining large related datasets. While the query looks standard, processing the nested collection of contacts for 50,000 accounts can consume significant memory and CPU cycles. Architects must implement batching and pagination to ensure the process remains within governor limits and provides stable performance.

Exam trap

Candidates often assume that standard SOQL queries automatically scale infinitely in bulk contexts without considering row limits, memory footprints, or nested subquery processing overhead in large environments.

22
MCQmedium

Universal Containers notices severe locking issues and transaction failures when updating a parent Account object that has over 15,000 child records in a master-detail relationship. What is the fundamental architectural cause of this behavior?

A.The platform automatically generates criteria-based sharing recalculations for every child record.
B.Parent-level database locks occur and cascade down to evaluate child records, causing row-level contention.
C.Custom triggers on the child object execute recursively because of the master-detail cascading save mechanism.
D.Roll-up summary fields exceed maximum calculation limits when evaluating more than 10,000 records.
AnswerB

Parent-level row locks cascade to child records during master-detail updates, so the 15,000-child Account triggers lock contention across all dependent rows. This directly explains the severe locking and transaction failures described, since Salesforce acquires exclusive locks on the parent and its detail records within the same transaction.

Why this answer

Master-detail relationships enforce strict parent-level locking during record saves to maintain relational integrity and roll-up summary calculations. When a parent record is updated, the platform locks the parent and cascades lock checks across associated child records. Having thousands of children spikes the probability of database contention, leading directly to row-level locking exceptions and transaction failures.

Exam trap

Candidates frequently mistake locking issues for simple network timeouts or poor indexing, failing to recognize that master-detail relationships structurally cascade parent save locks down to thousands of child records.

23
MCQmedium

Refer to the exhibit. The Data Architect is tasked with ensuring that order status options are limited based on the geographic region of the order. Which feature should be used to implement this?

A.Record Types.
B.Validation Rules.
C.Dependent Picklists.
D.Custom Metadata Types.
AnswerC

Dependent picklists provide an intuitive UI experience by dynamically filtering available options based on the controlling field. This is the most efficient and standard way to restrict picklist values, ensuring users only select valid combinations without needing custom code or complex validation logic to maintain the data model.

Why this answer

Dependent picklists are the standard Salesforce mechanism for limiting the values of one picklist based on the selection of another. By defining a controlling field (Region) and a dependent field (Status), the architect ensures data entry accuracy and prevents invalid combinations of status and geography from being saved, which is vital for regional reporting and process consistency.

Exam trap

Candidates often look for complex automation or custom code solutions, failing to recognize that standard Dependent Picklists provide an out-of-the-box solution for filtering field values.

24
MCQhard

Universal Containers maintains a custom object, Shipment__c, that has a Master-Detail relationship to Account and a Lookup to Carrier__c. A Data Architect is asked to design a new object, Shipment_Line__c, that must always belong to exactly one Shipment__c, must inherit Shipment__c's sharing rules, and must not be independently owned by a different user. Which relationship type should be used between Shipment_Line__c and Shipment__c?

A.Hierarchical relationship, using the User object to control ownership and access to Shipment_Line__c.
B.Lookup, with a required field to Shipment__c and a sharing rule that grants access based on the Shipment__c owner.
C.Self-relationship on Shipment__c, with a field pointing to the parent Shipment__c record.
D.Master-Detail, with Shipment__c as the master and Shipment_Line__c as the detail.
AnswerD

Master-Detail makes the detail record dependent on the master, so a Shipment_Line__c cannot exist without a Shipment__c. The detail inherits the master's organization-wide defaults and sharing, and the detail's owner is effectively the master's owner, so it cannot be independently owned. This matches the stated requirements for containment, sharing inheritance, and ownership.

Why this answer

The requirement is true containment with inherited sharing and no separate ownership. A Master-Detail relationship enforces that the detail cannot exist without the master, rolls up the master's sharing and organization-wide defaults, and ties the detail's ownership to the master. A required lookup can approximate containment but leaves the child independently owned and separately shared, which violates the stated constraints.

Exam trap

The trap here is assuming that a required Lookup is functionally equivalent to Master-Detail for containment and sharing inheritance.

25
Multi-Selecthard

A Data Architect is designing a high-volume data model where an Account has millions of Child records. Which TWO strategies should be implemented to ensure optimal performance and avoid data skew?

Select 2 answers
A.Ensure that the owner of the parent records is not a single user or small group.
B.Convert all Lookup relationships to Master-Detail relationships to improve query speed.
C.Avoid using custom indexes on fields that have high cardinality.
D.Avoid creating parent-child relationships where the parent is a 'Person Account'.
E.Index the foreign key fields used for reporting and filtering.
AnswersA, E

When one user owns a large volume of child records, record locking can occur during updates to the parent record. Distributing ownership across multiple users helps alleviate contention, as the platform's locking mechanism is often tied to the parent record's owner and sharing rules in the underlying database.

Why this answer

Performance issues in Salesforce often arise from data skew, where a small number of parent records own a vast majority of child records. Implementing strategies like record ownership distribution and utilizing indexing on high-cardinality fields prevents row-level locking contention. These design patterns are critical for maintaining query performance and ensuring that API operations do not time out during large-scale data processing or complex analytical reporting cycles.

Exam trap

Candidates often propose increasing batch sizes or adding more hardware, failing to realize that data skew is a structural issue requiring redistribution of ownership or proper indexing.

26
MCQmedium

An organization has 50 million records in a custom object. They need to report on historical snapshots weekly. What is the best strategy to manage storage while keeping data available?

A.Use standard Salesforce objects
B.Use Big Objects
C.Move data to a sandbox
D.Use Platform Events
AnswerB

Big Objects allow for the storage and querying of massive datasets without impacting performance or standard data storage limits. They are specifically engineered to handle high volumes, making them the optimal choice for weekly snapshots that need to be queried but not frequently updated or edited.

Why this answer

Big Objects are designed for massive scale, supporting billions of records with optimized storage costs. By moving historical snapshot data to Big Objects, the organization retains accessibility for reporting via asynchronous queries or external tools without consuming standard Salesforce storage limits. This strategy preserves database performance for the active operational records while ensuring compliance and historical availability for long-term analytical business requirements.

Exam trap

Test-takers frequently choose standard reporting snapshots or standard archival objects, ignoring the massive scale of 50 million records which will quickly breach standard data storage limits.

27
MCQhard

An architect is designing a schema for a logistics org where each 'Shipment__c' record can be linked to many 'Carrier__c' records, and each Carrier can serve many Shipments. The business also needs to store the negotiated 'Rate__c' and 'Effective_Date__c' specific to each Shipment-Carrier pairing, and report on those values. Which data modeling approach should the architect use?

A.Create a self-referencing Lookup on Carrier__c that points to Shipment__c and use related lists for reporting.
B.Create two Lookup fields on Shipment__c, one to Carrier__c and one to a Rate__c object.
C.Use a single Lookup from Shipment__c to Carrier__c and store multiple carrier IDs in a long text field.
D.Create a Junction object 'Shipment_Carrier__c' with two Master-Detail relationships to Shipment__c and Carrier__c, plus Rate__c and Effective_Date__c fields.
AnswerD

A Junction object with two Master-Detail relationships is the standard Salesforce pattern for many-to-many relationships, and fields placed on the junction store attributes unique to each pairing. Rate__c and Effective_Date__c belong on the junction because they describe the Shipment-Carrier combination, and roll-up summaries and reports work naturally from the junction.

Why this answer

The many-to-many requirement with attributes unique to each pairing is the textbook case for a Junction object built from two Master-Detail relationships. Placing Rate__c and Effective_Date__c on the junction keeps pairing-specific data normalized and reportable, and the master-detail links provide integrity and roll-up options.

Exam trap

The trap here is putting pairing-specific attributes on one of the two parent objects instead of on the junction, which loses the per-combination meaning and breaks reporting.

28
MCQmedium

A healthcare provider's Salesforce org uses a custom object 'Care_Plan__c' with a Lookup to 'Patient__c'. Compliance now requires that a Care Plan cannot exist without a Patient, that the Patient record cannot be deleted while Care Plans reference it, and that each Care Plan should inherit the Patient's sharing settings. The team also needs a roll-up summary of active Care Plans on the Patient record. Which relationship change should the architect recommend?

A.Convert the Lookup on Care_Plan__c to a Master-Detail relationship with Patient__c as the master.
B.Create a Junction object between Patient__c and Care_Plan__c to enforce the dependency.
C.Change Care_Plan__c to a hierarchical relationship on Patient__c so deletion cascades from the parent.
D.Keep the Lookup and add a validation rule plus a Flow that prevents Patient deletion and writes sharing manually.
AnswerA

Master-Detail makes the child require a parent, blocks deletion of a referenced parent, lets the child inherit the parent's sharing, and enables roll-up summary fields on the parent. This single change satisfies every stated requirement without extra automation, which is why it is the appropriate design for this compliance scenario.

Why this answer

A Master-Detail relationship is the platform feature that natively enforces a required parent, prevents deletion of referenced parents, inherits the parent's sharing model, and supports roll-up summary fields. Converting the existing Lookup satisfies all compliance and reporting needs with declarative configuration rather than custom automation.

Exam trap

The trap here is assuming that validation rules and Flow can replicate every behavior of Master-Detail, when parent deletion blocking, sharing inheritance, and roll-up summaries are only native to Master-Detail.

29
MCQmedium

A Salesforce org has a custom object Invoice__c with a Lookup relationship to Account. The business now requires that every Invoice__c record must always have a valid Account, and deleting an Account must also delete its related invoices. The architect decides to change the relationship type to Master-Detail. Which statement describes a valid consequence of this change?

A.Invoice__c keeps its own sharing rules, and the Account lookup field must be manually marked as required in the field definition.
B.The Account field remains a lookup, but Salesforce automatically prevents deletion of an Account that has related Invoice__c records.
C.The Invoice__c object inherits the Account's sharing model, but the Account lookup field remains optional until a validation rule is created.
D.The Account field on Invoice__c automatically becomes required, and the Invoice__c records are deleted when their parent Account is deleted.
AnswerD

Converting a lookup to master-detail makes the parent reference mandatory and enforces cascade delete from the master record. In this scenario, every invoice must have an account, and deleting the account removes its invoices, which is exactly the requested behavior. This is the core difference between the two relationship types and directly satisfies both business requirements without additional configuration.

Why this answer

Master-detail relationships enforce two key behaviors: the parent field is required, and deleting the parent cascades to delete the children. The scenario needs both a mandatory Account on every invoice and deletion of invoices when an Account is removed. Those requirements are satisfied only by the master-detail model, while lookup relationships leave the parent optional and do not cascade delete by default.

Exam trap

The trap here is assuming that a lookup relationship can be made mandatory and cascade-delete simply by adding validation rules, when master-detail natively enforces both behaviors.

30
MCQmedium

A Salesforce architect is designing a data model for a recruiting application. A Candidate can apply to many Positions, and a Position can receive applications from many Candidates. For each application, the company needs to track the Application Date and the Source (for example, LinkedIn or Referral). Which data modeling approach should the architect use?

A.Create a junction object Application__c with master-detail relationships to both Candidate and Position, and add custom fields for Application Date and Source.
B.Create a lookup relationship from Candidate to Position and a lookup relationship from Position to Candidate.
C.Add two lookup fields on the Candidate object, one for Position and one for Application Date, and a text field for Source.
D.Create a custom object Application__c with lookup relationships to Candidate and Position, and use a validation rule to prevent duplicates.
AnswerA

A junction object with two master-detail relationships is the standard Salesforce pattern for many-to-many relationships. It allows each application to link one candidate and one position while storing attributes unique to that pairing, such as Application Date and Source. This design also provides cascade delete and sharing inheritance from both parents, which supports data integrity and security.

Why this answer

The many-to-many relationship between Candidate and Position requires a junction object. That object holds the two master-detail relationships and the fields that describe each application, such as Application Date and Source. Master-detail relationships on the junction enforce that every application has both a candidate and a position, and they provide cascade delete and sharing inheritance.

Other approaches either cannot store per-application attributes or do not enforce referential integrity.

Exam trap

The trap here is thinking that two lookup fields between the same objects can model many-to-many, when a junction object is required to store attributes of the relationship.

31
MCQmedium

Refer to the exhibit. An architect needs to track changes to the 'Status__c' field for auditing purposes. Based on the configuration provided, what is the best way to report on the duration a record spent in each status?

A.Use the built-in Field History report type.
B.Create a custom object to store status change logs with entry and exit timestamps.
C.Enable 'Custom History Tracking' in the Setup menu.
D.Use a formula field to calculate the duration.
AnswerB

Building a custom audit log object allows for capturing the precise time of entry and exit for every status change. This data structure supports complex reporting and aggregation, enabling users to generate metrics like 'Average Time in Status' which are otherwise impossible with standard Salesforce Field History.

Why this answer

Standard Field History Tracking records changes but does not store the duration between states effectively for analytics. Creating a secondary 'Audit' object that captures snapshots of status changes via a record-triggered flow is the best approach. This allows the architect to calculate intervals between timestamps using reporting tools or custom formulas, providing the necessary visibility into business process bottlenecks that native history tables cannot easily compute.

Exam trap

Candidates often suggest using standard Field History Tracking, which is not reportable for calculating duration between states, as it is designed for auditing, not analytical time-tracking.

32
MCQmedium

Which field type should be used for a primary key when integrating data from an external ERP system into Salesforce?

A.Text field
B.Auto-number field
C.External ID field
D.Formula field
AnswerC

An External ID field, marked as unique, is designed specifically for this integration use case. It allows the Upsert operation to identify existing records based on the ERP key, ensuring that data is updated correctly rather than creating duplicate entries during every data synchronization cycle.

Why this answer

External IDs are critical for data integration. By marking a field as an External ID and setting it to Unique, Salesforce enables the 'Upsert' operation. This prevents duplicate records by matching the external system's primary key to the Salesforce record, ensuring data consistency across disparate platforms.

This is the standard best practice for any integration involving master data management or synchronization between external systems and Salesforce.

Exam trap

Candidates frequently confuse standard ID fields with External ID fields, failing to realize that native Salesforce IDs are system-generated and cannot be used for external system integration mapping.

33
Multi-Selecthard

A Salesforce architect is designing a data model for a custom object 'Invoice__c' that will have a master-detail relationship to 'Account'. The architect needs to ensure that the data model supports efficient reporting and aggregation. Which two considerations are critical when designing this master-detail relationship? (Choose two.)

Select 2 answers
A.The child object inherits the sharing settings of the parent object.
B.The master-detail relationship can be converted to a lookup relationship at any time without restrictions.
C.The child object can have its own sharing rules independent of the parent.
D.Roll-up summary fields can be created on the parent object to aggregate child records.
E.The child object must have a lookup relationship to the parent instead of master-detail for roll-up summaries.
AnswersA, D

In a master-detail relationship, the child record's sharing is automatically determined by the parent's sharing settings. This means that if a user has access to the Account, they will have access to its Invoice records, unless overridden by other sharing mechanisms. This inheritance simplifies security management and is a critical consideration for data access design, making it a correct choice.

Why this answer

Master-detail relationships enforce sharing inheritance from parent to child and enable roll-up summary fields on the parent for aggregation. These two features are critical for designing efficient reporting and security. The other options describe limitations or incorrect behaviors, such as independent sharing rules or ease of conversion, which do not apply to master-detail relationships.

Exam trap

The trap here is assuming that child objects in a master-detail relationship can have their own sharing rules or that lookup relationships support roll-up summaries, which they do not.

34
MCQhard

A large university is modeling academic records in Salesforce. Each Course can be taught by multiple Instructors, and each Instructor can teach multiple Courses. The university must report on the aggregate number of Courses each Instructor is teaching per semester and enforce that an Instructor cannot be assigned to the same Course twice within the same semester. Which data modeling approach should the architect implement?

A.Store Instructor assignments as a multi-select picklist on the Course object and use a formula field to count selections.
B.Create a Lookup relationship from Course to Instructor and from Instructor to Course, then build a report to deduplicate overlapping assignments.
C.Create a junction object Course_Instructor__c with two Master-Detail relationships (to Course and Instructor) plus a semester field, and configure a unique composite key across Course, Instructor, and Semester.
D.Create a single Course_Instructor__c object with a Master-Detail to Course and a Lookup to Instructor, then use a validation rule to count existing records.
AnswerC

A junction object with two Master-Detail relationships natively models the many-to-many relationship and allows roll-up summary fields to count Courses per Instructor. Adding a semester field and a unique composite key enforces the business rule preventing duplicate assignments for the same Course, Instructor, and semester combination.

Why this answer

A junction object with two Master-Detail relationships is the standard Salesforce pattern for many-to-many relationships, and it enables roll-up summary fields on both parents. Adding a semester field and a unique composite key satisfies the duplicate-prevention rule. Reciprocal lookups, asymmetric relationships, and multi-select picklists cannot simultaneously support per-assignment attributes, aggregate reporting, and uniqueness enforcement.

Exam trap

The trap here is assuming a Lookup-based junction or picklist can enforce uniqueness and support roll-up summaries, when only two Master-Detail relationships on a junction object provide both.

35
MCQmedium

A company requires a data model to track 'Training Sessions' (which have many attendees) and 'Employees' (who attend many sessions). Which relationship is required to model this correctly?

A.A Lookup relationship from Employee to Training Session.
B.A Master-Detail relationship on the Employee object.
C.A junction object with two Master-Detail relationships.
D.A multi-select picklist on the Employee object.
AnswerC

The junction object pattern is the standard Salesforce solution for many-to-many relationships. By creating a 'Training Attendance' object with two Master-Detail relationships—one to the Employee and one to the Training Session—you enable robust reporting, cascade delete support, and proper data modeling for complex, multi-faceted business relationships between entities.

Why this answer

A many-to-many relationship is required to associate multiple Employees with multiple Training Sessions. This is implemented via a junction object. This pattern is fundamental in relational database design, as it resolves circular dependencies and allows for granular tracking of attendance, grades, or completion status per individual pairing, which cannot be achieved using simple lookups or single-parent structures on the employee or session records.

Exam trap

Candidates often confuse a junction object with a simple lookup, failing to realize that a junction object is required to bridge two objects in a many-to-many relationship.

36
MCQmedium

Which indexing strategy is best to improve performance for queries on a field used in multiple filters?

A.Use a formula field
B.Create a custom index
C.Use a text area field
D.Use a standard lookup
AnswerB

Custom indexes on high-cardinality fields directly address performance issues by allowing the query engine to pinpoint records without a full table scan. This is the optimal way to handle frequently filtered data, ensuring that queries remain performant even as the volume of records in the database grows.

Why this answer

Custom indexes are necessary when standard indexing is insufficient for complex filtering. By creating a custom index on high-cardinality fields used in 'WHERE' clauses, the optimizer can skip full table scans, drastically reducing query time. This is critical in large data volumes where even a small performance improvement in query speed can make the difference between a successful report and a timeout failure.

Exam trap

Test-takers frequently select standard indexing or search optimization features instead of recognizing that custom indexes are required for multi-filter query performance improvements.

37
MCQmedium

Universal Containers requires a many-to-many relationship between Projects and Consultants. They need to track specific attributes like 'Hourly Rate' and 'Assigned Role' on the relationship itself. Which approach should a Data Architect recommend?

A.Create a multi-select picklist on the Project object containing all available Consultants.
B.Implement a custom object that serves as a junction object between Projects and Consultants.
C.Add a lookup field on the Project object pointing to the Consultant object.
D.Use a custom metadata type to map consultants to projects.
AnswerB

The junction object pattern effectively resolves the many-to-many relationship while allowing custom fields such as 'Hourly Rate' and 'Role'. This approach leverages platform-native features for reporting and security, ensuring that each assignment record is uniquely identifiable and manageable through standard Salesforce list views and page layouts.

Why this answer

A Junction Object is the standard Salesforce solution for many-to-many relationships. By creating a custom object between Projects and Consultants, the architect can include extra fields to store metadata about the assignment. This design ensures referential integrity, enables robust reporting across both parent objects, and allows for security modeling via Master-Detail or Lookup relationships, which is essential for complex consulting resource management.

Exam trap

Candidates often suggest using a simple lookup or trying to force a standard relationship, missing the requirement to store extra metadata fields on the intersection of the two objects.

38
MCQeasy

A Salesforce architect is designing a data model for a custom object 'Case__c' that needs to track the priority of each case. The priority values must be limited to a predefined list: Low, Medium, High, and Critical. Users should be able to select only one value, and the values should be easily reportable. Which field type should be used?

A.Picklist
B.Lookup relationship to a custom object 'Priority__c'
C.Text field with a validation rule
D.Multi-select Picklist
AnswerA

A Picklist field allows users to select a single value from a predefined list of options. It is easily reportable, as each value is stored as a string and can be used in filters and groupings. This exactly matches the requirement to limit values to Low, Medium, High, and Critical and to allow only one selection, making it the correct choice.

Why this answer

A Picklist field is designed to allow a single selection from a predefined list of values, making it ideal for the priority field. It is easily reportable and enforces the one-value constraint. The other options either allow multiple selections, require custom validation, or introduce unnecessary complexity with a custom object.

Exam trap

The trap here is assuming that a Multi-select Picklist or a custom object lookup is needed for a simple single-select list, when a standard Picklist suffices.

39
MCQmedium

A financial services org needs to record every change to the 'Credit_Score__c' field on Contact for regulatory audit, including the prior value, the new value, the user, and the timestamp. The data volume is moderate and auditors query the history by Contact. Which approach should the architect recommend?

A.Use a before-save Flow to copy the previous Credit_Score__c value into a text field on Contact for comparison.
B.Enable Change Data Capture on Contact and subscribe to the event channel from an external system.
C.Enable Field History Tracking on Credit_Score__c and expose the related history list on the Contact page layout.
D.Create a custom object 'Credit_Score_Audit__c' with a Flow that inserts a record on every Contact update.
AnswerC

Field History Tracking natively stores the old value, new value, user, and timestamp for tracked fields, and the history related list is queryable and reportable. For a moderate-volume audit need focused on a specific field, this is the standard declarative solution and requires no custom object or automation.

Why this answer

Field History Tracking is purpose-built to capture old value, new value, user, and timestamp for selected fields, and it surfaces that data in a related list that auditors can query and report on. For a moderate-volume regulatory need on a specific field, it avoids the overhead of a custom audit object or streaming integration.

Exam trap

The trap here is assuming a custom audit object or Flow is required for compliance, when native Field History Tracking already records old and new values with user and timestamp.

40
MCQhard

An architect is modeling a case management system where a single Case may be linked to many Product records, and each Product may appear on many Cases. The business needs to report on the quantity and discount negotiated for each Case-Product pairing. Which design should the architect implement?

A.Create a junction object with two Master-Detail relationships, one to Case and one to Product, and add Quantity and Discount fields to the junction object.
B.Create a custom object named CaseProduct with a single Lookup to Case and a text field storing a comma-separated list of Product IDs.
C.Create a junction object with two Lookup relationships, one to Case and one to Product, and add Quantity and Discount fields to the junction object.
D.Create a Lookup relationship from Case to Product and a Lookup relationship from Product to Case.
AnswerA

A junction object with two Master-Detail relationships is the standard Salesforce pattern for many-to-many relationships. Each junction record links one Case to one Product, and fields such as Quantity and Discount live on that junction record, so the negotiated values for every pairing are stored and reportable. The junction inherits sharing from both masters and is deleted if either master is deleted.

Why this answer

Many-to-many relationships in Salesforce are modeled with a junction object that has two Master-Detail relationships. The junction record represents the association itself, which is exactly where pairing-specific attributes such as Quantity and Discount belong. Because both relationships are Master-Detail, the junction inherits sharing from both parents and is automatically deleted when either parent is removed, preserving referential integrity.

Exam trap

The trap here is believing that a junction object with two Lookup relationships is functionally equivalent to one with two Master-Detail relationships, when only the Master-Detail version enforces required parents and cascade deletion.

41
MCQmedium

A Salesforce architect is designing a data model for a custom object that must support a strict one-to-many relationship where each child record must have a parent, and the parent's sharing settings should automatically control child record access. The architect also needs to ensure that deleting a parent cascades to delete all related children. Which relationship type should be used?

A.Hierarchical relationship
B.Master-detail relationship
C.Lookup relationship with required field and cascade delete
D.Many-to-many relationship via junction object
AnswerB

Master-detail relationships enforce that every child record must have a parent, inherit the parent's sharing settings, and automatically cascade delete child records when the parent is deleted. This exactly matches the requirements for strict one-to-many, controlled sharing, and cascade deletion. It is the correct choice because it provides all three needed behaviors natively without workarounds.

Why this answer

A master-detail relationship is the only standard relationship that enforces a required parent, inherits the parent's sharing settings, and automatically deletes children when the parent is deleted. The other options either lack sharing inheritance, are limited to User, or model a different cardinality. Therefore, the master-detail relationship meets all stated requirements without custom automation.

Exam trap

The trap here is assuming that a lookup relationship with a required field and cascade delete can replicate master-detail sharing inheritance and mandatory parent enforcement.

Ready to test yourself?

Try a timed practice session using only Data Modeling and Database Design questions.