This project is a MySQL-based Mental Health Check-In App schema developed as part of the DevifyX MySQL Core Assignment. It features a fully normalized relational database that supports daily check-ins, mood/stress tracking, mental health resources, user engagement, tagging, and search functionalities—all without any frontend or backend implementation.
- Stores user credentials with hashed passwords
- Admin roles supported via separate admin table
- Logs mood and stress levels once per day per user
- Optional personal notes per check-in
- Supports customizable scales for mood and stress levels
- View trends through past records stored by date
- Store resources (articles, videos, helplines)
- Categorized and taggable content
- Suggested resources based on mood/stress level range
- Many-to-many tagging for efficient search and filtering
- Linked resource categories
- Search by keyword
- Search by tag
- Search by keyword & tag combo via stored procedures
- Logs user access to resources
- User-configurable daily/weekly check-in reminders
- Role-based admin access (
moderator,superadmin) - Logging of admin actions (resource edits, tag changes, etc.)
| File Name | Description |
|---|---|
schema.sql |
Full DDL schema: tables, constraints, indexes. |
sample_data.sql |
Sample DML inserts demonstrating functionality. |
search_procedures.sql |
Search stored procedures for keyword, tag, and combo search. |
- Ensure MySQL 5.7 or higher is installed.
- Create and switch to a new database:
CREATE DATABASE mental_health_app; USE mental_health_app;
- Run the SQL files in the following order:
schema.sqlsample_data.sqlsearch_procedures.sql
CALL SearchResourcesByKeyword('meditation');
CALL SearchResourcesByTag('Anxiety');
CALL SearchResourcesByKeywordAndTag('sleep', 'Sleep');
