0% found this document useful (0 votes)
18 views7 pages

Mysql Project

This document outlines a Student Management System project using MySQL, developed by Vinayak Kumar as part of his NTCC project for B.Tech CSE at Amity University. It details the creation of a database and a table for managing student records, including the insertion and retrieval of data. The project aims to improve efficiency in managing student information and suggests future enhancements such as adding a GUI and cloud integration.

Uploaded by

vipsprinter2004
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)
18 views7 pages

Mysql Project

This document outlines a Student Management System project using MySQL, developed by Vinayak Kumar as part of his NTCC project for B.Tech CSE at Amity University. It details the creation of a database and a table for managing student records, including the insertion and retrieval of data. The project aims to improve efficiency in managing student information and suggests future enhancements such as adding a GUI and cloud integration.

Uploaded by

vipsprinter2004
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/ 7

{

"cells": [

"cell_type": "markdown",

"metadata": {},

"source": [

"# Student Management System using MySQL\n",

"\n",

"**Student Name**: Vinayak Kumar \n",

"**Course**: B.Tech CSE (Amity University, Noida) \n",

"**Subject**: NTCC Project \n",

"\n",

"---"

},

"cell_type": "markdown",

"metadata": {},

"source": [

“ Introduction\n",

"This project demonstrates a simple **Student Management System** using **MySQL**.


\n",

"It shows how to create a database, insert records, and run queries.\n",

"\n",

"---"

]
},

"cell_type": "markdown",

"metadata": {},

"source": [

"## Problem Statement\n",

"Managing student data manually is time-consuming and error-prone. \n",

"This project solves the problem by using **MySQL** for efficient storage, retrieval, and
management of student information.\n",

"\n",

"---"

},

"cell_type": "markdown",

"metadata": {},

"source": [

" Database Design\n",

"We will create a database `student_db` and a table `students` with the following
fields:\n",

"- Roll Number (Primary Key)\n",

"- Name\n",

"- Course\n",

"- Marks\n",

"\n",

"---"
]

},

"cell_type": "code",

"execution_count": null,

"metadata": {},

"outputs": [],

"source": [

"import mysql.connector\n",

"\n",

"# connect to MySQL\n",

"conn = mysql.connector.connect(\n",

" host=\"localhost\",\n",

" user=\"root\",\n",

" password=\"your_password\"\n",

")\n",

"cursor = conn.cursor()\n",

"print(\" Connected to MySQL\")"

},

"cell_type": "code",

"execution_count": null,

"metadata": {},

"outputs": [],

"source": [
"# Create database and select it\n",

"cursor.execute(\"CREATE DATABASE IF NOT EXISTS student_db\")\n",

"cursor.execute(\"USE student_db\")\n",

"print(\" Database created and selected\")"

},

"cell_type": "code",

"execution_count": null,

"metadata": {},

"outputs": [],

"source": [

"# Create table students\n",

"cursor.execute(\"\"\"\n",

"CREATE TABLE IF NOT EXISTS students (\n",

" roll_no INT PRIMARY KEY,\n",

" name VARCHAR(100),\n",

" course VARCHAR(50),\n",

" marks INT\n",

")\n",

"\"\"\")\n",

"print(\" Table created\")"

},

"cell_type": "code",
"execution_count": null,

"metadata": {},

"outputs": [],

"source": [

"# Insert sample data\n",

"data = [\n",

" (1, \"Aman Sharma\", \"B.Tech CSE\", 85),\n",

" (2, \"Riya Singh\", \"B.Tech CSE\", 90),\n",

" (3, \"Vinayak Kumar\", \"B.Tech CSE\", 92)\n",

"]\n",

"cursor.executemany(\"INSERT INTO students VALUES (%s, %s, %s, %s)\", data)\n",

"conn.commit()\n",

"print(\"Data inserted\")"

},

"cell_type": "code",

"execution_count": null,

"metadata": {},

"outputs": [],

"source": [

"# Retrieve records\n",

"cursor.execute(\"SELECT * FROM students\")\n",

"for row in cursor.fetchall():\n",

" print(row)"

]
},

"cell_type": "markdown",

"metadata": {},

"source": [

" Results\n",

"The output above shows that we successfully created a database, inserted student
records, and retrieved them. \n",

"This system can be extended for attendance, fees, or grading automation.\n",

"\n",

"---"

},

"cell_type": "markdown",

"metadata": {},

"source": [

"Conclusion & Future Scope\n",

"- The project demonstrates how MySQL can manage student records. \n",

"- **Future Scope**: Add GUI using Tkinter/Flask, role-based access, cloud database
integration."

],

"metadata": {

"kernelspec": {

"display_name": "Python 3",


"language": "python",

"name": "python3"

},

"language_info": {

"name": "python",

"version": "3.10"

},

"nbformat": 4,

"nbformat_minor": 5

You might also like