Scenario: In a university database, each student has a unique ID. What type of constraint would you use to enforce this uniqueness?
- Check Constraint
- Foreign Key Constraint
- Primary Key Constraint
- Unique Constraint
To enforce the uniqueness of each student's ID in a university database, you would use a Primary Key Constraint. This constraint ensures that each value in the specified column is unique, and it is typically applied to the student ID column.
Loading...
Related Quiz
- Scenario: A banking system stores customer information and transaction records. How would you ensure data integrity in such a system?
- The _______ is used to represent the relationship between a subclass and its superclass in an ERD.
- Scenario: A startup company with limited resources is looking for a cost-effective solution for database design and management. They prioritize ease of use and flexibility. Which database design tool would be most suitable for their needs, and what features make it a good choice?
- Scenario: You are building a recommendation engine for a streaming service where users' viewing histories and preferences need to be analyzed. Which NoSQL database type would be most suitable for this scenario and why?
- What does a unique key constraint ensure in a database table?