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

Advanced Database Project Group 8 Bank Managment System Database

Uploaded by

Daniel Wasihun
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Advanced Database Project Group 8 Bank Managment System Database

Uploaded by

Daniel Wasihun
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

WOLDIA UNIVERSITY

FACULTY OF TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE


INSTITUTE OF TECHNOLOGY School of computing

Advanced Database System (SEgn3041)


Group project
Name ID
1. Suleyman Abdu --------------------------- WDU147312
2. Etsubdink Desalegn --------------------- WDU146018
3. Tewodros Wedaj ------------------------- WDU147395
4. Esmael Mohammed -------------------- WDU1301067

5. Awol Tlahun ------------------------------- WDU145506

Submitted to Mr. Sied M.


Submission date : 28/8/2016 E.C

Woldia , Ethiopia
Banking Management System
Table of content
Contents
Pages
1. Introduction...................................................................................1
1.1 Purpose......................................................................................1
2. System Features.............................................................................2
2.1 Functional Requirements...........................................................2
2.2 Technical Issues..........................................................................3
2.3 Non-functional Requirements....................................................3
3. Database Design.............................................................................5
3.1 E-R Diagram...............................................................................5
3.2 Entity-Relationship Diagram Overview:......................................5
4. SQL code.......................................................................................10
5. Conclusion....................................................................................22
6. References....................................................................................23
1. Introduction
1.1 Purpose
The purpose of this document is to present a detailed description of the Online
Banking System. It will describe the system’s functions, features, interfaces, what
it will accomplish, the limitations it must work under, and how it will respond to
outside stimuli. This document is meant for both system developers and
stakeholders, and it will be responsible for determining if the Bank community
approves or disapproves of the project.

2. System Features
2.1 Functional Requirements
A. User Authentication and Authorization
 The BMS allows new users to register and create accounts.
 Login: Users should be able to login using username and password.
 Roles: Different user roles should have different levels of access and
privileges.
B. Account Management
 The BMS allows customers to open all types of accounts like savings, fixed
deposit, etc.
 Account holders will be able to view their transaction history and their
available balance.
 They will be able to transfer funds between their own accounts or to others
accounts.
C. Loan Management
 Customers should be able to apply for loans and view their loan status.
 The system should calculate loan interest rates and provide repayment
schedules.
 Loan officers should be able to review and approve loan applications.
D. Customer Support
 Users should be able to contact customer support through the system,
including email or chat.
 Customer support agents should have access to customer data to provide
assistance.
E. Account Statements and Reports
 Account holders should be able to generate and download account
statements.
 Managers should have access to various reports, such as daily transaction
summaries, account balances, and audit logs.
F. Online Bill Payment
 Customers should be able to pay bills online, such as utility bills, credit card
bills, and loan payments.
 The system should securely process these payments and provide payment
confirmation.
G. Online Banking for Mobile Devices
 The system should be accessible via web browsers and mobile applications.
 It should provide a user-friendly interface for mobile users.
H. Automatic Alerts for Unusual Activities
 The system should automatically detect and alert users to unusual or
suspicious account activities, such as large transactions from new locations.
2.2 Technical Issues
 Database: The Banking Management system will use the MySQL Database,
which is open source and free to use.
2.3 Non-functional Requirements
A. Security
 The system should implement robust security measures to protect against
unauthorized access, data breaches, and fraud.
 It should use encryption for data transmission and storage.
 Access control should be granular, and data should be protected against
SQL injection and other common vulnerabilities.
B. Performance
 The system should provide fast response times for common operations
(e.g., account balance inquiries, funds transfers).
 It should be able to handle a high number of concurrent users and
transactions during peak times.
 Response times should remain within acceptable limits even during periods
of heavy usage.
C. Scalability
 The system should be scalable to accommodate an increasing number of
users, accounts, and transactions.
 It should allow for the addition of new servers or resources as the system
grows.
D. Reliability
 The system should have a high level of availability, with minimal downtime
for maintenance or upgrades.
 It should have a mechanism to ensure uninterrupted service in case of
hardware or software failures.
E. Recovery and Backup
 The system should have a robust data backup and recovery strategy to
prevent data loss in case of system failures.
 Regular backups should be performed and tested for reliability.
 A disaster recovery plan should be in place to restore service quickly in the
event of a catastrophic failure.
F. Compliance
 The system should adhere to relevant banking and financial industry
regulations, including Know Your Customer (KYC) and Anti-Money
Laundering (AML) requirements.
 It should comply with data protection and privacy laws, such as GDPR or
HIPAA, as applicable.
G. Usability
 The user interface should be intuitive and user-friendly, catering to users of
varying technical abilities.
 The system should be accessible to individuals with disabilities and comply
with accessibility standards (e.g., WCAG).
H. Load Testing and Performance Monitoring
 The system should be subject to load testing to ensure it can handle
expected levels of usage.
 Continuous performance monitoring should be in place to detect and
address performance bottlenecks.

3. Database Design
3.1 E-R Diagram
3.2 Entity-Relationship Diagram Overview:
The ERD illustrates the primary entities, attributes, and relationships in the
Banking Management System:
1. Entities:
a. Customer
- CustomerID (Primary Key)
- First Name
- Middle Name
- Last Name
- Date of Birth
- Gender
- Email
- Contact
- Permanent Account Number (PAN)
- Nationality
- Salary
- Gender
- Address
b. Account
- Account No (Primary Key) - CustomerID (Foreign Key)
- Account Type (e.g., Savings, Checking)
- Balance
- Interest Rate
- Date Created
- Interest ID
- Interest Amount
c. Transaction
- CustomerID
- TransactionID (Primary Key)
- Account No (Foreign Key)
- Transaction Type (e.g., Deposit, Withdrawal, Transfer)
- Amount
- Transaction Date and Time
- Total Balance

d. Deposit Account
- Deposit Account No (Primary Key)
- Account No
- Closure type
- Interest ID
- Initial Amount
- CustomerID
- Deposit Account Type
- Interested Amount
- Current Balance
- Duration
- Interest Rate
- Open Date
- Close Date
- Days
e. Officer
- EmployerID (Primary Key)
- Username
- Password
- Email
- Nationality
- Salary
- Address
- Gender
- Contact
- Date of Birth
- First Name
- Middle Name
- Last Name
f. Manager
- EmployerID (Primary Key)
- Username
- Password
- Email
- Nationality
- Salary
- Address
- Gender
- Contact
- Date of Birth
- First Name
- Middle Name
- Last Name
g. Interest
- InterestID (Primary Key)
- Savings Interest
- Loan Interest
- RD Interest
- FD Interest
- Current Interest
h. Loan Account
- Account No (Primary Key)
- Loan ID
- Loan Type
- Date of Loan
- Duration
- Total Amount
- Remaining Amount
- Status
- Description
- Interest

4. SQL code

create database BankAccountManagementSystem1

use BankAccountManagementSystem1
--drop database BankAccoutManagementSystem

-- Create Customer table


CREATE TABLE Customer (
CustomerID INT PRIMARY KEY,
FirstName VARCHAR(50),
MiddleName VARCHAR(50),
LastName VARCHAR(50),
DateOfBirth DATE,
Gender VARCHAR(10),
Email VARCHAR(100),
Contact VARCHAR(20),
PAN VARCHAR(20),
Nationality VARCHAR(50),
Salary DECIMAL(12, 2),
Address VARCHAR(255)
);
--drop table customer

-- Insert data into the Customer table


INSERT INTO Customer ( CustomerID,FirstName,
MiddleName,LastName,DateOfBirth,Gender,Email,Contact,PAN,Nationality,Salary,Address)
VALUES
(1, 'suleyman','A', 'Doe', '1980-01-01', 'M', '[email protected]', '555-123-4567',
'ABC123456', 'USA', 50000.00, '123 Main Street, Anytown, USA'),
(2, 'etsubdink','B', 'Doe', '1985-02-02', 'F', '[email protected]', '555-234-5678',
'XYZ654321', 'USA', 60000.00, '456 Elm Street, Anytown, USA'),
(3, 'awol','C', 'Smith', '1990-03-03', 'M', '[email protected]', '555-345-
6789', 'LMN789012', 'USA', 70000.00, '789 Oak Street, Anytown, USA'),
(4, 'tewodros','D', 'Jones', '1995-04-04', 'F', '[email protected]', '555-456-
7890', 'OPQ123456', 'USA', 80000.00, '1011 Pine Street, Anytown, USA'),
(5, 'esmael','E', 'Williams', '2000-05-05', 'M', '[email protected]', '555-
567-8901', 'STU678901', 'USA', 90000.00, '1213 Maple Street, Anytown, USA');

-- Create Account table


CREATE TABLE Account (
AccountNo INT PRIMARY KEY,
CustomerID INT,
AccountType VARCHAR(50),
Balance DECIMAL(12, 2),
InterestRate DECIMAL(5, 2),
DateCreated DATE,
InterestID INT,
FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID),
FOREIGN KEY (InterestID) REFERENCES Interest(InterestID)
);
--drop table account
-- Insert data into the Account table
INSERT INTO Account (AccountNo, CustomerID, AccountType, Balance, InterestRate,
DateCreated, InterestID)
VALUES
(1000, 1, 'Savings', 1000.00, 0.05, '2023-01-01', 01),
(2000, 2, 'Checking', 2000.00, 0.025, '2023-02-01', 02),
(3000, 3, 'Savings', 3000.00, 0.05, '2023-03-01', 03),
(4000, 4, 'Checking', 4000.00, 0.025, '2023-04-01', 04),
(5000, 5, 'Savings', 5000.00, 0.05, '2023-05-01', 05);
-- Create Transactions table
CREATE TABLE Transactions (
CustomerID INT,
TransactionID INT PRIMARY KEY,
AccountNo INT,
TransactionType VARCHAR(50),
Amount DECIMAL(12, 2),
TransactionDateTime DATETIME,
TotalBalance DECIMAL(12, 2),
FOREIGN KEY (AccountNo) REFERENCES Account(AccountNo),
FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID)
);
--drop table transactions
-- Insert data into the Transaction table
INSERT INTO Transactions ( CustomerID,
TransactionID,AccountNo,TransactionType,Amount,TransactionDateTime,TotalBalance)
VALUES
(1, 11, 1000, 'Deposit', 500.00, '2023-03-01 10:00:00', 1500.00),
(2, 12, 2000, 'Withdrawal', 300.00, ' 2023-03-02 11:00:00', 1700.00),
(3, 13, 3000, 'Deposit', 1000.00, '2023-03-03 12:00:00', 4000.00),
(4, 14, 4000, 'Withdrawal', 500.00, ' 2023-03-04 13:00:00', 3500.00),
(5, 15, 5000, 'Deposit', 2000.00, '2023-03-05 14:00:00', 7000.00);

-- Create DepositAccount table


CREATE TABLE DepositAccount (
DepositAccountNo INT PRIMARY KEY,
AccountNo INT,
ClosureType VARCHAR(50),
InterestID INT,
InitialAmount DECIMAL(12, 2),
CustomerID INT,
DepositAccountType VARCHAR(50),
InterestedAmount DECIMAL(12, 2),
CurrentBalance DECIMAL(12, 2),
Duration INT,
InterestRate DECIMAL(5, 2),
OpenDate DATE,
CloseDate DATE,
Days INT,
FOREIGN KEY (AccountNo) REFERENCES Account(AccountNo),
FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID),
FOREIGN KEY (InterestID) REFERENCES Interest(InterestID)
);

--drop table DepositAccount


-- Insert data into the DepositAccount table
INSERT INTO DepositAccount
(DepositAccountNo,AccountNo,ClosureType,InterestID,InitialAmount,CustomerID,DepositAccoun
tType,
InterestedAmount,CurrentBalance, Duration, InterestRate, OpenDate, CloseDate, Days)
VALUES
(6000, 1000, 'Auto-Renew', 01, 1000.00, 1, 'Fixed Deposit', 50.00, 1050.00, 12, 0.05,
'2023-04-01', '2024-04-01', 365),
(7000, 2000, 'Auto-Renew', 02, 2000.00, 2, 'Fixed Deposit', 100.00, 2100.00, 24, 0.025,
'2023-05-01', '2023-06-01', 31),
(8000, 3000, 'Auto-Renew',03, 3000.00, 3, 'Fixed Deposit', 150.00, 3150.00, 36, 0.05,
'2023-06-01', '2023-07-01', 31),
(9000, 4000, 'Auto-Renew', 04, 4000.00, 4, 'Fixed Deposit', 200.00, 4200.00, 48, 0.025,
'2023-07-01', '2023-08-01', 31),
(10000,5000, 'Auto-Renew', 05, 5000.00, 5, 'Fixed Deposit', 250.00, 5250.00, 60, 0.05,
'2023-08-01', '2023-10-01', 61);

-- Create Officer table


CREATE TABLE Officer (
EmployerID INT PRIMARY KEY,
Username VARCHAR(50),
Password VARCHAR(50),
Email VARCHAR(100),
Nationality VARCHAR(50),
Salary DECIMAL(12, 2),
Address VARCHAR(255),
Gender VARCHAR(10),
Contact VARCHAR(20),
DateOfBirth DATE,
FirstName VARCHAR(50),
MiddleName VARCHAR(50),
LastName VARCHAR(50)
);

-- Insert data into the Officer table


INSERT INTO Officer
( EmployerID,Username,Password,Email,Nationality,Salary,Address,Gender,Contact,DateOfBirt
h,FirstName,MiddleName,
LastName)
VALUES
(100, 'jdoe','password123','[email protected]','USA',70000.00,'123 Main Street,
Anytown, USA','M','555-345-6789'
,'1975-03-03','John','A', 'Doe');

-- Create Manager table


CREATE TABLE Manager (
EmployerID INT,
TransactionID INT,
Username VARCHAR(50),
Password VARCHAR(50),
Email VARCHAR(100) PRIMARY KEY ,
Nationality VARCHAR(50),
Salary DECIMAL(12, 2),
Address VARCHAR(255),
Gender VARCHAR(10),
Contact VARCHAR(20),
DateOfBirth DATE,
FirstName VARCHAR(50),
MiddleName VARCHAR(50),
LastName VARCHAR(50),
FOREIGN KEY (TransactionID) REFERENCES Transactions(TransactionID)
);
--drop table manager

-- insert Manager table


INSERT INTO Manager (EmployerID,TransactionID , Username, Password, Email, Nationality,
Salary, Address, Gender, Contact, DateOfBirth, FirstName,
MiddleName, LastName)
VALUES
(100, 11 , 'jsmith', 'password456', '[email protected]', 'USA', 80000.00, '456 Elm
Street, Anytown, USA', 'F', '555-456-7890',
'1980-04-04', 'Jane', 'B', 'Smith');

-- Create Interest table


CREATE TABLE Interest (
InterestID INT PRIMARY KEY,
SavingsInterest DECIMAL(5, 2),
LoanInterest DECIMAL(5, 2),
RDInterest DECIMAL(5, 2),
FDInterest DECIMAL(5, 2),
CurrentInterest DECIMAL(5, 2)
);
--drop table interest
-- insert Interest table
INSERT INTO Interest (InterestID, SavingsInterest, LoanInterest, RDInterest, FDInterest,
CurrentInterest)
VALUES
(01, 5.00, 10.00, 6.00, 7.00, 8.00),
(02, 4.00, 10.00, 5.00, 7.00, 8.00),
(03, 3.00, 10.00, 5.00, 7.00, 9.00),
(04, 2.00, 10.00, 6.00, 8.00, 8.00),
(05, 1.00, 10.00, 6.00, 8.00, 7.00);
-- Create LoanAccount table
CREATE TABLE LoanAccount (
AccountNo INT ,
LoanID INT PRIMARY KEY,
LoanType VARCHAR(50),
DateOfLoan DATE,
Duration INT,
TotalAmount DECIMAL(12, 2),
RemainingAmount DECIMAL(12, 2),
Status VARCHAR(50),
Description TEXT,
Interest DECIMAL(5, 2)
);
--drop table loanaccount
-- insert LoanAccount table
INSERT INTO LoanAccount (AccountNo, LoanID, LoanType, DateOfLoan, Duration, TotalAmount,
RemainingAmount, Status, Description, Interest)
VALUES
(1000,001, 'Home', '2022-01-01', 12, 100000.00, 90000.00, 'Active', 'Home Loan',
10.00),
(2000,002, 'Home', '2022-01-01', 12, 100000.00, 90000.00, 'Active', 'Home Loan',
10.00);

-- Define Relationships

-- Relationship between manager and officer


ALTER TABLE manager ADD CONSTRAINT fk_employer_id FOREIGN KEY (employerid) REFERENCES
officer(employerid);
alter table loanaccount add constraint fk_accountno foreign key (accountno) references
account(accountno);

-- Relationship between DepositAccount and Account


--ALTER TABLE DepositAccount ADD CONSTRAINT fk_account_no FOREIGN KEY (AccountNo)
REFERENCES Account(AccountNo);

select * from customer


select * from Account
select * from Transactions
select * from DepositAccount
select * from Officer
select * from Manager
select * from Interest
select * from LoanAccount

-- start a trigger
-- Create Trigger for updating TotalBalance in Transactions table after insert
/*
--drop trigger if exists update_total_balance_trigger
go
CREATE TRIGGER update_total_balance_trigger
AFTER INSERT ON Transactions
FOR EACH ROW
BEGIN
UPDATE Transactions
SET TotalBalance = TotalBalance + NEW.Amount
WHERE TransactionID = NEW.TransactionID;
select * from updated
END;
go
*/
--ddl in trigger

create trigger admin1 on database for


create_table,alter_table,drop_table
as print 'you can not ctreate ,alter, drop on this database'

rollback

-- for testing trigger


create table employee (eid int primary key);
alter table customer add plans char (50);
drop trigger admin1 on database

-- dml in trigger

create trigger admin2 on account for


insert,update,delete
as print 'you can not insert update delete on account table'

rollback

-----testing in trigger
update account set Accounttype = 'Savings' where AccountNo=2000
update account set datecreated =getdate()
select *from account
drop trigger admin2

-- Start a transaction
BEGIN TRANSACTION;
update customer set middlename ='desalegn' where customerid=2
select * from customer;

commit transaction

rollback transaction

begin transaction
save transaction s1
update account set datecreated =getdate()

select * from account ;


-- Create a view to display customer details and account information
CREATE VIEW CustomerAccountView
AS
SELECT c.CustomerID, c.FirstName, c.LastName, a.AccountNo, a.AccountType, a.Balance
FROM Customer as c
INNER JOIN Account as a ON c.CustomerID = a.CustomerID;

go

--create login login namewith password 'password'


use master ;
create login Etsubdink with password ='123456';

-- Create UserAuthentication table for login concept


CREATE TABLE UserAuthentication (
Username VARCHAR(50) PRIMARY KEY,
Password VARCHAR(50)
);

-- Populate UserAuthentication table with sample data


INSERT INTO UserAuthentication (Username, Password) VALUES ('Etsubdink', '123456');
INSERT INTO UserAuthentication (Username, Password) VALUES ('Daniel', '123457');

-- create user user name for login login name


use BankAccountManagementSystem1

create user Etsubdink for login Etsubdink;


create user Daniel for login Daniel;

use BankAccountManagementSystem1

grant select,insert,update on account to Etsubdink;


select * from account
use BankAccountManagementSystem1
revoke select on account from ETSUBDINK;
use BankAccountManagementSystem1

create role editor;


create role reader;
create role author;

use BankAccountManagementSystem1

grant select ,insert, delete,update on account to editor;

use BankAccountManagementSystem1

grant select on account to reader;

sp_addroloemember 'editor','Etsubdink1';
5. Conclusion
The System Requirements Specification (SRS) for a Banking Management System
is a critical document that outlines the functional and non-functional
requirements of the software system.the System Requirements Specification for a
Banking Management System is an indispensable document that lays the
foundation for the successful development and deployment of a sophisticated
and secure banking software solution. It encompasses the critical aspects of
functionality, security, performance, and user experience, all of which are
essential in the banking industry. A well-defined SRS reduces ambiguity,
minimizes risks, and serves as a roadmap for developers and stakeholders. By
following the guidelines and requirements set forth in this document, the bank
can look forward to a robust, secure, and customer-centric Banking Management
System that will not only meet their immediate needs but also adapt to future
challenges and opportunities in the ever-evolving world of banking.
6. References
1. Books: Books on banking technology and management, particularly those
written by experts in the field. Some books which deserve special mention
are:

 Fundamental of Software Engineering


 Fundamental of database
 Mohapatra, H., & Rath, A. K. (2020). Fundamentals of software
engineering: designed to provide an insight into the software
engineering concepts. BPB Publications.
2. Online Databases: Online databases like PubMed, Google Scholar, or
databases specific to the finance and technology sectors can be valuable
resources for academic papers and reports.
3. Websites: Websites
like https://www.geeksforgeeks.org/, https://www.researchgate.net/, https
://www.slideshare.net/, https://www.studocu.com/,
and https://en.wikipedia.org/wiki/Online_banking

You might also like