MySQL DBMS Practical on Windows – Complete Guide for FYBSc IT
If you are a FYBSc IT student, learning MySQL is an essential part of your DBMS practicals. This step-by-step guide explains how to perform common MySQL operations such as viewing databases, creating a database, creating tables, inserting records, updating records, and deleting records – all on MySQL for Windows.
Aim of the Practical
To understand and perform basic MySQL operations on Windows such as viewing databases, creating databases, creating tables (with and without constraints), inserting records, updating records, and deleting records.
Step 1: Open MySQL on Windows
Once MySQL is installed on your Windows system, you can use either:
- MySQL Command Line Client (black terminal window)
- MySQL Workbench (GUI-based tool)
In this practical, we’ll use the command line interface on Windows for better understanding.
Step 2: Viewing All Databases
SHOW DATABASES;
This command displays all available databases in your MySQL server.
Step 3: Creating a Database
CREATE DATABASE CollegeDB;
Here, we created a new database called CollegeDB
. You can replace the name with any database name you prefer.
Step 4: Viewing All Tables in a Database
First, switch to the database you created:
USE CollegeDB;
Now view all tables inside it:
SHOW TABLES;
Step 5: Creating Tables (With and Without Constraints)
Without Constraints:
CREATE TABLE Students ( id INT, name VARCHAR(50), course VARCHAR(50) );