0% found this document useful (0 votes)
9 views20 pages

2021E006_Lab_01 1

The document outlines Lab 01 for the EC5070 Database Systems course, detailing tasks such as creating an ER diagram and performing relational mapping. It includes an explanation of the entities involved, specifically Managing Authorities and Courses, along with their attributes and relationships. Additionally, it describes the creation of a sample project for course registration using MySQL and PHP, including code files and functionalities for adding, updating, and deleting course records in a database.
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)
9 views20 pages

2021E006_Lab_01 1

The document outlines Lab 01 for the EC5070 Database Systems course, detailing tasks such as creating an ER diagram and performing relational mapping. It includes an explanation of the entities involved, specifically Managing Authorities and Courses, along with their attributes and relationships. Additionally, it describes the creation of a sample project for course registration using MySQL and PHP, including code files and functionalities for adding, updating, and deleting course records in a database.
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/ 20

EC5070: Database Systems

Lab 01

NAME : JENARTHTHAN A.

REGISTRATION NO. : 2021/E/006

DATE ASSIGNED : 24 March 2024


1. 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.

N M

N
1

1 N
EER DIAGRAM – ENHANCED ER DIAGRAM

N M

Explanation:

MAs Entity: Represents the Managing Authorities.

Attributes:
MID (Primary Key): Identifies each MA uniquely.
M_name: Composite attribute consisting of first_name and last_name.
M_mail (Primary Key): Email address of the MA.

Courses Entity: Represents the courses managed by MAs.

Attributes:
CourseCode (Primary Key): Unique identifier for each course.
CourseName: Name of the course.
Credits (Multivalued Attribute): Credits associated with the course (can be 2 or 3).

Manages Relationship: Represents the M:N relationship between MAs and Courses.

Attributes:
Semester (Multivalued Attribute): Indicates the semesters the course is managed in (1-8).
Creating Sample Project for Course Registration:
Source Codes:

1.Database created in the name of Student_Database

2.Following MySQL code was imported in the phpMyAdmin in order to make the tables in the database

Database table and sample records were successfully added


Some more dummy datas were inserted through sql console in the phpMyAdmin

Data were inserted into the database table successfully


In this location, " C:\xampp\htdocs " Projected created and named the folder
"StudentsCourseRegistration".

Under MA Folder PHP files were created


All the screenshots of the code.
All the code files are sent along with this pdf in the zip folder .

Config.php

Common.php
Course.php – this is for viewing of the courses
CreateCourse.PHP
db.php

deleteCourse.php
editCourse.php

index.php

Header.php

Footer.php
Page 1

http://localhost/StudentCourseRegistration/MA/index.php

Page 2 -CreateCourse – a page containing form for inserting course details in the student_database
Page 3 – to retrieve data from the student_database and show

Already there were records in the database

Let’s add one course and let’s see whether it is inserted to the student database or not

Add Thermodynamics MP2010 3 credits 2nd semester subject


successful message and in the database the record was inserted successfully

in student_database

in viewing page
we can also do action (edit / delete) records
Updating the record
example: we will edit the Applied electricity module name to chemistry

Update Course
The record is updated successfully
Deleting the record
Let’s delete thermodynamics

When we click the delete button cookie will are you sure click ok then the record will be deleted
From the database
Filtering data
We can also filter the data by clicking the semester button (semester wise)

You might also like