Why Databases Over Files
📖 Scenario: Imagine you run a small bookstore. You want to keep track of your books and sales. You could write all this information in simple text files, but it can get messy and slow as your store grows.This project will help you understand why using a database is better than just using files.
🎯 Goal: You will create a simple table to store book information, add a configuration for a minimum stock level, write a query to find books that need restocking, and finalize the setup with a primary key.
📋 What You'll Learn
Create a table called
Books with columns BookID, Title, and StockAdd a variable
min_stock to set the minimum stock levelWrite a query to select books where
Stock is less than min_stockAdd a primary key constraint on
BookID💡 Why This Matters
🌍 Real World
Stores, libraries, and many businesses use databases to keep their data organized and easy to access instead of messy files.
💼 Career
Knowing how to create tables, set variables, and write queries is essential for database jobs and managing data efficiently.
Progress0 / 4 steps