Rishit Sharma S22 108 Python EXP6
Rishit Sharma S22 108 Python EXP6
Aim: To study and implement program on demonstrating CRUD (create, read, update and delete)
operations on database (SQLite/ MySQL) using python
Theory:
sqlite3 is a built-in Python module that provides an interface for interacting with SQLite databases.
SQLite is a lightweight, self-contained, serverless database engine that stores data in a single file. It is
commonly used for small to medium-sized applications, including mobile apps and desktop software.
Features of sqlite3 in Python:
• No external dependencies: It comes pre-installed with Python.
• Lightweight: Doesn't require a separate server or setup.
• ACID-compliant: Ensures reliability through transactions.
• Uses SQL syntax: Supports standard SQL commands.
Code:
import sqlite3
# Create a database connection
conn = sqlite3.connect('example.db')
c = conn.cursor()