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

DBMS Mini Project

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

DBMS Mini Project

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

ATM SYSTEM

18CSC209J - Database Management System and Cloud


Integration Services

Mini Project Report

Submitted by

B V N Rahul [Reg. No: RA2111028010192]


B.Tech. CSE – Cloud Computing

K Vineeth [Reg. No: RA2111028010179]


B.Tech. CSE – Cloud Computing

DEPARTMENT OF NETWORKING AND COMMUNICATION


SCHOOL OF COMPUTING
COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
(Under Section 3 of UGC Act, 1956)
S.R.M. Nagar, Kattankulathur – 603 203
Kancheepuram District
May 2023
BONAFIDE

This is to certify that 18CSC209J - DATABASE MANAGEMENT SYSTEM


AND CLOUD INTEGRATION SERVICES LABORATORY Mini Project report titled
“ATM SYSTEM” is the bonafide work of B V N Rahul (RA2111028010192),
K Vineeth (RA2111028010170) and who undertook the task of completing the project within
the allotted time.

Signature Signature

Dr. S. A. Angayarkanni Dr. Annapurani Panaiyappan K


Assistant Professor Professor and Head
Department of Networking and Department of Networking and
Communications Communications
SRM Institute of Science and SRM Institute of Science and
Technology Technology
TABLE OF CONTENTS

Chapter
Title Page No.
No.

1 Abstract 4

2 Introduction 5

3 Problem Statement 6

4 Module Description 6

5 Use case diagram 7

6 ER diagram 8

7 Database Creation using DDL and DML 9

8 Normalization of Database 13

9 Implementation using Dynamo DB 14

10 Scan Operations in DynamoDB 15

11 Conclusion 18

12 Appendix I - Screenshot 19

13 Appendix II - Portfolio 21

14 Appendix III - AWS Course Completion certificate 49


ABSTRACT

This project is focused on designing and implementing a Database Management System


for an ATM machine. The purpose of the system is to manage the operations and transactions
carried out by customers through the ATM machine. The system will store all relevant
information about the customers, their accounts, transactions, and ATM machine operations.

The database will be designed to handle various types of transactions such as


withdrawals, deposits, and balance inquiries. It will also keep track of account balances and
generate reports on transaction history. The system will utilize a user-friendly interface that
will ensure that the transactions are fast, secure, and reliable. The system will be designed to
ensure security by providing appropriate access controls and authentication protocols. The
system will be designed to optimize performance to ensure that transactions are processed
quickly and efficiently.

The ATM machine will be designed using a combination of hardware and software
components. The hardware components will include a keypad, card reader, dispenser, and
display screen. The software components will include the operating system, user interface, and
transaction processing system. The project will also focus on implementing security measures
such as authentication, authorization, and encryption to protect user data from unauthorized
access.

The project will be implemented using a MySQL database. The user interface will be
developed using Java Swing, and the database will be connected to the interface using JDBC.
Overall, this project aims to provide a reliable and efficient DBMS for an ATM machine that
can handle a large volume of transactions while maintaining data accuracy and security. The
implementation of this project will improve the efficiency and accuracy of the banking
operations and enhance the overall user experience.
Introduction:

Automated Teller Machine enables the clients of a bank to have access to their account
without going to the bank. This is achieved only by developing the application using online
concepts. When the product is implemented, the user who uses this product will be able to see
all the information and services provided by the ATM, when he enters the necessary option
and arguments. The product also provides services like request for cheques, deposit cash and
other advanced requirements of the user. The data is stored in the database and is retrieved
whenever necessary. The implementation needs ATM machine hardware to operate, or similar
simulated conditions can also be used to successfully use the developed product.

The program is designed in such a way that the user must card and pin number. Once
verified, he is provided a menu and he/she had to enter the option provided in the menu. For
example, when the user wants to view the list of payment history than he/she had to enter the
option for payment history provided in the main menu. When the option is entered alone with
the respective argument, then the payment history is displayed on the screen. The project will
also focus on implementing security measures such as authentication, authorization, and
encryption to protect user data from unauthorized access.

The user also must be given the option to browse through the pages like previous page,
next page, etc. The user may experience a delay in retrieving or viewing the data, when there
are many users logged on to the same bank branch system.

To develop this ATM system the entire operation has been divided into the following step:

1. Verification process

2. Language, service and account selection

3. Banking services

4. Transactions

5. Special services
Problem Statement:

The project entitled ATM system has a drastic change to that of the older version of
banking system, customer feel inconvenient with the transaction method as it was in the hands
of the bank employees. In our ATM system, the above problem is overcome here, the
transactions are done in person by the customer thus makes the customers feel safe and secure.
Thus, the application of our system helps the customer in checking the balance and transaction
of the amount by validating the pin number therefore ATM system is more user friendly.

Module Description:

Branch Accounting System: This system contains several branches’ information, for example
the number of users, etc. Whenever the atm card is swiped the atm system will refer to this
system and then proceed.

Account Database: The account database consists of details of different accounts of users from
different branches. It will contain the account status of the user which gets referred during
transactions. It retrieves account information from the database management module and
presents it to the user.

Branch Counter System: This database keeps the count of branches and will accommodate
any changes made with branches and their users.

Maintenance System: This system will maintain the cash fed into the machine. If the machine
runs out of cash, prompts regarding the same will be sent by the machine to the users and the
main database from where it will be sent to the atm managers. The performance optimization
module ensures that transactions are processed quickly and efficiently.

Security system: This system will lookout for ATM thefts and send messages immediately to
the bank. The system uses industry-standard encryption algorithms to ensure that data is always
secure.
Use case diagram:

A use case diagram is a diagram which consists of set of use cases and actors enclosed
by system boundary, and association between use cases and actors. Use cases diagram
especially important in organizing, modelling the behaviour of the system. Use case diagram
outlines the various actions that a user can take when interacting with the system, and how the
system responds to those actions.

Use case is a set of scenarios tied together by a common user goal. A scenario is a
sequence of steps describing the interaction between a user and system. Overall, the use case
diagram for an ATM system helps to identify the different ways that users interact with the
system and the system's response to these interactions. By understanding these interactions, the
system can be designed to be efficient, dependable, and easy to use, while also meeting the
needs of its users.
ER Diagram:

An essential tool for financial organisations, an ATM Entity-Relationship Diagram


(ERD) can help to identify and represent the relationships between data entities. It is a graphical
representation of not only the data structures within a system but also the relationships between
different pieces of information. Used to define the structure of a database, it shows how tables
and data elements in the database are related to each other.

An ATM ERD diagram can be used for a variety of financial applications, like tracking
account data, generating reports, recording banking transactions, and more. It is a necessary
tool for organisations to effectively plan and manage their financial activities. By
understanding these relationships, the database can be designed to efficiently store and retrieve
data, while also ensuring the integrity of the data and the security of the system.
Database Creation using DDL and DML:

We use the DDL commands for creating the database or schema, while DML
commands are used to populate and manipulate the database. DDL commands can affect the
whole database or table, whereas DML statements only affect single or multiple rows based on
the condition specified in a query.

For ATM System by using DDL commands we can create the databases like bank,
ATM Machine, customer, card, transaction etc., and by using DML commands we can insert,
update, delete, commit and rollback the values in each table.

Creating table for Bank:


CREATE TABLE bank (
bank_id INT NOT NULL PRIMARY KEY,
bank_name VARCHAR (50),
bank_location VARCHAR (50),
bank_contact VARCHAR (20),
bank_email VARCHAR (50)
);
--Insert values into Bank table
INSERT INTO bank (bank_id, bank_name, bank_location, bank_contact, bank_email)
VALUES
(1, 'ABC Bank', 'New York', '+1-234-567-8901', 'info@abcbank.com'),
(2, 'XYZ Bank', 'Los Angeles', '+1-987-654-3210', 'info@xyzbank.com'),
(3, 'DEF Bank', 'Chicago', '+1-123-456-7890', 'info@defbank.com'),
(4, 'GHI Bank', 'San Francisco', '+1-567-890-1234', 'info@ghibank.com'),
(5, 'JKL Bank', 'Miami', '+1-890-123-5678', 'info@jklbank.com');
Creating table for ATM machine:
CREATE TABLE atm_machine (
atm_id INT NOT NULL PRIMARY KEY,
location VARCHAR(50),
balance DECIMAL(10,2),
bank_id INT,
FOREIGN KEY (bank_id) REFERENCES bank(bank_id)
);
--Insert values into ATM Machine table
INSERT INTO atm_machine (atm_id, location, balance, bank_id)
VALUES
(1, 'Times Square, New York', 50000.00, 1),
(2, 'Beverly Hills, Los Angeles', 75000.00, 2),
(3, 'Downtown, Chicago', 40000.00, 3),
(4, 'Union Square, San Francisco', 30000.00, 4),
(5, 'South Beach, Miami', 20000.00, 5);

Creating table for Customer:


CREATE TABLE customer (
customer_id INT NOT NULL PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(50),
phone_number VARCHAR(20),
account_number VARCHAR(50),
pin INT,
bank_id INT,
FOREIGN KEY (bank_id) REFERENCES bank(bank_id) );
--Insert values into Customer table
INSERT INTO customer (customer_id, first_name, last_name, email, phone_number,
account_number, pin, bank_id)
VALUES
(1, 'John', 'Doe', 'john.doe@gmail.com', '+1-234-567-8901', '123456789', 1234, 1),
(2, 'Jane', 'Smith', 'jane.smith@gmail.com', '+1-987-654-3210', '987654321', 4321, 2),
(3, 'Alice', 'Johnson', 'alice.johnson@gmail.com', '+1-123-456-7890', '789456123', 5678, 3),
(4, 'Bob', 'Williams', 'bob.williams@gmail.com', '+1-567-890-1234', '456789123', 8765, 4),
(5, 'Charlie', 'Brown', 'charlie.brown@gmail.com', '+1-890-123-5678', '321987456', 2345,5);

Create Card table:


CREATE TABLE card (
card_number VARCHAR(50) NOT NULL PRIMARY KEY,
customer_id INT,
expiration_date DATE,
cvv INT,
card_type VARCHAR(50),
bank_id INT,
FOREIGN KEY (customer_id) REFERENCES customer(customer_id),
FOREIGN KEY (bank_id) REFERENCES bank(bank_id)
);
-- Insert values into Card table
INSERT INTO card (card_number, customer_id, expiration_date, cvv, card_type, bank_id)
VALUES
('1234567812345678', 1, '2024-10-31', 123, 'VISA', 1),
('2345678923456789', 2, '2023-06-30', 234, 'MasterCard', 2),
('3456789034567890', 3, '2022-09-30', 345, 'VISA', 3),
('4567890145678901', 4, '2023-12-31', 456, 'Discover', 4),
('5678901256789012', 5, '2024-05-31', 567, 'MasterCard', 5);
Create Transaction table:
CREATE TABLE transaction (
transaction_id INT NOT NULL PRIMARY KEY,
card_number VARCHAR(50),
atm_id INT,
transaction_date DATETIME,
transaction_type VARCHAR(50),
amount DECIMAL(10,2),
balance DECIMAL(10,2),
FOREIGN KEY (card_number) REFERENCES card(card_number),
FOREIGN KEY (atm_id) REFERENCES atm_machine(atm_id)
);
-- Insert values into Transaction table
INSERT INTO transaction (transaction_id, card_number, atm_id, transaction_date,
transaction_type, amount, balance)
VALUES
(1, '1234567812345678', 1, '2023-04-20 09:30:00', 'Withdrawal', 100.00, 4900.00),
(2, '2345678923456789', 2, '2023-04-20 10:00:00', 'Deposit', 500.00, 75500.00),
(3, '3456789034567890', 3, '2023-04-20 11:30:00', 'Withdrawal', 200.00, 3800.00),
(4, '4567890145678901', 4, '2023-04-20 13:45:00', 'Balance Inquiry', 0.00, 30000.00),
(5, '5678901256789012', 5, '2023-04-20 16:15:00', 'Withdrawal', 50.00, 19950.00);
Normalization of Database:

Normalization is an important process in database design to ensure data integrity


and reduce redundancy. In the case of an ATM (automated teller machine) system,
normalization is essential to ensure that customer account information is safely stored and can
be accessed efficiently.

There are several levels of normalization, with each level building upon the previous one. The
most used levels are:

First Normal Form (1NF): This level requires that each table has a primary key and that all
columns in the table are atomic (i.e., cannot be further divided).
In an ATM system, the account information can be stored in a single table with columns
such as account number, account balance, customer name, and PIN. The account number can
serve as the primary key for this table.

Second Normal Form (2NF): This level requires that all non-key attributes be dependent on
the entire primary key.
For an ATM system, the account information table may need to be split into two tables
to satisfy 2NF. One table could contain the account number and balance, while the other table
could contain the customer’s name and PIN. This ensures that customer information is not
duplicated and that changes to one record do not affect other records.

Third Normal Form (3NF): This level requires that all non-key attributes be not dependent
on any other non-key attributes.
For an ATM system, the customer information table may need to be split further into two
tables to satisfy 3NF. One table could contain the customer’s name and address, while the other
table could contain the customer's PIN. This ensures that customer information is not
duplicated and that changes to one record do not affect other records.
Normalization helps to minimize data redundancy and ensure that data is consistent and
accurate. By following the normalization process, an ATM system can be designed to
efficiently store and retrieve customer account information, making it a reliable and secure
financial service for customers.
Implementation using Dynamo DB:
DynamoDB is a NoSQL database service offered by AWS that is designed to provide
fast and scalable performance. For an ATM system, DynamoDB can be used to store customer
account information and transaction data.

1.Define the data model: Determine the data you need to store for the ATM system. For
example, you may need to store information about Customer details like account number,
name, account balance.

2.Create a DynamoDB table: Create a table in DynamoDB to store the data. Define the
primary key for the table, which could be a single partition key or a combination of a partition
key and a sort key.

3.Define the table schema: Define the attributes that you want to store in the table. You can
also specify any secondary indexes that you want to create.

 Here is an implementation for an ATM system using DynamoDB:


Create a table for customer account information:
The table can have the following attributes:
Account Number (partition key)
Account Balance
Customer Name
PIN

Create a table for transaction history:


The table can have the following attributes:
Account Number (partition key)
Timestamp (sort key)
Transaction Type (withdrawal, deposit, transfer)
Amount Balance
❖ Create an IAM role with appropriate permissions for accessing DynamoDB
For account information: you can use the DynamoDB API to create, read, update, and delete
records in the table. You can also use the Query operation to retrieve customer account
information by account number.

For transaction history: you can use the Put Item operation to add a new transaction to the
table, and the Query operation to retrieve transactions for a specific account number within a
given time range.

Ensure data consistency and prevent race conditions, use conditional writes to update
account balances when processing transactions. For example, when processing a withdrawal,
you can use a conditional write to ensure that the account balance is sufficient before
subtracting the amount from the balance. Use DynamoDB streams to capture changes to the
transaction history table and trigger appropriate actions such as sending alerts or updating
account balances in real-time.

Use DynamoDB's scalability features, such as auto-scaling and partitioning, to


ensure that the system can handle increasing traffic and transaction volumes. In summary,
DynamoDB can be a reliable and scalable choice for implementing an ATM system, with the
flexibility to store and retrieve data quickly and efficiently and handle high levels of traffic and
transaction volumes.

Scan Operations in DynamoDB

Creating DynamoDB table using AWS CLI:


1. Open AWS Cloud Shell and select the region where you want to create the table. You can
choose the region from the dropdown menu in the top-right corner of the Cloud Shell
window.
2. Launch the AWS CLI terminal in Cloud Shell by clicking on the "Open Terminal" button
in the top-right corner of the Cloud Shell window.
3. Create a JSON file with the table schema. For example, create a file named table schema
json with the following contents: JSON - Using a JSON document database, you can store
each user's profile efficiently by storing only the attributes that are specific to each user.
EX:
echo '{
"TableName": "my_table",
"KeySchema": [
{
"AttributeName": "my_partition_key",
"KeyType": "HASH"
},
{
"AttributeName": "my_sort_key",
"KeyType": "RANGE"
}
],
"AttributeDefinitions": [
{
"AttributeName": "my_partition_key",
"AttributeType": "S"
},
{
"AttributeName": "my_sort_key",
"AttributeType": "N"
}
],
"BillingMode": "PAY_PER_REQUEST"
}' > table_schema.json

Create the table by running the following AWS CLI command:


aws dynamodb create-table --cli-input-json file://table_schema.json

To check the status of the table by running the following AWS CLI command:
aws dynamodb describe-table --table-name my_table

To add data:
{
"my_partition_key": {"S": "my_partition_key_value"},
"my_sort_key": {"N": "1"},
"attribute1": {"S": "value1"},
"attribute2": {"N": "2"}
}
Use the ‘AWS DynamoDB put item’ command to add the item to the table. Run the
following command:
AWS DynamoDB put-item --table-name my table --item file://item.json

Verify that the item has been added by using the aws DynamoDB get-item command.
Run the following command:
aws dynamodb get-item --table-name my_table --key '{"my_partition_key":
{"S":"my_partition_key_value"}, "my_sort_key": {"N": "1"}}'

You can add more items by repeating the steps above with different data in the
‘item.json’file.

Scan Operations:
Scanning a table for all items:
This command scans the my_table table and returns all items in the table
aws dynamodb scan --table-name my_table

If the table has many items, you may need to paginate the results to retrieve all items. To do
this, add the --page-size parameter to the aws dynamodb scan command and specify the
maximum number of items to retrieve per page. For example, to retrieve 100 items per page,
run the following command:
aws dynamodb scan --table-name my_table --page-size 100

Scanning a table with filter expression:


First run this command to scan with a filter expression.
aws dynamodb scan --table-name my_table --filter-expression "attribute1 = :value" -
expression-attribute-values '{":value":{"S":"value1"}}'

Next verify the results by this command


aws dynamodb scan --table-name my_table --filter-expression "attribute1 = :value" --
expression-attribute-values '{":value":{"S":"value1"}}' | jq '.Items[].{attribute1:.attribute1.S,
attribute2:.attribute2.N}'
Scanning a table with a projection expression:
Run the aws dynamodb scan command with the --table-name parameter to specify the name
of the table you want to scan, and the --projection-expression parameter to specify the
attributes you want to include in the scan. For example, to scan a table named my_table and
include only the attribute1 and attribute2 attributes in the results, run the following command:
aws dynamodb scan --table-name my_table --projection-expression "attribute1, attribute2" --
max-items 100

Scanning a table with a limit:


aws dynamodb scan --table-name my_table --limit 10

Scanning table with a parallel scan:


aws dynamodb scan --table-name my_table --total-segments 10

use this for scanning the first segment:


aws dynamodb scan --table-name my_table --total-segments 10 --segment 0

Conclusion:
The ATM System project in DBMS is a comprehensive system that aims to provide
secure and convenient banking services to customers. The system is designed with a robust
database management system that ensures the security, integrity, and consistency of data.
Overall, the ATM System project in DBMS is an excellent solution for banks that seek to
provide efficient and reliable banking services to their customers.
APPENDIX - I

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy