0% found this document useful (0 votes)
1 views

Assignment_Db_Python_ 01

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)
1 views

Assignment_Db_Python_ 01

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

Assignment 01

Topic: Data base Programming with Python

Submission Deadline: 27 Nov, 2024

Only : 02

1. Database Connection and Data Manipulation

Task: Using Python, connect to a MySQL or SQLite database and perform basic operations (CRUD: Create,
Read, Update, Delete) on a table. The table should store employee data (ID, Name, Department, Salary).

Objective: To gain hands-on experience in connecting Python with a database and performing database
operations.

2. SQL Query Optimization

Task: Write and execute an SQL query to fetch data from multiple tables (e.g., orders, customers, and
products) and optimize it for performance by using proper indexing and joins.

Objective: To learn about SQL query optimization techniques and the importance of indexing and joins
for performance.

3. Python Database Security (Preventing SQL Injection)

Task: Implement a Python application that interacts with a database, and ensure that user inputs (such
as login credentials) are sanitized to prevent SQL injection attacks.

Objective: To understand SQL injection risks and how to secure database queries in Python using
parameterized queries.

4. Database Schema Design and Normalization

Task: Design a database schema for an e-commerce platform that includes tables for products, users,
orders, and payments. Normalize the schema to at least the third normal form (3NF).

Objective: To practice database design principles and normalization techniques to reduce redundancy
and improve data integrity.

5. Python Database Cursor Usage

Task: Write a Python program that connects to a MySQL or PostgreSQL database and retrieves all records
from a table using a database cursor. Implement error handling for database connection failures.

Objective: To understand how to use database cursors for querying data in Python and to handle
exceptions during database operations.

You might also like