A database operation is an application action that stores or retrieves data through a database access layer. In a server-rendered Rust application, this layer separates persistence details from routes and request handlers. section 8.4
A practical application organizes database operations around:
- Database-access modules for related entities such as courses and tutors. section 6.1
- Postgres table-creation scripts and environment variables for database access credentials. section 6.1
- Handlers that validate submitted data and invoke persistence logic when forms arrive through application routes. section 8.4
Tutor registration
A browser submits tutor-registration data to an Actix route. The handler performs complex validation, then uses the database access layer to store user-management data in Postgres; errors can cause the form template to be rendered again. section 8.4
Use the project-structure diagram to locate database access alongside handlers, models, routes, state, and database scripts. section 6.1
