: Data Insertion and Handling Nulls
Practice inserting, updating, and deleting data in a relational database while handling NULL values and ensuring data consistency.
- MySQL (Compatible with DB Fiddle / SQLiteStudio)
- SQL (Structured Query Language)
This task includes the creation and population of four core tables:
- customers β Stores customer information
- products β Stores product details
- orders β Stores order information
- order_items β Stores individual items in each order
- Added sample customers, products, orders, and order items
- Handled missing values using NULL where applicable
- Used INSERT INTO ... SELECT to duplicate a product entry
- Updated product stock after order placement
- Deleted a customer (Amit Singh) from the database
- Use of INSERT, UPDATE, DELETE statements
- Handling NULL values in fields like phone, address, and description
- Understanding of foreign key constraints between tables
- Safe and structured data manipulation with WHERE conditions
- ecommerce_task2.sql β contains all table creation, insertion, update, and delete queries
A populated and relationally consistent database ready for further queries, reporting, or analysis.
Parag Kotkar