At very large scale, some teams drop foreign keys and enforce integrity at the application layer.

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

At very large scale, some teams drop foreign keys and enforce integrity at the application layer.

Explanation:
The idea being tested is where data integrity checks are performed in a system at scale. Dropping database-level foreign keys and enforcing the rules in the application layer is a strategy to improve write throughput and scalability across distributed components. Foreign keys enforce referential integrity inside the database, which can add locking and cross-table coordination overhead. By moving the responsibility to the application, services can operate more independently and often rely on eventual consistency, with the app validating references, handling cascades, and triggering compensating actions as needed. This makes integrity enforcement at the application level the best fit for the described approach. Denormalization is about duplicating data for performance, and primary keys refer to identity within a table, not where constraints are enforced.

The idea being tested is where data integrity checks are performed in a system at scale. Dropping database-level foreign keys and enforcing the rules in the application layer is a strategy to improve write throughput and scalability across distributed components. Foreign keys enforce referential integrity inside the database, which can add locking and cross-table coordination overhead. By moving the responsibility to the application, services can operate more independently and often rely on eventual consistency, with the app validating references, handling cascades, and triggering compensating actions as needed. This makes integrity enforcement at the application level the best fit for the described approach. Denormalization is about duplicating data for performance, and primary keys refer to identity within a table, not where constraints are enforced.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy