Database schema for a doctor’s office

December 4, 2026 · Team EasyExamNotes · 2 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-502 DBMS November 2022 solved question paper

RGPV CS-502 (GS) | November 2022 | Q1(b) | 7 marks

Question (restated): Design a clinic database supporting immediate access to medical records and accurate insurance billing.

Answer

Database schema for a doctor’s office
Database schema for a doctor’s office

A clinic database should separate patient identity, clinical encounters, insurance coverage and financial claims. The design must support fast retrieval while protecting confidential clinical information.

Relational schema

Relation Attributes (PK first)
Patient PatientID, Name, DOB, Contact
Doctor DoctorID, Name, Specialty
Visit VisitID, PatientID (FK), DoctorID (FK), VisitDate, Diagnosis
Prescription PrescriptionID, VisitID (FK), Drug, Dose
Insurer InsurerID, Name, BillingAddress
Policy PolicyID, PatientID (FK), InsurerID (FK), ValidFrom, ValidTo
Claim ClaimID, VisitID (FK), PolicyID (FK), Amount, Status
Payment PaymentID, ClaimID (FK), Amount, PaymentDate

Each patient can have many visits and policies. Each visit belongs to one patient and doctor and may have multiple prescriptions. A claim links a visit to the applicable policy; payments are recorded separately to support partial settlement.

Integrity and access

Primary keys prevent duplicate identities. Foreign keys prevent orphan visits and claims. A claim must refer to a policy belonging to the patient in the visit, valid on the visit date; this cross-table rule can be enforced by application logic or a database trigger. Indexes on Visit(PatientID, VisitDate) and Claim(Status) support clinical and billing workflows.

SELECT VisitDate, Diagnosis FROM Visit
WHERE PatientID = 101 ORDER BY VisitDate DESC;
SELECT ClaimID, Amount FROM Claim WHERE Status = 'PENDING';

Doctors should have access to relevant clinical records; billing clerks need policy and claim details, not unrestricted medical notes. Role-based privileges, audit logs, encrypted communication and backups are important. In an illustrative visit, a ₹1,000 claim with ₹800 insurer payment leaves ₹200 outstanding, subject to policy rules. The schema avoids duplicate billing by assigning unique claim identifiers and checking claim status before submission.

Further reading: Silberschatz, Korth and Sudarshan, Database System Concepts.

← RGPV CS-502 DBMS November 2022 solved question paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion