13. Practice projects
It's time to put everything you've learned into practice. Here are two complete projects that integrate all the concepts from the course: from database design to data manipulation and analysis.
In all of them you must:
- Design the database structure (collections and documents).
- Create the database using MongoDB.
- Insert sample data into the collections.
- Perform queries and aggregations to extract relevant information.
And above all, don't be afraid to experiment.
Exercise 1: Task management
Design and implement a database to manage the tasks of a work team. The system must handle projects, tasks assigned to users, priorities and statuses.
- Which project has the most completed tasks?
- Which user has the most pending tasks?
- What is the oldest uncompleted task?
Exercise 2: Restaurant management system
Create a complete system to manage a restaurant with tables, menu, orders and waiters.
Suggested structure:
- Tables: table number, capacity, location (indoor/terrace), status (free/occupied)
- Menu: dish name, category (starter/main/dessert/drink), price, ingredients, available
- Waiters: name, shift (morning/afternoon/night), total orders served
- Orders: table, waiter, dishes (with quantity), date and time, status (pending/preparing/served/paid), total
Operations to implement:
- Take an order (create order, assign waiter, mark table as occupied)
- Mark an order as served
- Close an order and free the table (calculate total, update the waiter's statistics)
- Find available tables with capacity for N people
- Show the menu by categories
- Add or remove dishes from the day's availability
Queries and statistics:
- What is the most ordered dish?
- Which waiter has served the most orders?
- What is the average ticket of the restaurant?
- Which tables generate the most revenue?
- Which shift has the most sales?
- Total revenue by dish category
- Dishes that have never been ordered
Create appropriate indexes to optimize the most frequent queries (finding available tables, querying active orders, etc.)
This work is under a Attribution-NonCommercial-NoDerivatives 4.0 International license.
Desafíos de programación atemporales y multiparadigmáticos
Te encuentras ante un librillo de actividades, divididas en 2 niveles de dificultad. Te enfrentarás a los casos más comunes que te puedes encontrar en pruebas técnicas o aprender conceptos elementales de programación.
Buy the bookWill you buy me a coffee?
This is how I keep writing without ads or paywalls.
Sure, it's on me!
Comments
There are no comments yet.