FC0-U71 Data and Database Fundamentals Practice Question
A hospital stores patient records in a relational database. Administrators need to record that a patient can have multiple allergies, and each allergy may affect multiple patients. Which type of relationship exists between patients and allergies, and how is it implemented?
⚠ Common exam trap
The trap here is assuming that adding a foreign key to one of the two tables can represent a many-to-many relationship, when only a junction table correctly models both directions of the association.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Many-to-many, implemented with a junction table containing foreign keys to both patients and allergies.
Because a patient can have several allergies and an allergy can affect several patients, the relationship is many-to-many. The standard relational solution is a junction table that holds foreign keys to both the patients and allergies tables, enabling flexible associations and preserving referential integrity without duplicating data in either primary table.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
One-to-many, implemented by adding a foreign key to the allergies table.
Why it's wrong here
A one-to-many relationship would model one patient having many allergies but would not allow a single allergy to be associated with multiple patients. Placing a foreign key in the allergies table would tie each allergy record to one patient, which fails the requirement that an allergy may affect multiple patients.
- ✗
Many-to-many, implemented by storing a comma-separated list of allergy names in the patients table.
Why it's wrong here
Storing a comma-separated list violates normalization principles and makes it difficult to query, update, or enforce referential integrity. While it superficially represents multiple allergies per patient, it cannot efficiently support the reverse relationship of one allergy affecting many patients, and it prevents the database from validating allergy values against a reference table.
- ✗
One-to-one, implemented by adding a foreign key to the patients table.
Why it's wrong here
A one-to-one relationship means each patient relates to exactly one allergy record, which contradicts the scenario where a patient can have multiple allergies. Adding a foreign key to the patients table would allow only a single allergy reference per patient unless additional columns are added, so it cannot represent the many allergies each patient may have.
- ✓
Many-to-many, implemented with a junction table containing foreign keys to both patients and allergies.
Why this is correct
A many-to-many relationship correctly describes patients who can have multiple allergies and allergies that can affect multiple patients. It is implemented by creating a junction table with foreign keys referencing the primary keys of both the patients and allergies tables, allowing any combination of patient and allergy to be recorded.
Go deeper
Related to this question
About these practice questions
This FC0-U71 question is part of Courseiva's 988-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.