Skip to content

solution#190

Open
b1mb4 wants to merge 2 commits into
mate-academy:mainfrom
b1mb4:develop
Open

solution#190
b1mb4 wants to merge 2 commits into
mate-academy:mainfrom
b1mb4:develop

Conversation

@b1mb4

@b1mb4 b1mb4 commented Jun 14, 2026

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I am requesting changes because your SQL script currently violates a core requirement of the task and blocks execution in a clean environment. The assignment explicitly requires that you drop and recreate the ShopDB database before using it, but your task.sql starts with USE ShopDB; and assumes the database already exists, which causes ERROR 1049 (42000): Unknown database 'ShopDB' when run on a fresh setup.

Critical issue to fix (blocker):

  • At the very top of task.sql (before USE ShopDB;), add database lifecycle statements such as:
    • DROP DATABASE IF EXISTS ShopDB;
    • CREATE DATABASE ShopDB;
    • then keep USE ShopDB; as you already have.
      This directly addresses the requirement to recreate ShopDB and ensures the script works both when the database is missing and when old schemas exist.

Aside from this, your normalization work is strong: you have clearly separated Countries, Products, Warehouses, and the ProductInventory junction table with quantities, and your INSERTs correctly reproduce the intended data in 3NF. Once you add the DROP DATABASE/CREATE DATABASE statements to satisfy the checklist and remove the execution blocker, your solution will fully meet the task requirements.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread task.sql
-- Create database and tables

CREATE DATABASE ShopDB;
USE ShopDB;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the task description and checklist, you should drop and recreate the ShopDB database before using it (e.g., DROP DATABASE IF EXISTS ShopDB; followed by CREATE DATABASE ShopDB;) so this script works in a clean environment and doesn’t rely on the database already existing.

@linubah linubah left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants