EC5070 Lab01 2024
EC5070 Lab01 2024
Instructions
II. Prepare your lab report with the screenshots of your answers.
III. Submit your project folder & lab report (Lab1_RegNo) on or before given
deadline via Teams.
ILO: apply the Query Languages for database definition and manipulation.
Labsheet 01
We are going to develop a Course Management System. Each Course has its CourseCode, Credits,
CourseName and other details. There will be MAs (MID, MName, etc) who manages that semester.
They have the privilege to insert, update, delete courses. Through out this lab you can add your own
assumptions. When you add your own assumptions please mention.
1. Draw an ER diagram using any tool (draw.io/penciltool/etc) and paste the image here.
b. Open phpMyAdmin
c. To create the database
Method 01 :
Step 01 : Click new, enter the database name, And click create button. This will be redirect to create
table page.
Step 02 : enter the table name and number of columns and click the create button.This will be
redirect to below page.
Step 03 :
Method 1.1
We can add the tables and queries through .sql file also.
Create course.sql file in the name of the database. Write the necessary queries.
STEP 01: In this location, " C:\xampp\htdocs ", create a project folder and name it
"StudentsCourseRegistration".
STEP 02 : Inside this folder, create separate folders for maintaining pages for each user. Also, create
a "data" folder to maintain the database, an "assets" folder for managing files like CSS, JS, and
images, and an "includes" folder for maintaining headers, footers, and other common parts of the
webpage.
STEP 03 : Inside the “MA” folder. Create ‘CreateCourse.php’ file.
STEP 04 : Create ‘index.php’ file. Create a new link for your ‘CreateCourse.php’ page in the
index.php file below.
STEP 05 : Modify the ‘CreateCourse.php’ file <form method="post"> section to capture your course
details.
STEP 06: Modify the submit .php function from $new_course variable to get your parameters from
input. (shown in the STEP 07 image)
STEP 07: Modify the $sql part to insert into the new table you created.
It includes the config.php file which needs to connect to the database first.
STEP 08: Modify the “successfully added” message showing section with showing back your key
parameter of the new table.
STEP 09: Create Course.php file. Create a new link for your ‘CreateCourse.php’ page in the index.php
file below.
STEP 10: lmplement a Course.php page to show the course details of each semester.
If you click add button. this will be redirected to add course page
If you click the submit button. you can get the “successfully added” msg.
Upload the ER diagram, mapping, source code and exported .sql file.