Design and create a relational database schema suitable for the application's needs.
Define tables and relationships for storing user data, PDF file metadata, and form responses.
Ensure the design supports efficient querying and aligns with best practices for data normalization and integrity.
Database Tables:
Users Table: To store user information, including details from AWS Cognito and WeChat authentication.
PDFs Table: To store metadata about PDF files uploaded by users (e.g., file name, size, S3 URL, upload timestamp, associated user).
Questions Table: To store predefined questions for the forms.
Responses Table: To store user responses to the predefined questions, linked to the Users and Questions tables.
Acceptance Criteria:
The database schema accurately reflects the data storage requirements for the application.
Each table includes appropriate fields, data types, and indexes.
Relationships between tables (e.g., foreign keys) are correctly defined.
The design supports scalability and potential future enhancements.
Unit Testing:
Test the creation of each table and ensure they adhere to the defined schema.
Mock data insertion into each table and validate data integrity.
Test relationships between tables (e.g., join operations).
Design and create a relational database schema suitable for the application's needs.
Define tables and relationships for storing user data, PDF file metadata, and form responses.
Ensure the design supports efficient querying and aligns with best practices for data normalization and integrity.
Database Tables:
Users Table: To store user information, including details from AWS Cognito and WeChat authentication.
PDFs Table: To store metadata about PDF files uploaded by users (e.g., file name, size, S3 URL, upload timestamp, associated user).
Questions Table: To store predefined questions for the forms.
Responses Table: To store user responses to the predefined questions, linked to the Users and Questions tables.
Acceptance Criteria:
The database schema accurately reflects the data storage requirements for the application.
Each table includes appropriate fields, data types, and indexes.
Relationships between tables (e.g., foreign keys) are correctly defined.
The design supports scalability and potential future enhancements.
Unit Testing:
Test the creation of each table and ensure they adhere to the defined schema.
Mock data insertion into each table and validate data integrity.
Test relationships between tables (e.g., join operations).