FINAL
FINAL
FINAL
TIRUCHIRAPPALLI
Project Report
Register No : RA2211003050151
Programme : B.Tech.CSE
REGISTER NO : RA2211003050151
BONAFIDE CERTIFICATE
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.
3
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.
4
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations, and give and receive
clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
5
H – High correlation, M – Medium Correlation, L – Low Correlation
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 -
6
Report Evaluation:
Test
Date Artifacts Total
Components Mark Split-up
Marks
7
Marks to be evaluated based on demo
Analyzing the pitfalls, and viva voce
27-03-2024 identifying the dependencies Demo - 4 Marks
4 and applying normalizations 10 Viva - 3 Marks
Report - 3 Marks
8
LABORATORY EXPERIMENTS MAPPED WITH CLO, PO, PSO
9
INDEX
Expt. Date of Name of the Page Marks Signature
No. Experiment Experiment No. (50) of Faculty
10
EXP.NO: 1
ABSTRACT
This abstract presents a PHP-MySQL based daily expense tracker designed to offer users a secure, efficient, and
user-friendly platform for managing their financial transactions. The system comprises three key tables:
"expenses," "expense_categories," and "users," facilitating organized data management and user authentication.
The "expenses" table stores detailed transaction information, including amount, date, description, and category,
ensuring accurate record-keeping and easy retrieval of expenditure data. Meanwhile, the "expense_categories"
table enables users to categorize expenses for streamlined analysis and budgeting purposes. Implemented through
PHP scripting, the system provides a secure login mechanism managed by the "users" table, ensuring only
authorized individuals can access and modify their financial data. With its intuitive interface, users can
seamlessly input, view, and manage their daily expenses, empowering them to make informed financial decisions
and achieve their budgeting goals effectively.
PROBLEM STATEMENT
Many individuals face challenges in effectively managing their daily expenses due to the limitations of existing
solutions:
1. Inefficient Expense Tracking: Current methods of expense tracking often result in disorganized financial
records, making it difficult for individuals to monitor their spending habits accurately.
2. Lack of User-Friendly Solutions: Many available expense tracking systems lack a user-friendly interface,
hindering users' ability to input, categorize, and analyze their expenses efficiently.
3. Security Concerns: Security vulnerabilities in existing expense tracking applications pose risks to users'
financial data, potentially leading to unauthorized access or data breaches.
4. Limited Features: Some expense tracking solutions offer only basic features, such as recording expenses
without robust categorization or analysis capabilities, limiting users' ability to gain insights into their
spending patterns. 11
These challenges underscore the need for a comprehensive daily expense tracker that integrates secure
authentication, efficient data management, intuitive user interface, and robust categorization and analysis
features. Such a solution would empower individuals to manage their finances effectively, make informed
financial decisions, and achieve their budgeting goals with confidence.
12
EXP.NO:2
RELATIONAL SCHEMA
DATABASE CREATION
13
Dumping data for table `expenses`
14
2.Creating expense categories table named “expense_categories”
17
EXP.NO:3
CONSTRAINTS
• Query to create a table with constraints:
CREATE TABLE employees (
employee_id INT PRIMARY KEY,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
department_id INT,
FOREIGN KEY (department_id) REFERENCES departments(department_id)
);
SETS
• Query to find the union of two tables:
SELECT * FROM table1
UNION
SELECT * FROM table2;
18
JOINS
• Query to perform an inner join:
SELECT *
FROM orders
INNER JOIN customers ON orders.customer_id = customers.customer_id;
19
EXP.NO:4
20
Normalization Actions:
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.
23
EXP.NO:6
25
EXP.NO:7
DATABASE CONNECTIVITY
<?php
$con = mysqli_connect("localhost","root","","dailyexpense");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error() ." | Seems like you haven't created the
DATABASE with an exact name";
}
?>
SQL CONNECTION
--
-- Database: `dailyexpense`
--
-- --------------------------------------------------------
--
-- Table structure for table `expenses`
--
-- --------------------------------------------------------
--
-- Table structure for table `expense_categories`
--
--
-- Dumping data for table `expense_categories`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
--
-- Dumping data for table `users`
--
--
-- Indexes for dumped tables
--
--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
ADD PRIMARY KEY (`expense_id`);
--
-- Indexes for table `expense_categories`
--
ALTER TABLE `expense_categories`
ADD PRIMARY KEY (`category_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`);
--
-- AUTO_INCREMENT for dumped tables
--
-- 28
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
MODIFY `expense_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=123;
--
-- AUTO_INCREMENT for table `expense_categories`
--
ALTER TABLE `expense_categories`
MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
COMMIT;
29
EXP.NO:8
2. Update Procedure
CREATE OR REPLACE PROCEDURE update_expense (
p_expense_id IN NUMBER,
p_amount IN NUMBER,
p_expense_date IN DATE,
p_category_id IN NUMBER
) AS
BEGIN
UPDATE expenses
SET expense = p_amount,
expensedate = p_expense_date,
category_id = p_category_id
WHERE expense_id = p_expense_id;
COMMIT;
END update_expense;
/
3. Delete Procedure
CREATE OR REPLACE PROCEDURE delete_expense (
p_expense_id IN NUMBER
) AS
BEGIN
DELETE FROM expenses
WHERE expense_id = p_expense_id;
COMMIT;
END delete_expense;
/
30
4. Retrieval Procedure
31
EXP.NO:9
FRONT END
1. LOGIN
2. DAHSBOARD
32
3ADD EXPENSES
4. MANAGE EXPENSES
33
5. EXPENSE REPORT
6. PROFILE
34
EXP.NO:10
REPORT GENERATION
35
EXP.NO:11
CONCLUSION
In conclusion, the expense tracking project represents a robust and user-centric solution designed to empower
individuals and businesses in managing their financial activities efficiently. Through a combination of modern
technologies and database management principles, the project offers a comprehensive suite of functionalities
tailored to meet the diverse needs of users. By leveraging the user management module, individuals can create
accounts securely, log in seamlessly, and personalize their profiles to suit their preferences. The expense
tracking module serves as the cornerstone of the project, enabling users to record, categorize, and analyze their
expenses effectively. This functionality not only provides users with valuable insights into their spending habits
but also equips them with the tools necessary to make informed financial decisions. Additionally, the reporting
module offers detailed reports and visualizations, allowing users to track their expenses over time and monitor
adherence to budgetary constraints. 36