{"id":28074691,"url":"https://github.com/samirpaulb/student-management-system","last_synced_at":"2025-10-04T05:12:32.923Z","repository":{"id":106904893,"uuid":"591746574","full_name":"SamirPaulb/student-management-system","owner":"SamirPaulb","description":"Student management system Project in Python with SQLite Database","archived":false,"fork":false,"pushed_at":"2024-07-02T09:13:41.000Z","size":36961,"stargazers_count":23,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T23:44:09.900Z","etag":null,"topics":["database","management-system","project","python","python-project","python3","replit","sqlite","sqlite-database","student-management","student-management-system","student-management-system-mysql"],"latest_commit_sha":null,"homepage":"https://replit.com/@SamirPaul1/student-management-system","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamirPaulb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-21T18:29:13.000Z","updated_at":"2025-05-04T15:04:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"97422722-05cd-4b0d-b483-0da3b59b8d03","html_url":"https://github.com/SamirPaulb/student-management-system","commit_stats":null,"previous_names":["samirpaulb/student-management-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamirPaulb/student-management-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamirPaulb%2Fstudent-management-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamirPaulb%2Fstudent-management-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamirPaulb%2Fstudent-management-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamirPaulb%2Fstudent-management-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamirPaulb","download_url":"https://codeload.github.com/SamirPaulb/student-management-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamirPaulb%2Fstudent-management-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278266896,"owners_count":25958733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","management-system","project","python","python-project","python3","replit","sqlite","sqlite-database","student-management","student-management-system","student-management-system-mysql"],"created_at":"2025-05-12T23:44:07.372Z","updated_at":"2025-10-04T05:12:32.905Z","avatar_url":"https://github.com/SamirPaulb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Student management system Project in Python with SQLite Database\n\n**Step 1: Install Python** \n\n**Step 2: Install Pycharm | Create Project | Install Library**\n\n**Step 3: Create Project** \n\n**Step 4: Create Python file**\n\n**Step 5: Code Explanation**: To explain the code i have divided it different part and now i am going to explain each part one by one\n\n**import library:** Here in this step we will import the needed library that will be used to create Student Management System.\n```python\n#import libraries\nfrom tkinter import *\nimport tkinter.ttk as ttk\nimport tkinter.messagebox as tkMessageBox\nimport sqlite3\n```\nHere as you can see that there are three libraries are imported in which tkinter library is using to create a GUI window , tkinter.messagebox library is using to display message in Popup box and sqlite3 library is using to handle SQLite database.\n\n**Create Database and Table:**  I have defined a function with name Database() to create database and table. Here is the following code to create database and table.\n\n```python\n#function to define database\ndef Database():\n    global conn, cursor\n    #creating student database\n    conn = sqlite3.connect(\"student.db\")\n    cursor = conn.cursor()\n    #creating STUD_REGISTRATION table\n    cursor.execute(\n        \"CREATE TABLE IF NOT EXISTS STUD_REGISTRATION (STU_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, STU_NAME TEXT, STU_CONTACT TEXT, STU_EMAIL TEXT, STU_ROLLNO TEXT, STU_BRANCH TEXT)\")\n```\nHere in the above program database name is  student and table name is STUD_REGISTRATION. The fields of table STUD_REGISTRATION are STU_ID , STU_NAME, STU_CONTACT, STU_EMAIL, STU_ROLLNO AND STU_BRANCH\n\n**Create GUI Window :**I have used four frame to create this Graphical user interface form in which first frame for Heading, second frame for Registration form, third frame for search window and the last frame for displaying students records. Here is the complete code to create GUI of this application.\n\n```python\n#defining function for creating GUI Layout\ndef DisplayForm():\n    #creating window\n    display_screen = Tk()\n    #setting width and height for window\n    display_screen.geometry(\"900x400\")\n    #setting title for window\n    display_screen.title(\"SAMIR PAUL\")\n    #declaring variables\n    global tree\n    global SEARCH\n    global name,contact,email,rollno,branch\n    SEARCH = StringVar()\n    name = StringVar()\n    contact = StringVar()\n    email = StringVar()\n    rollno = StringVar()\n    branch = StringVar()\n    #creating frames for layout\n    #topview frame for heading\n    TopViewForm = Frame(display_screen, width=600, bd=1, relief=SOLID)\n    TopViewForm.pack(side=TOP, fill=X)\n    #first left frame for registration from\n    LFrom = Frame(display_screen, width=\"350\")\n    LFrom.pack(side=LEFT, fill=Y)\n    #seconf left frame for search form\n    LeftViewForm = Frame(display_screen, width=500,bg=\"gray\")\n    LeftViewForm.pack(side=LEFT, fill=Y)\n    #mid frame for displaying students record\n    MidViewForm = Frame(display_screen, width=600)\n    MidViewForm.pack(side=RIGHT)\n    #label for heading\n    lbl_text = Label(TopViewForm, text=\"Student Management System\", font=('verdana', 18), width=600,bg=\"#1C2833\",fg=\"white\")\n    lbl_text.pack(fill=X)\n    #creating registration form in first left frame\n    Label(LFrom, text=\"Name  \", font=(\"Arial\", 12)).pack(side=TOP)\n    Entry(LFrom,font=(\"Arial\",10,\"bold\"),textvariable=name).pack(side=TOP, padx=10, fill=X)\n    Label(LFrom, text=\"Contact \", font=(\"Arial\", 12)).pack(side=TOP)\n    Entry(LFrom, font=(\"Arial\", 10, \"bold\"),textvariable=contact).pack(side=TOP, padx=10, fill=X)\n    Label(LFrom, text=\"Email \", font=(\"Arial\", 12)).pack(side=TOP)\n    Entry(LFrom, font=(\"Arial\", 10, \"bold\"),textvariable=email).pack(side=TOP, padx=10, fill=X)\n    Label(LFrom, text=\"Rollno \", font=(\"Arial\", 12)).pack(side=TOP)\n    Entry(LFrom, font=(\"Arial\", 10, \"bold\"),textvariable=rollno).pack(side=TOP, padx=10, fill=X)\n    Label(LFrom, text=\"Branch \", font=(\"Arial\", 12)).pack(side=TOP)\n    Entry(LFrom, font=(\"Arial\", 10, \"bold\"),textvariable=branch).pack(side=TOP, padx=10, fill=X)\n    Button(LFrom,text=\"Submit\",font=(\"Arial\", 10, \"bold\"),command=register).pack(side=TOP, padx=10,pady=5, fill=X)\n\n    #creating search label and entry in second frame\n    lbl_txtsearch = Label(LeftViewForm, text=\"Enter name to Search\", font=('verdana', 10),bg=\"gray\")\n    lbl_txtsearch.pack()\n    #creating search entry\n    search = Entry(LeftViewForm, textvariable=SEARCH, font=('verdana', 15), width=10)\n    search.pack(side=TOP, padx=10, fill=X)\n    #creating search button\n    btn_search = Button(LeftViewForm, text=\"Search\", command=SearchRecord)\n    btn_search.pack(side=TOP, padx=10, pady=10, fill=X)\n    #creating view button\n    btn_view = Button(LeftViewForm, text=\"View All\", command=DisplayData)\n    btn_view.pack(side=TOP, padx=10, pady=10, fill=X)\n    #creating reset button\n    btn_reset = Button(LeftViewForm, text=\"Reset\", command=Reset)\n    btn_reset.pack(side=TOP, padx=10, pady=10, fill=X)\n    #creating delete button\n    btn_delete = Button(LeftViewForm, text=\"Delete\", command=Delete)\n    btn_delete.pack(side=TOP, padx=10, pady=10, fill=X)\n   #setting scrollbar\n    scrollbarx = Scrollbar(MidViewForm, orient=HORIZONTAL)\n    scrollbary = Scrollbar(MidViewForm, orient=VERTICAL)\n    tree = ttk.Treeview(MidViewForm,columns=(\"Student Id\", \"Name\", \"Contact\", \"Email\",\"Rollno\",\"Branch\"),\n                        selectmode=\"extended\", height=100, yscrollcommand=scrollbary.set, xscrollcommand=scrollbarx.set)\n    scrollbary.config(command=tree.yview)\n    scrollbary.pack(side=RIGHT, fill=Y)\n    scrollbarx.config(command=tree.xview)\n    scrollbarx.pack(side=BOTTOM, fill=X)\n    #setting headings for the columns\n    tree.heading('Student Id', text=\"Student Id\", anchor=W)\n    tree.heading('Name', text=\"Name\", anchor=W)\n    tree.heading('Contact', text=\"Contact\", anchor=W)\n    tree.heading('Email', text=\"Email\", anchor=W)\n    tree.heading('Rollno', text=\"Rollno\", anchor=W)\n    tree.heading('Branch', text=\"Branch\", anchor=W)\n    #setting width of the columns\n    tree.column('#0', stretch=NO, minwidth=0, width=0)\n    tree.column('#1', stretch=NO, minwidth=0, width=100)\n    tree.column('#2', stretch=NO, minwidth=0, width=150)\n    tree.column('#3', stretch=NO, minwidth=0, width=80)\n    tree.column('#4', stretch=NO, minwidth=0, width=120)\n    tree.pack()\n    DisplayData()\n```\n**Insert Data into table:** I have defined a function with name register(). First it will open database by calling Database() function. Next i have passed all the forms data into Python variable. After that i have applied a empty validation and finally at last i have applied query to insert data into table then displayed data screen by calling DisplayData() function. Here is the complete code to insert data into table.\n\n```python\n#function to insert data into database\ndef register():\n    Database()\n    #getting form data\n    name1=name.get()\n    con1=contact.get()\n    email1=email.get()\n    rol1=rollno.get()\n    branch1=branch.get()\n    #applying empty validation\n    if name1=='' or con1==''or email1=='' or rol1==''or branch1=='':\n        tkMessageBox.showinfo(\"Warning\",\"fill the empty field!!!\")\n    else:\n        #execute query\n        conn.execute('INSERT INTO STUD_REGISTRATION (STU_NAME,STU_CONTACT,STU_EMAIL,STU_ROLLNO,STU_BRANCH) \\\n VALUES (?,?,?,?,?)',(name1,con1,email1,rol1,branch1));\n        conn.commit()\n        tkMessageBox.showinfo(\"Message\",\"Stored successfully\")\n        #refresh table data\n        DisplayData()\n        conn.close()\n```\n**Reset Form:** I have defined a function Reset() and it will reset all the from data.\n```python\ndef Reset():\n    #clear current data from table\n    tree.delete(*tree.get_children())\n    #refresh table data\n    DisplayData()\n    #clear search text\n    SEARCH.set(\"\")\n    name.set(\"\")\n    contact.set(\"\")\n    email.set(\"\")\n    rollno.set(\"\")\n    branch.set(\"\")\n```\n**Delete student record:** I have defined a function Delete() that will take the selected data and will delete it from database. Here is the complete code to delete selected data from database.\n```python\ndef Delete():\n    #open database\n    Database()\n    if not tree.selection():\n        tkMessageBox.showwarning(\"Warning\",\"Select data to delete\")\n    else:\n        result = tkMessageBox.askquestion('Confirm', 'Are you sure you want to delete this record?',\n                                          icon=\"warning\")\n        if result == 'yes':\n            curItem = tree.focus()\n            contents = (tree.item(curItem))\n            selecteditem = contents['values']\n            tree.delete(curItem)\n            cursor=conn.execute(\"DELETE FROM STUD_REGISTRATION WHERE STU_ID = %d\" % selecteditem[0])\n            conn.commit()\n            cursor.close()\n            conn.close()\n```\n**Search student record:** I have defined a function SearchRecord() that will take the name of student and perform query to select the records of the given student and at last will populate it into the table format.\n```python\n#function to search data\ndef SearchRecord():\n    #open database\n    Database()\n    #checking search text is empty or not\n    if SEARCH.get() != \"\":\n        #clearing current display data\n        tree.delete(*tree.get_children())\n        #select query with where clause\n        cursor=conn.execute(\"SELECT * FROM STUD_REGISTRATION WHERE STU_NAME LIKE ?\", ('%' + str(SEARCH.get()) + '%',))\n        #fetch all matching records\n        fetch = cursor.fetchall()\n        #loop for displaying all records into GUI\n        for data in fetch:\n            tree.insert('', 'end', values=(data))\n        cursor.close()\n        conn.close()\n```\n**Display student record:** I have defined a function DisplayData() that will fetch all the records from the database and display into the GUI in table format. Here is the complete code\n```python\n#defining function to access data from SQLite database\ndef DisplayData():\n    #open database\n    Database()\n    #clear current data\n    tree.delete(*tree.get_children())\n    #select query\n    cursor=conn.execute(\"SELECT * FROM STUD_REGISTRATION\")\n    #fetch all data from database\n    fetch = cursor.fetchall()\n    #loop for displaying all data in GUI\n    for data in fetch:\n        tree.insert('', 'end', values=(data))\n    cursor.close()\n    conn.close()\n```\n**Step 6: Run Code**: To run this code just right click on the coding area and click on **Run Program** and you will get a output screen like below.\n\u003cimg width=\"821\" alt=\"home\" src=\"https://user-images.githubusercontent.com/77569653/213883145-88fc35b6-7596-4d92-b914-8ccb982b89dc.png\"\u003e\n\n**Insert**:Here just fill the Student details and click on Submit button you will get a screen like below\n\u003cimg width=\"821\" alt=\"insert\" src=\"https://user-images.githubusercontent.com/77569653/213883162-9a30a7da-c62f-4122-b4e4-49e37d773273.png\"\u003e\n\n**Search**: If you want to search record of any student then just fill his/her name in textbox and click on search button. For example here i am going to search student Samir's details\n\u003cimg width=\"824\" alt=\"search\" src=\"https://user-images.githubusercontent.com/77569653/213883189-99f5c42a-46cf-4b61-bd54-3a3cb354e26d.png\"\u003e\n\n**Delete**:To delete record of any student just click on record to select and the click on delete button.\n\u003cimg width=\"823\" alt=\"delete\" src=\"https://user-images.githubusercontent.com/77569653/213883206-89694686-fadd-434a-ad0d-dd75fe3bb2ce.png\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamirpaulb%2Fstudent-management-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamirpaulb%2Fstudent-management-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamirpaulb%2Fstudent-management-system/lists"}