Open FPeng2288 opened 3 weeks ago
request_status
, request_category
, request_type
, and request_priority
are designed with a Many-to-One relationship with the request
table.request_priority
might only have LOW, MEDIUM, HIGH, resulting in a maximum of three IDs.last_updated_date
in these tables records the timestamp of the most recent selection of the enum value, not the timestamp associated with a specific request (requestId).DEFAULT
enum value and assigning it initially creates additional logic to ensure these default values are replaced during request creation. This approach increases code complexity and potential for errors.request
table is a feasible approach with lower complexity.request
table.
Issue Description:
Based on our ongoing development and understanding of the project's requirements, I have a few suggestions and clarifications needed regarding the database schema design. Below are the points organized by the relevant tables and fields, along with the rationale for each suggestion.
Consultations
Email Uniqueness
email
field in theusers
table be unique?RequestStatus, RequestPriority, RequestType, RequestCategory Tables
description
field be removed from these tables?submission_time Foreign Key Relationship
submission_time
have a foreign key relationship withRequestStatus
?leadVolunteerUserId
leadVolunteerUserId
field? Should there be avolunteer
table to relate this field to?lastUpdateDate
lastUpdateDate
be linked to the most recent update time inRequestStatus
,RequestPriority
,RequestType
, andRequestCategory
?submission_date
,serviced_date
, andlast_update_date
be non-nullable?submission_date
tosubmission_time
.etc?User Name Fields
full_name
non-nullable whilelast_name
andfirst_name
are nullable? Shouldfull_name
be removed and generated fromfirst_name
andlast_name
?user_category
user_category
?description
field be removed, or is it intended as a memo for admin use?user_status
user_status
? How does it control or signify user actions in relation to the requests?Inconsistent Naming Conventions
Thank you for considering these suggestions. I believe addressing these points will help in refining our database schema and ensuring it aligns with our project requirements and best practices.