Home > Courses > Microservice Programming (VU-CSS 325) > Introduction to MySQL

Introduction to MySQL

Subject: Microservice Programming (VU-CSS 325)
MySQL is an open-source relational database management system widely used for storing and managing structured data. It uses SQL (Structured Query Language) to create, read, update, and delete data efficiently. Information in MySQL is organized into tables made up of rows and columns, which makes data easy to understand and manage. Because it is reliable, fast, and easy to integrate, MySQL is very popular in web application development, especially with frameworks and languages such as Flask, Django, PHP, and Laravel.

In MySQL, a database serves as a container that holds related tables. For example, a database named "vu_db" can store all the data needed for a particular application or system. Within a database, data is arranged in tables, each designed to store a specific type of information, such as students, users, or courses.

Each table consists of rows and columns. A row represents a single record in the table, such as the details of one student. A column represents an attribute of the data, such as an ID number, name, or email address. Together, rows and columns form a structured and organized way to store and retrieve information in MySQL.

Key Concepts
• Database: container for tables (e.g. vu_db)
• Table: structured data (students, users, courses)
• Row: one record
• Column: one attribute (id, name, email)


Install XAMPP (Windows)







XAMPP gives you Apache + MySQL + PHPMyAdmin in one package.
Step 1: Download
• Go to https://www.apachefriends.org
• Download XAMPP for Windows
• Install with default options
Step 2: Start Services
Open XAMPP Control Panel
• Click Start on:
◦ ✅ Apache
◦ ✅ MySQL
If both turn green you’re good

Create Database


Option A: Using phpMyAdmin (Recommended for beginners)
1. Open browser
2. Go to: http://localhost/phpmyadmin
3. Click Databases
4. Create new database: Database name: vu_db
5. Click Create





Option B: Using SQL
CREATE DATABASE vu_db;
USE vu_db;

The USE keyword means you want to make this database the default or active one and any SQL statement (e.g CREATE TABLE) would affect or query this current database.

Create a Table


You are also do this in phpmyadmin OR you use the SQL below:

CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100)
);



By: Vision University

Comments

No Comment yet!

Login to comment or ask question on this topic


Previous Topic