0% found this document useful (0 votes)
12 views5 pages

CSC 307 Assignment

The document outlines two assignments related to database management, focusing on designing Entity Relationship (ER) models for a small medical unit and an airline reservation system. The first assignment details attributes and relationships for patients, office visits, prescriptions, bills, payments, and doctors, emphasizing comprehensive tracking and relational integrity. The second assignment involves creating an ER diagram for an airline reservation system, including passengers, flights, departure gates, and flight seats.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

CSC 307 Assignment

The document outlines two assignments related to database management, focusing on designing Entity Relationship (ER) models for a small medical unit and an airline reservation system. The first assignment details attributes and relationships for patients, office visits, prescriptions, bills, payments, and doctors, emphasizing comprehensive tracking and relational integrity. The second assignment involves creating an ER diagram for an airline reservation system, including passengers, flights, departure gates, and flight seats.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Name: Gbejegbe Eugene Tejiri

Matric Number: SCI22CSC121


Course Code: CSC 307-Database Management
Department: Computer Science
ASSIGNMENT 1
 Design an Entity Relationship model for the patient population of a small
medical unit, the database most reflect patients, office visits,
prescriptions, bills and payments. Explain your choice of attributes and
relationships.

ER Model for Small Medical Unit


Choice of Attributes

1. Patient:

 Patient ID (PK): A unique identifier ensures every patient is


distinct. This is critical for linking the patient to visits, prescriptions,
bills, and payments.
 FirstName, Last Name: These are necessary for identifying and
addressing the patient.
 Date Of Birth: Used for calculating the patient’s age and for
medical and demographic purposes.
 Gender: Important for understanding patient demographics and
tailoring treatment.
 Contact Number: Necessary for communication purposes, such as
scheduling or follow-ups.
 Address: Used for correspondence or emergencies.
 Insurance Details: Helps in determining the method of payment
and billing procedures.

2. Office Visit:

 Visit ID (PK): Unique identifier for each visit to distinguish between


multiple visits by the same patient.
 Patient ID (FK): Links the visit to the associated patient.
 Visit Date: Tracks when the visit occurred.
 Reason For Visit: Captures the purpose of the visit (e.g., routine
check up, specific symptoms).
 Doctor ID (FK): Links to the doctor managing the visit.

3. Prescription:

 Prescription ID (PK): Unique identifier for each prescription.


 Visit ID (FK): Associates the prescription with the specific visit
during which it was issued.
 Medicine Name: Specifies the drug prescribed.
 Dosage: Indicates how much of the drug the patient should take.
 Duration: Details the length of time the prescription is to be
followed.

4. Bill:

 Bill ID (PK): Unique identifier for each bill, critical for tracking
financial records.
 Visit ID (FK): Associates the bill with the visit it covers.
 Total Amount: Specifies the total charges for the visit, including
consultation, tests, and procedures.
 Billing Date: The date the bill was generated.
 Payment Status: Tracks whether the bill is paid, unpaid, or partially
paid.

5. Payment:

 Payment ID (PK): Unique identifier for each payment transaction.


 Bill ID (FK): Links the payment to a specific bill.
 Payment Date: Captures when the payment was made.
 Payment Amount: Indicates the amount paid in the transaction.
 Payment Method: Specifies the method (e.g., cash, credit card,
insurance).

6. Doctor:

 Doctor ID (PK): Unique identifier for each doctor.


 FirstName, Last Name: Used to identify the doctor.
 Specialization: Captures the doctor’s area of expertise, such as
cardiology or paediatrics, for assigning relevant cases.

Choice of Relationships
1. Patient ↔ Office Visit (1-to-Many):

A patient can have multiple visits, but each visit belongs to only one
patient.

This relationship is necessary for tracking all visits made by a patient for
a complete medical history.

2. Office Visit ↔ Prescription (1-to-Many):

An office visit may result in multiple prescriptions (e.g., antibiotics, pain


relievers), but each prescription is linked to a single visit.

This relationship ensures that all medications are tied to the specific
reason for the visit.
3. Office Visit ↔ Bill (1-to-1):

Each office visit generates one bill, and each bill corresponds to one
specific visit.

This relationship is important for financial accountability and ensures


every visit has associated charges.

4. Bill ↔ Payment (1-to-Many):

A bill can be paid in multiple transactions (e.g., partial payments), but


each payment corresponds to one bill.

This relationship supports detailed financial tracking and accommodates


diverse payment scenarios.

5. Doctor ↔ Office Visit (1-to-Many):

A doctor can oversee multiple visits, but each visit is managed by only
one doctor.

This relationship ensures accountability for medical care provided during


the visit.

Overall Design Rationale


The chosen attributes and relationships ensure:

 Comprehensive tracking: All patient interactions, treatments, and


financial details are accounted for.
 Scalability: The model accommodates scenarios like multiple
prescriptions, payments, and visits without redundancy.
 Relational Integrity: Primary and foreign keys enforce connections
between entities, maintaining data consistency.
 Operational Efficiency: The design supports efficient query
execution for patient histories, billing reports, and more.
ASSIGNMENT 2
 Consider a simple airline reservation database handling (only) outgoing
flights from one airline terminal. Then keep track of passengers, flights,
departure gates and flight seats. Use the Entity Relationship Diagram to
illustrate this concept.

AIRLINE RESERVATION SYSTEM ERD

You might also like