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

SQLite Database Assignment

This document presents a case study proposal for an e-commerce website's order management system using SQLite, focusing on the issue of data corruption. It outlines the challenges of maintaining data integrity, proposes methodologies for mitigating corruption risks, and details a timeline for implementation and testing. The study emphasizes the importance of transaction management, error handling, and regular backups to ensure reliable order processing and improve customer satisfaction.

Uploaded by

sadia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

SQLite Database Assignment

This document presents a case study proposal for an e-commerce website's order management system using SQLite, focusing on the issue of data corruption. It outlines the challenges of maintaining data integrity, proposes methodologies for mitigating corruption risks, and details a timeline for implementation and testing. The study emphasizes the importance of transaction management, error handling, and regular backups to ensure reliable order processing and improve customer satisfaction.

Uploaded by

sadia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

University of Sargodha

Course : Advance Database Management System


MSIT Spring ( 1st Semester )
Submitted by : Asma Gul
Roll No : MSIT71S25S010
Submitted to : Dr. Bushra Jamil

Title : SQLite Database Proposal:

Case Study Proposal: E-Commerce Website's Order Management System Using


SQLite Database

Problem: Data Corruption

Introduction

In modern e-commerce websites, managing customer orders efficiently is paramount. The order
management system (OMS) allows businesses to track and process customer purchases, handle
inventory, and ensure timely deliveries. A key challenge faced by these systems is ensuring data
integrity and preventing data corruption, especially in transactional operations. Data corruption
can occur due to system crashes, hardware failures, or improper transaction management, leading
to inaccurate order records, lost sales, or customer dissatisfaction.

SQLite, being a lightweight, file-based relational database management system, is often used for
small-to-medium-scale e-commerce applications due to its simplicity and low overhead.
However, its single-file architecture can be susceptible to data corruption if not carefully
managed, especially during concurrent transactions.

This case study aims to explore an order management system for an e-commerce website using
SQLite and propose strategies to handle and mitigate data corruption risks.

Problem Statement
The problem this case study addresses is the risk of data corruption in an SQLite-based order
management system for an e-commerce website. This can manifest in various ways, such as:

 Inconsistent order data: Orders may be partially processed or incorrectly recorded.


 Inventory mismatches: Products marked as available may be out of stock due to
corruption during stock updates.
 Transaction failure: Incomplete or failed transactions leading to data inconsistency.

If left unchecked, these issues could degrade the user experience, affect inventory management,
and result in financial loss.

Questioning

1. What are the main challenges faced when using SQLite for an e-commerce platform?
2. What are the potential benefits of using SQLite over other database management systems
in this use case?
3. How would you handle a scenario where SQLite locks up and refuses to write any more
data during peak shopping times?
4. If data corruption were detected, what would the recovery process look like for the order
management system?
5. How does Write-Ahead Logging (WAL) help mitigate issues with data corruption in
SQLite, and what are its limitations?
6. What impact would database corruption have on the customer experience, and how
would you mitigate this effect?
7. How would you approach ensuring that the data remains consistent between the front-end
and back-end during high transaction volumes?
8. What key performance indicators (KPIs) should be tracked to ensure the health of the
SQLite database and prevent corruption?

Methodology

The methodology for this case study will involve several stages, including data modeling, system
design, and the identification of best practices to mitigate data corruption in SQLite. Below is an
outline of the steps involved:

1. Database Design:
o Schema Creation: Design the necessary tables such as orders, customers,
products, and order_items to handle the order management process.
o Transaction Management: Implement SQLite’s transaction handling capabilities
to ensure atomicity and consistency during order placement and updates.
2. Data Integrity Mechanisms:
o Transaction Rollback: Utilize SQLite’s BEGIN, COMMIT, and ROLLBACK features
to ensure that incomplete transactions are discarded, avoiding partial data updates.
oDatabase Backups: Regularly back up the SQLite database to recover data in
case of corruption or failure.
3. Error Handling and Validation:
o Concurrency Control: Use PRAGMA journal_mode = WAL (Write-Ahead
Logging) to manage concurrent write access to the database, reducing the chances
of data corruption.
o Integrity Checks: Implement consistency checks on the database using PRAGMA
integrity_check to detect corruption early.
4. Testing:
o Simulating Failures: Simulate various failure scenarios (e.g., system crashes
during order placement) to test how the system handles data integrity.
o Stress Testing: Test the system with high concurrent orders to assess its
robustness against data corruption.
5. Implementation and Deployment:
o Optimized Queries: Use indexing and optimized queries to ensure high
performance and minimize the chance of database lock-ups that could lead to
corruption.
o Monitoring Tools: Implement monitoring and alerting for database health and
integrity, notifying administrators of any issues.

Timelines

The project will be carried out in stages, with each stage having defined objectives and
deliverables. The estimated timeline for this project is as follows:

Phase Duration Description


Phase 1: Research & 2 weeks - Conduct in-depth research on SQLite’s
Design transaction handling.
- Design the database schema and prepare initial
models for the OMS.
Phase 2: Implementation 4 weeks - Build the database and application logic.
- Implement transaction management and error
handling mechanisms.
Phase 3: Testing & 3 weeks - Perform stress testing and simulate failures.
Optimization - Optimize queries and implement WAL mode for
concurrency control.
Phase 4: Deployment & 2 weeks - Deploy the system.
Review - Conduct final reviews and ensure backup
strategies are in place.

Total Estimated Time: 11 weeks


Review

At various stages of the development process, progress reviews will be conducted to evaluate the
system's effectiveness in preventing data corruption:

1. Mid-Phase Review (Week 3):


o Assess initial progress in database design and transaction handling.
o Evaluate if the error handling mechanism is functioning correctly during
simulated failures.
2. Pre-Deployment Review (Week 9):
o Conduct a final assessment of system performance after stress testing.
o Ensure that backup strategies and integrity checks are fully operational.
o Review security measures to protect sensitive data.
3. Post-Deployment Review (Week 11):
o Assess system reliability and monitor the database’s health.
o Review feedback from users on performance and data integrity.

Conclusion

Data corruption is a critical concern for any e-commerce website, particularly when using
SQLite, which can be vulnerable to concurrency and transaction-related issues. However, with
proper transaction management, database integrity checks, and regular backups, the risk of
corruption can be significantly mitigated.

This case study proposes a robust order management system for an e-commerce website using
SQLite, with a focus on preventing and handling data corruption. By leveraging SQLite’s built-
in features such as Write-Ahead Logging (WAL), implementing rigorous error handling, and
conducting regular integrity checks, we can create a resilient system that ensures consistent,
reliable order processing.

Once the system is deployed and thoroughly tested, it will ensure that e-commerce transactions
are processed smoothly, and data integrity is maintained, thus improving customer satisfaction
and business performance.
Journals:
Performance analysis on Android SQLite database
N Obradovic, A Kelec, I Dujlovic - 2019 18th International …, 2019 - ieeexplore.ieee.org

SQLite: past, present, and future


KP Gaffney, M Prammer, L Brasfield, DR Hipp… - Proceedings of the …, 2022 -
par.nsf.gov

[HTML] A standardized corpus for SQLite database forensics


S Nemetz, S Schmitt, F Freiling - Digital Investigation, 2018 - Elsevier

X-FTL: transactional FTL for SQLite databases


WH Kang, SW Lee, B Moon, GH Oh, C Min - Proceedings of the 2013 …, 2013 -
dl.acm.org

[HTML] A recovery method of deleted record for SQLite database


S Jeon, J Bang, K Byun, S Lee - Personal and Ubiquitous Computing, 2012 - Springer

You might also like