Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


What type of relationship would you use if the child record needs to be independently queried from the parent but still needs a link?

  1. Lookup relationship.

  2. Master-Detail relationship.

  3. Self-relationship.

  4. Hierarchical relationship.

The correct answer is: Lookup relationship.

Using a lookup relationship is indeed the right choice for a scenario where the child record needs to be independently queried from the parent, while still maintaining a link between the two. Lookup relationships are flexible and allow for a loose coupling of records, making them suitable when you want to maintain a relationship without strong dependencies. In a lookup relationship, the child record can exist independently of the parent record. This means that if you delete the parent, the child records will remain unaffected, allowing you to query them alone without needing to reference the parent. Additionally, you can create reports and perform searches based solely on the child record. This characteristic distinguishes a lookup relationship from other types, such as master-detail relationships, where the child record is tightly bound to the parent. In a master-detail relationship, if the parent is deleted, all child records are also deleted, which does not align with the need for independent querying. Self-relationships and hierarchical relationships serve more specific purposes and do not fit the requirement of having a distinct child record that can be queried independently while still being linked to the parent.