Solution | OA Exam | Database Applications | Pass
Guaranteed - A+ Graded
SECTION 1: DATABASE DESIGN & ENTITY-RELATIONSHIP (ER)
MODELING (Q1-15)
Q1. A university database tracks students, courses, and enrollments. Each student can
enroll in multiple courses, and each course can have multiple students. What type of
relationship exists between Student and Course entities?
A. One-to-One (1:1)
B. One-to-Many (1:M)
C. Many-to-Many (M:N)
D. Zero-to-Many (0:M)
C. Many-to-Many (M:N) [CORRECT]
Rationale: When each instance of Entity A can relate to multiple instances of Entity B
and vice versa, this defines a many-to-many relationship. This requires a
junction/associative table to resolve in a relational database.
Q2. In an ERD, the cardinality notation "1..1" on one side of a relationship and "0..*" on
the other side indicates:
A. One-to-One mandatory relationship
B. One-to-Many optional relationship
C. Many-to-Many mandatory relationship
D. Zero-to-One optional relationship
,B. One-to-Many optional relationship [CORRECT]
Rationale: "1..1" means exactly one instance is required, while "0..*" means zero to many
instances. This represents a one-to-many relationship where participation on the "many"
side is optional (modality 0).
Q3. Which of the following best describes a composite key?
A. A primary key that automatically increments with each new record
B. A primary key composed of two or more attributes that uniquely identify a record
C. A foreign key that references multiple primary keys in different tables
D. A unique constraint applied to a single non-primary attribute
B. A primary key composed of two or more attributes that uniquely identify a record
[CORRECT]
Rationale: A composite key consists of multiple columns combined to form a unique
identifier. For example, in an enrollment table, (StudentID, CourseID, Semester) together
could form a composite primary key.
Q4. Consider the following ERD scenario: An EMPLOYEE entity has attributes
EmployeeID, FirstName, LastName, DepartmentID, and HireDate. DepartmentID
references the DEPARTMENT entity. Which statement is true?
A. EmployeeID is a foreign key and DepartmentID is a primary key
B. DepartmentID is a foreign key referencing DEPARTMENT's primary key
C. HireDate should be the primary key because it is unique for each employee
D. Both EmployeeID and DepartmentID together form the primary key
B. DepartmentID is a foreign key referencing DEPARTMENT's primary key [CORRECT]
Rationale: DepartmentID in the EMPLOYEE table is a foreign key that establishes the
relationship to the DEPARTMENT table. EmployeeID is the primary key of EMPLOYEE,
and foreign keys reference primary keys in other tables.
,Q5. In Crow's Foot notation, which symbol indicates a "many" cardinality?
A. Single vertical line (|)
B. Circle (O)
C. Crow's foot symbol (three prongs)
D. Diamond shape
C. Crow's foot symbol (three prongs) [CORRECT]
Rationale: In Crow's Foot notation, the three-pronged "crow's foot" symbol indicates
"many" cardinality. A single vertical line indicates "one," and a circle indicates optional
participation (zero).
Q6. A database for a hospital needs to track patients, doctors, and appointments. Each
appointment involves exactly one patient and exactly one doctor. The relationship
between PATIENT and DOCTOR through APPOINTMENT is:
A. 1:1 between Patient and Doctor
B. 1:M between Patient and Doctor
C. M:N between Patient and Doctor, resolved through APPOINTMENT
D. 1:M between Patient and Appointment only
C. M:N between Patient and Doctor, resolved through APPOINTMENT [CORRECT]
Rationale: A patient can have appointments with multiple doctors, and a doctor can
have appointments with multiple patients. This many-to-many relationship is resolved
through the APPOINTMENT associative/junction entity.
Q7. Which attribute would be the most appropriate primary key for an INVOICE entity?
A. InvoiceDate
B. CustomerName
C. InvoiceNumber (system-generated unique identifier)
D. TotalAmount
, C. InvoiceNumber (system-generated unique identifier) [CORRECT]
Rationale: A primary key must be unique and non-null. InvoiceDate, CustomerName, and
TotalAmount can all repeat across records. A system-generated InvoiceNumber
guarantees uniqueness and stability.
Q8. In an ERD, modality refers to:
A. The number of attributes in an entity
B. Whether participation in a relationship is mandatory or optional
C. The data type of the primary key
D. The number of relationships an entity participates in
B. Whether participation in a relationship is mandatory or optional [CORRECT]
Rationale: Modality (minimum cardinality) indicates whether an entity must participate
in a relationship (mandatory, shown as 1) or may optionally participate (optional, shown
as 0). Cardinality refers to maximum participation.
Q9. A library database has BOOK, AUTHOR, and BOOK_AUTHOR entities.
BOOK_AUTHOR contains BookID and AuthorID. What is BOOK_AUTHOR called?
A. Weak entity
B. Associative entity (junction table)
C. Supertype entity
D. Derived entity
B. Associative entity (junction table) [CORRECT]
Rationale: BOOK_AUTHOR is an associative entity (or junction/link table) that resolves
the many-to-many relationship between BOOK and AUTHOR. It contains foreign keys
from both parent entities, often forming a composite primary key.
Q10. Which of the following violates the principles of good database design?