0% found this document useful (0 votes)
6 views4 pages

MySQL Database Creation Guide

This document provides a step-by-step guide for creating a MySQL database using XAMPP. It outlines the process of setting up the environment, creating a database named 'dbSIS', and defining tables for Students, Courses, Departments, and Users with specific fields and data types. Additionally, it emphasizes the need for establishing relationships between the tables due to their mutual dependencies.

Uploaded by

Mark Bangayan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

MySQL Database Creation Guide

This document provides a step-by-step guide for creating a MySQL database using XAMPP. It outlines the process of setting up the environment, creating a database named 'dbSIS', and defining tables for Students, Courses, Departments, and Users with specific fields and data types. Additionally, it emphasizes the need for establishing relationships between the tables due to their mutual dependencies.

Uploaded by

Mark Bangayan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 1: Creating Database in MySQL

Getting Started with MySQL Database

a. Open XAMPP Control Panel and run Apache and MySQL Services;
b. Open your browser and type in the URL the following: localhost/xampp

c. In the tools menu, click phpMyAdmin

Note: If you are using 5.6.3 version, the same environment should be seen in your browser.

d. To create a database, click the new command:

PHP with MySQL Modules prepared by SHERWIN M. CAACBAY 1|Page


e. Set the name of your database to dbSIS as shown in the figure:

f. Click the create button, once the database has been created successfully, open the
database and create the following tables:

Table Name Field Name Data Type Remarks


Students ID int (11) Primary Key/ Auto increment
StudentNo varchar(20)
LastName varchar(50)
FirstName varchar(50)
MiddleName varchar (50)
DepartmentID int (11)
CourseID int (11)
Courses ID int (11) Primary Key/ Auto increment
Code varchar (20)
Description varchar (50)
DepartmentID int (11)
Departments ID int (11) Primary Key/ Auto increment
Code varchar (20)
Description varchar (50)
Users ID int (11) Primary Key/ Auto increment
Username varchar (50)
Password varchar (50)
AccessLevel varchar (50)

PHP with MySQL Modules prepared by SHERWIN M. CAACBAY 2|Page


Note: Refer to the screenshot below on how to set the primary key and auto increment of a
certain field.

PHP with MySQL Modules prepared by SHERWIN M. CAACBAY 3|Page


g. After creating the following tables, insert the following records as shown in the figure:
For courses table:

For departments table:

For students table:

For users table:

Note: students, departments and courses table needs to establish a relationship because
the three (3) tables are mutually dependent to each other. To create a relation between
courses and departments tables and students, courses and departments tables please refer
to the next modules.

PHP with MySQL Modules prepared by SHERWIN M. CAACBAY 4|Page

You might also like