Unable to open this exercise
Common exam pitfall
Students often think person names can serve as primary keys, forgetting that people can share identical names.
A primary key uniquely identifies each record in a table. Its values must not be duplicated or missing. A person's name is usually unsuitable because different people can share a name. A unique MemberID is more dependable.
Worked example
Two records have Name="Alex Lee" but MemberID values 104 and 105. The keys are unique even though the names match. A key constraint prevents duplicate key values; it does not prove the two records describe different real people.
Validation checks whether input meets a rule, not whether it is true. A presence check can require a name, a range check can limit age, and a format check can check the layout of an identifier. A validly formatted wrong date may still pass.
Independent design
Choose a primary key for a school library's books when several copies share a title. Explain why a separate copy identifier is needed. Choose a validation rule for a publication year and explain one incorrect value that could still pass it.
This course's core database tasks use a single table. Multiple-table relationships and advanced key taxonomy are optional later study.
AI Socratic Tutor
Need guidance? Ask a question or use the hint below.
AI Socratic Tutor is an All-Access Benefit
Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.
You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.
Exam-Style Check: Primary Key Constraints and Selection
• Multiple ChoiceA database table stores medical records for 5,000 hospital patients. The designer considers using the patient's FullName as the primary key.
Why is FullName unsuitable as a primary key, and what field should be used instead?
Interactive exercises for Module 2 and beyond require an active plan.