Week 1
Week 1
Lab Manual 1
Learning Objectives:
1. Install and configure the MySQL server to prepare a
working environment for database development and
management.
2. Create a new database named "Northwind" to understand the
basic process of setting up a database.
3. Restore database schema by executing scripts (e.g.,
northwind.sql) to comprehend how schema scripts define
database structure.
4. Populate the database with data using northwind_data.sql to
practice importing data into a structured database.
5. Create a new database to practice the fundamental steps of
setting up a database environment for structured data storage
and management
6. .Generate scripts for a database schema to understand how
database structures (e.g., tables, constraints) are defined and
exported.
Post-Installation Steps
1. Open MySQL Workbench or any MySQL-compatible client to
connect to your server.
2. Use the credentials (root and your password) to log in and begin
creating databases or executing SQL queries.
4. Apply Changes:
o Click Apply to save the data into the database.
o Confirm the SQL INSERT statements in the wizard and
click Apply.
5. Verify the Data:
o Refresh the data grid to ensure the rows are successfully
added.
Step 4: Verify the Table and Data
1. Check Table Data:
o Right-click on the Product table and select "Select Rows
- Limit 1000" to view the inserted data.
2. Output Example:
ProductID ProductName Price Quantity
1 Laptop 1000.00 10
2 Smartphone 500.00 20
3 Headphones 50.00 50
4 Keyboard 25.00 30
5 Mouse 15.00 40
Part 2:
Task 1: Connect to the Northwind Database
• Objective: Ensure the database connection is set up properly.
• Steps:
1. Open MySQL Workbench.
2. Connect to your MySQL server by selecting your connection
(e.g., Local Instance MySQL).
3. Verify that the Northwind database is visible in the Schemas
pane.
Task 2: List All Tables
• Objective: Identify the tables in the Northwind database.
• Steps:
1. Expand the Northwind schema in the Schemas pane.
2. Note down the names of all tables (e.g., Customers, Orders,
Products, etc.).
3. Output Example:
Tables in Northwind:
- Customers
- Orders
- Products
- Employees
- Categories