Databricks Data Engineer Professional exam dumps

Databricks Data Engineer Professional practice question 126 of 313

Databricks Certified Data Engineer Professional. Professional level, Databricks. Free question with the correct answer and a full explanation.

Databricks Data Engineer Professional Question 126

Single answer

A data engineering team is tasked with designing a Delta Lake schema for an e-commerce application. The application tracks users' orders and their corresponding payment details. The team decides to create two Delta tables: 'orders' and 'payments'. Each order can have multiple corresponding payments. Which approach should the team take to model the relationship between these tables in Delta Lake?

  1. A

    Add a foreign key column in the 'payments' table that references the primary key of the 'orders' table.

  2. B

    Merge the 'orders' and 'payments' tables into a single table to simplify the schema.

  3. C

    Use a composite primary key in the 'payments' table that includes the order ID and payment ID.

  4. D

    Create a join table to model the many-to-many relationship between 'orders' and 'payments'.

Show answer and explanation

Correct answer: A

Explanation

In Delta Lake, designing schemas that follow normalization principles ensures scalability and maintainability. Since each order can have multiple payments, the appropriate way to model this one-to-many relationship is to add a foreign key column in the 'payments' table that references the primary key of the 'orders' table. This approach avoids redundancy and ensures data integrity.

  • A. Correct.

    This is the correct approach because it models the one-to-many relationship between 'orders' and 'payments' by using a foreign key in the 'payments' table that references the 'orders' table.

  • B. Incorrect.

    Merging the tables into a single table is not recommended for this use case because it violates normalization principles and makes the schema harder to maintain.

  • C. Incorrect.

    While a composite primary key might be useful in some scenarios, it is not necessary here as only a foreign key is required to establish the relationship.

  • D. Incorrect.

    A join table is unnecessary because the relationship between 'orders' and 'payments' is not many-to-many; it is one-to-many.

Timed practice exam

Take a Databricks Data Engineer Professional practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam