Given the entities: Course (c_id, c_name, total_credit) Program (prog_no, prog_name) Assuming a relationship where a Course can be part of multiple…

Given the entities:

  • Course (c_id, c_name, total_credit)
  • Program (prog_no, prog_name)

Assuming a relationship where a Course can be part of multiple Programs, but a Program contains only one Course:

  • Draw an ER Diagram (ERD).
  • Write the relational Database Schema including primary and foreign keys.

From the BUET MSC (CSE) October 2026 – Written exam, question 9 of 14.

Answers (1)

A Course can be in many Programs, but each Program has only one Course: a one-to-many relationship from Course to Program.

ER diagram

+------------------+         1 : N          +-----------------+
|      COURSE      |---------< has >--------|     PROGRAM     |
|  c_id (PK)       |  (1)               (N) |  prog_no (PK)   |
|  c_name          |                        |  prog_name      |
|  total_credit    |                        |                 |
+------------------+                        +-----------------+

Relational schema

  • Course (c_id PRIMARY KEY, c_name, total_credit)
  • Program (prog_no PRIMARY KEY, prog_name, c_id NOT NULL, FOREIGN KEY (c_id) REFERENCES Course(c_id))

The foreign key goes on the “many” side: each Program row names its single Course, and one Course can be referenced by many Programs.

— rhs

More from this paper