Scenario: A company wants to ensure that every order placed in their system has a corresponding customer. Which type of constraint would you apply to the order table to enforce this rule?
- Check Constraint
- Foreign Key Constraint
- Primary Key Constraint
- Unique Constraint
To ensure that every order has a corresponding customer, you would apply a Foreign Key Constraint to the order table. This constraint establishes a link between the order table and the customer table, preventing orders without a matching customer.
Loading...
Related Quiz
- What is the effect of indexing on database performance?
- Scenario: An e-commerce website's database struggles to handle concurrent user requests, leading to high latency and downtime. How would you optimize the database to improve its scalability and responsiveness?
- Scenario: An online store has customers and orders. Each customer can place multiple orders, but an order must belong to one customer. What cardinality and modality does this scenario illustrate?
- The primary query language used in document-based databases is _______.
- Scenario: A financial institution's database experiences frequent deadlock issues, impacting transaction throughput and system reliability. How would you mitigate these issues and ensure optimal database performance?