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

EC5070 Lab01 2024

The document outlines the instructions for Lab 01 of the EC5070 Database Systems course at the University of Jaffna, focusing on developing a Course Management System. Students are required to create an ER diagram, perform relational mapping, and implement database tables using phpMyAdmin, along with creating a sample project structure. The lab report must include screenshots and be submitted by a specified deadline via Teams.
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 views15 pages

EC5070 Lab01 2024

The document outlines the instructions for Lab 01 of the EC5070 Database Systems course at the University of Jaffna, focusing on developing a Course Management System. Students are required to create an ER diagram, perform relational mapping, and implement database tables using phpMyAdmin, along with creating a sample project structure. The lab report must include screenshots and be submitted by a specified deadline via Teams.
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
You are on page 1/ 15

Faculty of Engineering, University of Jaffna

Department of Computer Engineering


EC5070: Database Systems
Lab 01
Lecturer : Dr. J. Jananie Instructors :

Instructions

I. Implement all the following steps.

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.

Implement the following considering the steps one by one.

1. Draw an ER diagram using any tool (draw.io/penciltool/etc) and paste the image here.

2. Do the relational mapping for the Diagram of question 1.

3. First, you need to create tables in phpMyAdmin.

i. Consider the entity course.


Follow the steps below to create a table in phpMyAdmin.
a. Start XAMPP control panel

b. Open phpMyAdmin
c. To create the database

d. To create the table

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 :

To Add Enum Values

Set id as primary key


e. To change column details.
Select the auto increment to assign different increasing values for the primary key ID. If you’ve taken
course code then it will be a different case.

f. To insert row details.

Method 1.1

Insert first row data


Method 1.2

Insert second row data (using sql query in phpMyAdmin)


Method 02 :

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.

Import them in the phpMyAdmin.


4. Now we are going to create the sample project.

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.

It also includes the common.php file

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.

You might also like