Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import sqlite 3 class Student: def _ _ init _ _ ( self , StudentID,StudentName ) : self.StudentID = StudentID self.StudentName = StudentName def print

import sqlite3
class Student:
def __init__(self, StudentID,StudentName):
self.StudentID = StudentID
self.StudentName = StudentName
def print_student_details(self):
print('Student Id:', self.StudentID,', Student Name:',self.StudentName)
def print_all_students_details(cursor,connection):
pass
def add_new_student(self,cursor,connection):
cursor.execute("INSERT INTO StudentsCoursesRegistraions (StudentID,StudentName) VALUES (?,?)",(self.StudentID, self.StudentName))
connection.commit()
print('Student Added Successfully')
def update_student(self,cursor,connection):
cursor.execute("UPDATE StudentsCoursesRegistraions SET StudentName =? WHERE StudentID =",(self.StudentName, self.StudentID))
connection.commit()
print('Student Updated Successfully')
def delete_student(StudentID,cursor,connection):
cursor.execute("DELETE FROM StudentsCoursesRegistraions WHERE StudentID =?",(StudentID,))
connection.commit()
print('Student Deleted Successfully')
def create_tables():
cursor.execute('''CREATE TABLE IF NOT EXISTS StudentsCoursesRegistraions (
StudentID INTEGER PRIMARY KEY,
StudentName TEXT,
CourseID INTEGER,
Course_Details TEXT,
TeacherID INTEGER,
Teacher_name TEXT,
Registration_Date TEXT)''')
connection.commit()
def main_menu():
print('what would you like to manage:
press 1 for Students,
2 for teachers,
3 for courses,
4 for enrollment')
choice = input('Input your choice: ')
if choice =='1':
print('
You have chosen Student Management,
press 1 to add a new student,
2 to update an exsiting student,
3 to delete a student,
4 to view all students details')
student_management_choice = input('Input your choice: ')
if student_management_choice =='1':
StudentID = input('input student id: ')
StudentName = input('input student name: ')
s = Student(StudentID,StudentName)
s.add_new_student(cursor,connection)
s.print_student_details()
elif student_management_choice =='2':
StudentID = input('Which student detail you want to update: input student id: ')
StudentName = input('input an updated student name: ')
s = Student(StudentID,StudentName)
s.update_student(cursor,connection)
s.print_student_details()
elif student_management_choice =='3':
Student.delete_student(1,cursor,connection)
elif student_management_choice =='4':
Student.print_all_students_details(cursor,connection)
else:
print('input is not valid')
connection = sqlite3.connect('school.db')
cursor = connection.cursor()
create_tables()
main_menu()
connection.close()
Assignment Task
Introduction
This assessment comprises enhancing an existing codebase to create an application that addresses a practical problem. It will assess the student's understanding of software development and implement relational database and the ability to document the development process.
The objective is to enhance this codebase by incorporating supplementary features and functionalities that contribute to the overall functionality and usability of the application
Assignment Description:
This assessment task focuses on the process of improving and refining an existing codebase that has been provided. The codebase serves as the ground work for a school management application. The application will be developed using an OOP (Object Oriented Programming) Language (Python) that supports CRUD (Create, Read, Update, and Delete) operations.
A. Artefact [50 Marks]
Student will be provided with codebase for a School Management Application. The student task is to perform the following steps by utilising the provided code to:
Create an application in an OOP (Object Oriented Programming) Language (Python) that supports CRUD (Create, Read, Update, and Delete) operations for each of the database tables using Stored Procedures.
Adding more features and functionalities to align with a problem for a given scenario.
Build a simple database using a DBMS (DataBase Management System) application such as MSSQL, MySQL, and Oracle. The application must successfully include a connected database that host tables.
Understand the design of your application with the help of ERD (Entity Relational Diagrams), Conceptual, Logical and physical diagrams for the completed database.
The database need to be normalised to 3NF (Normal Form), at minimum.
Your application should use sorting and searching algorithms to filter and sort loaded data.
Please note that the given codebase is not complete and require improvements and implementation of extra features and functionalities:
Required improvement to the codebase:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Public Finance

Authors: Harvey Rosen

6th International Edition

0071121234, 978-0071121231

Students also viewed these Databases questions

Question

How many schools report average SAT scores?

Answered: 1 week ago