You are on page 1of 7

2nd Laboratory Examination: CRUD Operation (100pts)

Scenario:

You are tasked with developing a simple student management system for a university using Visual
Studio, C#, Java, Visual Basic and MySQL. The system should allow users to perform CRUD operations
on a MySQL database named ‘University’. The database includes a table named ‘Students’. The table
has the following structure:

• StudentID (int, primary key)


• FirstName (varchar)
• LastName (varchar)
• Major (varchar)
• GPA (decimal)
Instructions:

1: Create Operation

Form Design

 Design a Windows Forms Application with the following controls:


 TextBoxes for Student ID, FirstName, LastName, Major, and GPA.
 Buttons for Create, Read, Update, and Delete.
 A DataGridView to display the student records.
Create Operation
 Implement the Create button click event to insert a new student into the Students table.
 Prompt the user to enter the student details and click the Create button.
 Display a success message after creating the student.
 Create a PHP script to connect to the MySQL database (university) and handle errors
gracefully.
2: Read Operation
 Implement the Read button click event to retrieve and display all student records in the
TaskDataGridView.
 Display an appropriate message if there are no records.
3: Update Operation

Update Operation

 Implement the Update button click event to update the GPA of a student based on the
entered last name.
 Prompt the user to enter the last name and the updated GPA.

 Display a success message after updating the student.


4: Delete Operation

 Implement the Delete button click event to delete a student based on the entered last
name.
 Prompt the user to enter the last name of the student to be deleted.
 Display a success message after deleting the student.
Additional Notes:

 Handle exceptions appropriately, providing meaningful error messages.


 Ensure proper connection management.
 Test the application thoroughly to ensure that CRUD operations work correctly.

You might also like