uw-ssec / post-disaster-comms

Repository for the Post Disaster Comms Project
https://pdc-ssec.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

chore: Update DBDiagram with new checklist schema #177

Closed nikiburggraf closed 3 weeks ago

nikiburggraf commented 3 weeks ago

https://dbdiagram.io/d/PDC-Database-66abcd508b4bb5230efde1c3

whiteboard

lsetiawan commented 3 weeks ago

As of 11/1/2024, I've updated the db schema

Screenshot 2024-11-01 at 10 04 12 AM

lsetiawan commented 3 weeks ago

ChatGPT Evaluation of schema:

The DBML schema provided is well-structured, with a clear separation of checklist entities, steps, recurrence types, and user associations. Here are some strengths and potential areas for improvement:

Strengths

  1. Modular Design: The schema is modular, with separate tables for checklist steps, priorities, user associations, and recurrence, which makes it scalable and easier to maintain.

  2. Flexible Recurrence Handling: The recurring_type table allows defining custom recurrence types. This approach is flexible and can easily accommodate new types if the recurrence options expand beyond daily, weekly, monthly, and yearly.

  3. Checklist Steps State: The checklist_steps_state table effectively supports per-user state management, enabling tracking of individual user progress within each checklist step. This is useful for scenarios where users may need to resume a checklist at different points.

  4. Priority as Enum: Using an enum for checklist_priorities simplifies the logic for prioritizing tasks and allows consistent priority levels across the database.

  5. Ordering of Steps: The checklist_steps_ordering table is a good approach for maintaining the order and priority of steps within each checklist. It enables complex ordering logic if needed and allows reordering of steps without changing the actual checklist_steps table.

lsetiawan commented 3 weeks ago

Done. Go to the dbdiagram link to see the updated schema.