Databases: Comparison, Choosing & Polyglot
jsonb: Indexes, Tradeoffs & Exercise
In this assignment you will extend a real Spring Boot REST API for an online shop. The shop sells products across several categories - sneakers, clothing, accessories, and more. Each product has a details column of type jsonb that stores flexible, category-specific attributes such as color, size, and material.
Your job is to connect the API to a real PostgreSQL database, expose the flexible product data through the existing endpoints, implement missing query and update functionality using jsonb operators, and add image upload support backed by Backblaze B2 object storage.
GET /products?color=<color> Endpoint by implementing the findByColor method in ProductRepository.PUT /products/{id}/size Endpoint by implementing the findByColor method in ProductRepository.Add support of uploading image. There are already two endpoints:
PUT /products/{id}/imageDELETE /products/{id}/imageFileService with two operations:
ProductService.setProductImage()ProductService.deleteProductImage()After succesfully uploading a file to a bucket, save the file URL in the database in the image_url column. Set it to null when deleting an image.
If you use BackBlaze, the public url should look like this:
<https://s3.eu-central-003.backblazeb2.com/file/{bucket-name}/{path-name}>
<aside> ⚠️
If you use BackBlaze, you will not be able to create public buckets without adding a credit card details. This is not required for this assignment. Construct and save the URLs in the database and don’t worry about not accessing them at this point.
</aside>
Follow the Assignment submission guide to submit
The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0 *https://hackyourfuture.net/*

Built with ❤️ by the HackYourFuture community · Thank you, contributors
Found a mistake or have a suggestion? Let us know in the feedback form.