DBMS Report Final
DBMS Report Final
Systems
Project Report
Semester : IV
BONAFIDE CERTIFICATE
RA2211003050152 of II / IV (Semester/Year),
2023-2024.
Examiner-1 Examiner-2
SRM Institute of Science and Technology
Faculty of Engineering and Technology
School of Computing
Department of Computational Intelligence
VISION AND MISSION OF THE DEPARTMENT
Vision
To become a world-class department in imparting high-quality knowledge and providing students
with a unique learning and research experience in Computer Science and Engineering.
Mission
PEO - 2 Graduates will be able to successfully pursue higher education in reputed institutions.
PEO - 3 Graduates will have the ability to adapt, contribute and innovate new technologies and
systems in the key domains of Computer Science and Engineering.
PEO - 4 Graduates will be ethically and socially responsible solution providers and
entrepreneurs in Computer Science and other engineering disciplines.
PEO - 5 Graduates will possess the additional skills in core computer science discipline with
knowledge of Hardware, Software, Programming, Logic & Reasoning.
COURSE DESIGN
Course Learning At the end of this course, learners will be able to:
Outcomes (CLO):
CO – 1 Acquire knowledge on DBMS architecture and languages
CO – 2 Acquire knowledge on Relational languages and design a database
CO – 3 Implement the Database structure with SQL
CO – 4 Removal of anomalies using Normalization concepts
CO – 5 Visualizing storage structure, handling concurrency, Failure and
recovery principles, NoSQL concept
CLO-PO Mapping
Analysis, Design,
Communication
Environment &
Sustainability
Research
PSO – 3
PSO - 1
PSO - 2
Ethics
Work
CO1 - 2 - - - - - - - - - - 2 1 -
CO2 1 2 - - - - - - - - - - 2 1 -
CO3 1 - 2 - - - - - - - - - 2 1 -
CO4 1 - - - - - - - - - - - 2 1 -
CO5 1 2 - - - - - - - - - - 2 1 -
Report Evaluation:
Test
Date Artifacts Total
Components Mark Split-up
Marks
(b)Problem understanding,
Identification of Entity and
Relationships, Construction
of DB using ER Model for
your project
2 28-02-2024 Design of Relational
Schemas, Creation of
Database and Tables for your
project
3 27-03-2024 SQL Queries based on the
concepts of constraints, sets,
joins
4 27-03-2024 Applying Normalization for
your project
5 27-03-2024 Concurrency control and
Recovery mechanisms for
your project
6 15-04-2024 Module Description and
Functionalities
7 15-04-2024 Database Connectivity and
Embedded
SQL operations
8 29-04-2024 PL/SQL procedures to
Operate on the database of
your project
9 29-04-2024 Front End Design, Sample
Code foreach module, Screen
Shots for eachmodule
10 07-05-2024 Report Generation using
Crystal Reports/Report
Generation Tool
11 07-05-2024 Online Course Completion
Certificate
EXP.NO: 1
ABSTRACT
COVID19 Testing Management System is one of the most essential tools that are mostly used in Testing
Lab; it is mostly used to manage COVID19 medical lab related activities.In this project we tried to develop a
computerized and web based COVID19 Testing management system. Our main intention is to allow this
application to be used in most retailing COVID19 lab, where a small point of customization will be required to
each COVID19 lab in the implementation period. This system is designed to overcome all challenges related to
the management of diagnostic that were used to be handled locally and manually.
The system is an online COVID19 lab manager application that brings up various COVID19 test working online.
Using this system, it will help us to records all transaction made at the daily tests; recognize all customers,
employees, etc. It will manage all activities around the COVID19 lab that increases productivity and maximize
profit, it will also minimizing the risk of getting loss because all transactions are recorded to the system.
PROBLEM STATEMENT
In light of the ongoing global COVID-19 pandemic, the existing infrastructure of testing labs faces significant
challenges in efficiently managing the ever-increasing volume of tests. The manual processes currently in place
are prone to errors, delays, and inefficiencies, posing risks to both patients and healthcare providers. Below are
some key points outlining the issues faced by testing labs:
1. Inadequate Infrastructure: Many testing labs operate with outdated or insufficient infrastructure, leading
to bottlenecks in sample processing, reporting, and data management.
2. Manual Processes: Current practices rely heavily on manual data entry, paperwork, and communication,
which are time-consuming and error-prone. This increases the likelihood of inaccuracies in test results,
patient records, and financial transactions.
3. Limited Scalability: With the surge in demand for COVID-19 testing, labs struggle to scale their
operations to meet the growing needs of the population. Manual processes hinder the ability to efficiently
process a large number of tests within a short timeframe.
4. Lack of Centralized Information: The absence of a centralized system for managing test data, patient
information, and lab resources makes it challenging to track and trace COVID-19 cases accurately. This
poses risks to public health and impedes efforts to control the spread of the virus.
5. Resource Management Challenges: Manual scheduling of appointments, allocation of testing kits, and
assignment of staff resources are prone to errors and inefficiencies. This can lead to delays in testing,
increased waiting times for patients, and decreased overall productivity.
6. Compliance and Reporting: Meeting regulatory requirements and reporting standards is essential for
testing labs. Manual record-keeping makes it difficult to ensure compliance with regulatory guidelines and
to generate accurate reports for public health authorities.
7. Data Security Concerns: Paper-based systems lack adequate security measures to protect sensitive patient
information and test results. This leaves testing labs vulnerable to data breaches, privacy violations, and
regulatory penalties.
RELATIONAL SCHEMA
DATABASE CREATION
GovtIs Registr
MobileNu DateOfBirt GovtIs suedId FullAdd ationDa
id FullName mber h suedId No ress State te
1 Anuj 1234567890 1999-02-01 Driving 342545445345
A83748 Delhi 2021-04
Kumar License New -27
Delhi 17:31:22
India
2 Sarita 6547893210 1990-05-09 Pancar HHHG H Uttar 2021-04
d HGH88 826273 Pradesh -27
88jh Noida 18:04:57
4 Garima 4598520125 2005-01-08 Pancar DDDKJ A-1234 Bihar 2021-05
Singh d KJ4545 Patna -08
45H 05:49:44
5 Amit 2536987410 2007-06-01 PANCA HJGGH H 37334 Delhi 2021-05
Singh RD G76767 New -08
HGGH Delhi 09:25:50
6 Rahul 1234567899 2003-06-05 Driving 5435345 ABC 123 Uttar 2021-05
Yadav License XYZ Pradesh -08
Street 09:29:22
Noida
3.Creating phlebotomist table named “tblphlebotomist”
Pati
ent
Mo
bile Repo Assig
Orde Nu TestT Repo Final rtUpl Regis nedto Assig Assig
rNu mb TestT imeSl rtStat Repo oadTi tratio EmpI ntoN nedTi
id mber er ype ot us rt me nDate d ame me
1 450040675
1234567890
Antig 2021- Delive 2c86e 07-05 2021- 12587493 Amit 06-05
en 05-01 red 2aa7e -2021 04-27 Singh -2021
T04:0 b4cb4 01:31: 17:31: 10:05:
5 db703 48 23 22
79e28 AM AM
fab9b
52162
03313
08.pdf
2 617325549
6547893210
RT- 2021- Delive 2c86e 07-05 2021- 105202365Rahul 07-05
PCR 05-01 red 2aa7e -2021 04-27 -2021
T05:1 b4cb4 10:27: 18:04: 10:13:
0 db703 20 58 41
79e28 AM AM
fab9b
52162
03634
40.pdf
4 740138296
1234567890
RT- 2021- Assig NULL NULL 2021- 105202365Rahul 07-05
PCR 05-05 ned 04-27 -2021
T14:4 19:10: 03:52:
0 30 05
PM
5 716060226
4598520125
CB- 2021- NULL NULL NULL 2021- NULL NULL NULL
NAAT 05-15 05-08
T14:2 05:49:
2 46
6 599452326
2536987410
CB- 2021- NULL NULL NULL 2021- NULL NULL NULL
NAAT 05-20 05-08
T19:0 09:25:
0 50
7 250482553
1234567899
Antig 2021- Delive 2c86e 08-05 2021- 12587493 Amit 08-05
en 05-11 red 2aa7e -2021 05-08 Singh -2021
T15:0 b4cb4 03:02: 09:29: 03:00:
0 db703 51 22 47
79e28 PM PM
fab9b
52162
04663
71.pdf
EXP.NO:3
CONSTRAINTS
• Creating tables with primary key constraints:
CREATE TABLE Patients (
PatientID INT PRIMARY KEY,
FullName VARCHAR(120),
MobileNumber BIGINT(12),
DateOfBirth DATE,
-- Other patient details
);
SETS
• Union of two tables to get unique records:
SELECT * FROM Lab1_TestRecords
UNION
SELECT * FROM Lab2_TestRecords;
• Left join to get all patient records along with their test records, even if they haven't taken tests:
SELECT Patients.FullName, TestRecords.OrderNumber
FROM Patients
LEFT JOIN TestRecords ON Patients.PatientID = TestRecords.PatientID;
EXP.NO:4
1. Concurrency Control:
• Locking Mechanisms: Implement locks to control access to critical resources such as patient records, test results,
and administrative functions. Use shared locks for read operations and exclusive locks for write operations to
prevent conflicts.
• Timestamp-based Concurrency Control: Assign timestamps to transactions and use them to order and schedule
concurrent transactions. Ensure that transactions with conflicting operations are executed in the correct order to
maintain consistency.
• Optimistic Concurrency Control: Given that the system deals with a significant number of read operations,
consider optimistic concurrency control techniques such as validation checks at the time of commit to detect
conflicts.
• Multi-Version Concurrency Control (MVCC): Maintain multiple versions of test records to allow concurrent
transactions to access data without blocking. Use timestamps or version numbers to ensure data consistency.
2. Recovery Mechanisms:
• Transaction Logging: Log all database modifications, including patient registrations, test orders, and test results.
Use a robust logging mechanism to ensure that changes are recorded before they are applied to the database.
• Checkpointing: Periodically save the current state of the database to stable storage to provide a starting point for
recovery in case of a system crash. Consider scheduling checkpoints during off-peak hours to minimize disruption.
• Transaction Rollback: Implement mechanisms to rollback incomplete transactions in case of failures or user
aborts. Ensure that partial changes made by aborted transactions are undone to maintain database consistency.
• Undo/Redo Logging: Log both undo and redo information to support database recovery. In the event of a crash,
use redo logs to reapply committed transactions and undo logs to rollback uncommitted changes.
• Savepoints: Allow transactions to define savepoints to mark intermediate states. This enables users to rollback to a
specific point in case of errors without losing all transaction progress.
3. Isolation Levels:
• Define appropriate isolation levels to control the visibility of data changes to concurrent transactions. Given the
sensitivity of patient data, consider using a higher isolation level such as Serializable to ensure strict data
consistency.
• Ensure that transactions are executed in a consistent manner, considering factors like data integrity, confidentiality,
and performance.
• If your system is distributed across multiple testing labs or facilities, ensure that concurrency control and recovery
mechanisms are designed to work in a distributed environment.
• Implement distributed deadlock detection algorithms to detect and resolve deadlocks between distributed
transactions.
• Use distributed commit protocols such as Two-Phase Commit (2PC) to coordinate transaction commits across
distributed nodes and ensure atomicity and consistency.
EXP.NO:6
DATABASE CONNECTIVITY
<?php
//time zone
date_default_timezone_set('Asia/Kolkata');
//database connection
$con=mysqli_connect("localhost","root","","covidtmsdb");
if(mysqli_connect_errno()){
echo "Connection Fail".mysqli_connect_error();
}
?>
SQL CONNECTION
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 08, 2021 at 03:05 PM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.2.19
--
-- Database: `covidtmsdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `tbladmin`
--
--
-- Dumping data for table `tbladmin`
--
-- --------------------------------------------------------
--
-- Table structure for table `tblpatients`
--
--
-- Dumping data for table `tblpatients`
--
-- --------------------------------------------------------
--
-- Table structure for table `tblphlebotomist`
--
--
-- Dumping data for table `tblphlebotomist`
--
-- --------------------------------------------------------
--
-- Table structure for table `tblreporttracking`
--
--
-- Dumping data for table `tblreporttracking`
--
-- --------------------------------------------------------
--
-- Table structure for table `tbltestrecord`
--
--
-- Dumping data for table `tbltestrecord`
--
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tbladmin`
--
ALTER TABLE `tbladmin`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `tblpatients`
--
ALTER TABLE `tblpatients`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `tblphlebotomist`
--
ALTER TABLE `tblphlebotomist`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `tblreporttracking`
--
ALTER TABLE `tblreporttracking`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `tbltestrecord`
--
ALTER TABLE `tbltestrecord`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tbladmin`
--
ALTER TABLE `tbladmin`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `tblpatients`
--
ALTER TABLE `tblpatients`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `tblphlebotomist`
--
ALTER TABLE `tblphlebotomist`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `tblreporttracking`
--
ALTER TABLE `tblreporttracking`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT for table `tbltestrecord`
--
ALTER TABLE `tbltestrecord`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
COMMIT;
2. Update Procedure
CREATE OR REPLACE PROCEDURE UpdatePatientAddress(
p_patient_id IN NUMBER,
p_new_address IN VARCHAR2
) AS
BEGIN
UPDATE tblpatients
SET FullAddress = p_new_address
WHERE id = p_patient_id;
COMMIT;
END;
/
3. Delete Procedure
CREATE OR REPLACE PROCEDURE DeletePatient(
p_patient_id IN NUMBER
) AS
BEGIN
DELETE FROM tblpatients
WHERE id = p_patient_id;
COMMIT;
END;
/
4. Retrieval Procedure
5. Advanced Procedure
FRONT END
1. ADMIN LOGIN
2. ADMIN DAHSBOARD
3. USER DASHBOARD
4. MANAGE PHLEBOTOMIST
5. TEST
6. REPORT
7. CUSTOMER DASHBOARD
8. TEST REGISTRATION
EXP.NO:10
REPORT GENERATION
EXP.NO:11
CONCLUSION
The COVID19 Testing Management System serves as a crucial solution for the effective management of
activities within COVID19 testing laboratories. Developed as a web-based application, its primary objective is
to streamline operations while accommodating the unique requirements of each testing facility. By digitizing
and automating processes such as patient registration, test tracking, and report generation, the system aims to
enhance efficiency and accuracy in diagnostic management. Throughout its development, particular emphasis
was placed on overcoming challenges associated with manual handling of diagnostic procedures. Transitioning
to an online platform has not only centralized data but also facilitated real-time monitoring of test progress,
ensuring prompt delivery of results to patients. The modular design of the system allows for scalability and
customization, making it adaptable to diverse testing environments.