advancedTop 15 Database Design Questions
Design a healthcare appointment system with HIPAA compliance.
patients(id UUID PK, name_encrypted BYTEA, ssn_encrypted BYTEA, dob DATE, created_at) — encrypt PII at application level doctors(id, license_number UNIQUE, specialty, department_id FK) appointments(id, patient_id FK, doctor_id FK, scheduled_at TIMESTAMPTZ, status, notes_encrypted BYTEA) audit_log: every SELECT/INSERT/UPDATE/DELETE logged with user_id, patient_id, timestamp, action Row-Level Securi
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response