What are the key considerations when designing a database schema for a new application?
Treat this as a PostgreSQL schema-design exercise. Using the supplied relational tables, write a query that summarizes relationship coverage for every user, including users without applications or events.
user_id, email, application_count, and latest_event_atuser_id ascending| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| VARCHAR(255) | User email address | |
| full_name | VARCHAR(150) | User display name |
| created_at | TIMESTAMP | Account creation timestamp |
| Column | Type | Description |
|---|---|---|
| application_idPK | INT | Unique application identifier |
| user_id | INT | User associated with the application |
| application_name | VARCHAR(150) | Application name |
| status | VARCHAR(30) | Current application status |
| submitted_at | DATE | Submission date |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| application_id | INT | Application associated with the event |
| event_type | VARCHAR(40) | Type of application event |
| event_at | TIMESTAMP | Event occurrence timestamp |