Q1) Spring Boot REST Application for Student and Course Resources
Objective
- Write a Spring Boot REST application which will provide following CRUD operations for "Student" and "Course" resource offered by Training Institute.
- A course can have multiple students. A student can enroll only in 1 course.
CRUD Operations
- Add new Course
- Add new Student
- i/p student details along with course id
- Update Course Details
- i/p course id n new (Start Date, End Date, Fees)
- Fetch all courses by given Category
Additional Optional Work for More Practice
- Fetch all students for given Course Name
- Cancel Admission of specific student
- Cancel Course
Course Attributes
- Course has the following attributes:
- ID (unique identifier for each Course, auto generated, starts from 1)
- Name (unique , Cannot be Blank, Example : Java SE,Web Programming in Java ,Spring Boot , Spring Cloud, Oracle DB , MySql DB )
- Category (Enum, Example: JAVA,DBT)
- Start Date (Cannot be Blank)
- End Date (Cannot be Blank)
- Fees (Cannot be Blank)
- Marks (Cannot be Blank)
Student Attributes
- Student has the following attributes:
- Student id (unique identifier for each Student , auto generated, starts from 1) - primary key
- student name (Cannot be Blank)
- Email (Cannot be Blank)
- Password (Cannot be Blank)
- Marks
- Course id - Foreign key
Requirements
- Use MySQL Relational Database to save resource.
- There should be Validation on Create & Update Payload.
- For example:
- End Date cannot be before Start Date.
- Name should not be blank.
- None of the fields in Course table is Nullable.