Amar Saleh Week#2
Amar Saleh Week#2
Class:CIS23
Professor:Emma
Date 7/6/2025
Scenario: for a database for a university, let us assume that we want to keep
information about students, the classes they are enrolled in, the faculty who
teach those classes.
Requirement:
1.a (10 points). Create an E-R/UML diagram to show how the entity sets and the
relationship to other entity sets would be represented and include attributes.
Indicate primary keys. Stating any necessary assumptions, make a decision
about the cardinality and participation constraints of the relationship, and add
appropriate symbols to the E-R diagram.
1.b (5 points). Based on task1.a, we also want to include the textbooks used,
represent departments that employ the faculty members, and show the
relationship between department and students. Making up attributes as needed,
add the entity sets and appropriate relationship(s) to the E-R diagram.
Entities and Attributes:
Task #1 1-A
● Classes (with class time, day of the week, teacher name, class ID)
● Each entity has a primary key (like student ID for students, faculty ID for faculty, class ID
for classes).
Participation:
So I added:
Primary keys:
● Textbook: ISBN
Participation/Constraints:
Each class we used at least one textbook (total participation on class side)
Each faculty member must belong to one department (total participation for faculty,
partial for department)
We will start with rectangles for entities, and ovals for their attributes, marking primary
keys clearly.
Entities
PATIENT
● Patient_ID (PK)
● Name
● DOB
● Address
● Phone
PHYSICIAN
● Physician_ID (PK)
● Name
● Specialty
● Phone
PRESCRIPTION
● Prescription_ID (PK)
● Date_Issued
● Patient_ID (FK)
● Physician_ID (FK)
VISIT
● Visit_ID (PK)
● Date
● Time
Prescription_ID (FK)
● Therapist_ID (FK)
● Treatment_ID (FK)
● Equipment_ID (FK)
THERAPIST
● Therapist_ID (PK)
● Name
● Qualification
TREATMENT
● Treatment_ID (PK)
● Name
● Description
#PATIENT 1 — PRESCRIPTION
PHYSICIAN 1 — PRESCRIPTION
# PRESCRIPTION 1 — VISIT
VISIT 1 — 1 TREATMENT
VISIT 1 — 1 EQUIPMENT
Design a relational database schema for the data described in task1 (include 1.a and
1.b). Please submit the relational schema using Word Document, not on MySQL
Server.
Design a relational database schema for the data described in task2. Please
submit the relational schema using Word Document, not on MySQL Server.
- Attributes:
2. PHYSICIAN
● Attributes:
● Physician_ID: Primary Key
● Physician_Name: Name of the Physician
● specialty: Area of Specialization
● phone: Contact Number
3. TREATMENT
● Attributes:
● Treatment_PK: Primary Key
● Description: Details of the Treatment
● Cost: Associated cost
4. **PRESCRIPTION**
Attributes:
5. THERAPIST
Attributes:
Relationships:
-PATIENT and PHYSICIAN are indirectly linked through PRESCRIPTION which has
Foreign Keys referencing both tables.
THERAPIST: seems to act independently in the current setup, with no direct relationship
to other entities provided, attributes to establish relationships.