Class 11 IP Project Python SQL
Class 11 IP Project Python SQL
This document outlines an IP Project for Class 11 students integrating Python and SQL. The project
aims to demonstrate CRUD operations using Python as the frontend and SQL as the backend
database.
Objectives
- Understand how to integrate Python with SQL.
Requirements
- Python 3.x
- MySQL Server
Project Outline
1. **Database Design:**
- `name` (VARCHAR(50))
- `age` (INT)
- `class` (VARCHAR(10))
2. **Python Code:**
3. **Execution:**
Sample Code
import mysql.connector
conn = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="school"
cursor = conn.cursor()
# Insert Data
cursor.execute("INSERT INTO students (name, age, class) VALUES (%s, %s, %s)", ('John
conn.commit()
# Fetch Data
print(row)
conn.close()