0
0
MySQLquery~15 mins

Database creation and selection in MySQL - Mini Project: Build & Apply

Choose your learning style9 modes available
Database creation and selection
📖 Scenario: You are setting up a new database for a small bookstore. You need to create the database and then select it to start adding tables and data.
🎯 Goal: Create a new database called bookstore and then select it for use.
📋 What You'll Learn
Create a database named bookstore
Select the bookstore database to use
💡 Why This Matters
🌍 Real World
Creating and selecting databases is the first step in managing data for any application, like websites or inventory systems.
💼 Career
Database administrators and developers often create and select databases to organize and manage data efficiently.
Progress0 / 4 steps
1
Create the database
Write a SQL statement to create a database named bookstore.
MySQL
Need a hint?

Use the CREATE DATABASE command followed by the database name.

2
Select the database
Write a SQL statement to select the database named bookstore for use.
MySQL
Need a hint?

Use the USE command followed by the database name to select it.

3
Verify the current database
Write a SQL statement to show the name of the currently selected database.
MySQL
Need a hint?

Use the SELECT DATABASE() function to see the current database.

4
Drop the database (optional cleanup)
Write a SQL statement to drop the database named bookstore if you want to remove it.
MySQL
Need a hint?

Use the DROP DATABASE command followed by the database name to delete it.