0% found this document useful (0 votes)
9 views10 pages

Database Schema for Banking System

The document outlines the structure of a banking system's database, detailing tables for admins, staff, clients, accounts, transactions, notifications, and system settings. It emphasizes the roles and responsibilities of admins and staff, the lifecycle of clients and transactions, and the importance of audit trails and security measures. The document also confirms the implementation of role-based access control and compliance with regulatory standards.

Uploaded by

hares.ahmed.319
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)
9 views10 pages

Database Schema for Banking System

The document outlines the structure of a banking system's database, detailing tables for admins, staff, clients, accounts, transactions, notifications, and system settings. It emphasizes the roles and responsibilities of admins and staff, the lifecycle of clients and transactions, and the importance of audit trails and security measures. The document also confirms the implementation of role-based access control and compliance with regulatory standards.

Uploaded by

hares.ahmed.319
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

Table ib_admin {

admin_id int [pk, increment]


name varchar(200)
email varchar(200)
number varchar(50)
password varchar(255)
profile_pic varchar(200)
status enum
}

Table ib_staff {
staff_id int [pk, increment]
name varchar(200)
staff_number varchar(100)
phone varchar(20)
email varchar(200)
password varchar(255)
sex enum
profile_pic varchar(200)
created_by_admin_id int
status enum
}

Table ib_clients {
client_id int [pk, increment]
name varchar(200)
national_id varchar(100)
phone varchar(20)
address varchar(200)
email varchar(200)
password varchar(255)
profile_pic varchar(200)
client_number varchar(100)
staff_id int
created_by_admin_id int
status enum
}

Table ib_roles {
role_id int [pk, increment]
name varchar(100)
description varchar(255)
}

Table ib_permissions {
permission_id int [pk, increment]
name varchar(100)
description varchar(255)
}

Table ib_role_permissions {
role_id int
permission_id int
}

Table ib_user_roles {
user_role_id int [pk, increment]
admin_id int
staff_id int
role_id int
}

Table ib_acc_types {
acctype_id int [pk, increment]
name varchar(100)
description text
rate decimal
code varchar(50)
}

Table ib_bankaccounts {
account_id int [pk, increment]
acc_name varchar(200)
account_number varchar(50)
acc_type_id int
acc_status enum
acc_balance decimal
client_id int
staff_id int
created_by_admin_id int
created_at timestamp
}

Table ib_transactions {
tr_id int [pk, increment]
tr_code varchar(100)
account_id int
tr_type enum
tr_status enum
transaction_amt decimal
client_id int
approved_by_admin_id int
created_by_staff_id int
created_at timestamp
}

Table ib_notifications {
notification_id int [pk, increment]
notification_details text
receiver_client_id int
receiver_staff_id int
created_by_admin_id int
created_at timestamp
}

Table ib_systemsettings {
id int [pk, increment]
sys_name text
sys_tagline text
sys_logo varchar(200)
updated_by_admin_id int
updated_at timestamp
}

Table ib_audit_logs {
audit_id int [pk, increment]
actor_admin_id int
actor_staff_id int
actor_client_id int
action varchar(200)
table_name varchar(100)
record_id int
action_time timestamp
ip_address varchar(50)
user_agent varchar(255)
}

Ref: ib_staff.created_by_admin_id > ib_admin.admin_id


Ref: ib_clients.staff_id > ib_staff.staff_id
Ref: ib_clients.created_by_admin_id > ib_admin.admin_id
Ref: ib_bankaccounts.client_id > ib_clients.client_id
Ref: ib_bankaccounts.staff_id > ib_staff.staff_id
Ref: ib_bankaccounts.acc_type_id > ib_acc_types.acctype_id
Ref: ib_bankaccounts.created_by_admin_id > ib_admin.admin_id
Ref: ib_transactions.account_id > ib_bankaccounts.account_id
Ref: ib_transactions.client_id > ib_clients.client_id
Ref: ib_transactions.approved_by_admin_id > ib_admin.admin_id
Ref: ib_transactions.created_by_staff_id > ib_staff.staff_id
Ref: ib_notifications.receiver_client_id > ib_clients.client_id
Ref: ib_notifications.receiver_staff_id > ib_staff.staff_id
Ref: ib_notifications.created_by_admin_id > ib_admin.admin_id
Ref: ib_systemsettings.updated_by_admin_id > ib_admin.admin_id
Ref: ib_audit_logs.actor_admin_id > ib_admin.admin_id
Ref: ib_audit_logs.actor_staff_id > ib_staff.staff_id
Ref: ib_audit_logs.actor_client_id > ib_clients.client_id
Ref: ib_role_permissions.role_id > ib_roles.role_id
Ref: ib_role_permissions.permission_id > ib_permissions.permission_id
Ref: ib_user_roles.role_id > ib_roles.role_id
Ref: ib_user_roles.admin_id > ib_admin.admin_id
Ref: ib_user_roles.staff_id > ib_staff.staff_id
Core Tables:
• Admin
• Staff
• Clients
• Accounts
• Transactions
• Notifications
• SystemSettings
• Account Types
• Roles
• Permissions
• Role_Permissions
• User_Roles (Admin/Staff)
• Audit Logs

স্ট্যান্ডার্ড বযাাংক াং ERD স্ট্রা চার


Roles:
• Admin = Full system controller
• Staff = Client/Account এর সাথে assigned োথে (Ex: KYC, support)
• Clients = Individual bank customers
• Accounts = Linked to client
• Transactions = Linked to account + client + optionally approved by admin
• Notifications = Sent by admin to staff/client

Admin Control
Standard:
Real-world banking system এ Admin (usually branch manager / head office super admin) সব
sensitive entity control েরথে পাথর:
• Staff hire / remove
• Clients verify / blacklist
• Accounts approve / close
• Transactions approve (above threshold)
• System settings change
ERD:
➜ Admin all critical FK:
• ib_staff.created_by_admin_id
• ib_clients.created_by_admin_id
• ib_bankaccounts.created_by_admin_id
• ib_transactions.approved_by_admin_id
• ib_notifications.created_by_admin_id
• ib_systemsettings.updated_by_admin_id

Staff Hierarchy
Standard:
• Staff োথে Client servicing এর জন্য: KYC, onboarding, issue resolve.
• Staff এবং Admin clear separation োথে.
• Staff কে Admin create/assign েথর.

• ERD:
➜ ib_staff → created_by_admin_id
➜ ib_clients.staff_id → কোন্ staff এই client handle েরথে।

Account Linking

Standard:
• Account must link to one client.
• Account must link to account type.
• Staff responsible কে assign েরা যায়।
ERD:
➜ ib_bankaccounts.client_id
➜ ib_bankaccounts.acc_type_id
➜ ib_bankaccounts.staff_id

Transaction Audit Trail


Standard:
• Each transaction belongs to one account.
• Linked to client (owner).
• High-value or suspicious transactions must be approved_by_admin.
• Optionally: Staff created it.
ERD:
➜ ib_transactions.account_id
➜ ib_transactions.client_id
➜ ib_transactions.approved_by_admin_id
➜ ib_transactions.created_by_staff_id
Fully traceable — standard KYC, AML (Anti Money Laundering) guideline aligned.

Notification Flow
Standard:
• Admin → Clients (alert, statements)
• Admin → Staff (internal instructions)
ERD:
➜ ib_notifications.receiver_client_id
➜ ib_notifications.receiver_staff_id
➜ ib_notifications.created_by_admin_id
Proper one-way controlled flow — no direct cross talk.

System Settings
Standard:
• System config only Admin can change.
• Example: interest rates, logos, system name.
ERD:
➜ ib_systemsettings.updated_by_admin_id

1. Admin Power & Control


Expected Business Logic:
• Admin কযন্ system setup/control/monitor েরথে পাথর
• Admin কযন্ Staff, Client, Account create/approve েরথে পাথর
• Admin যদি ন্া োথে, কেউই দেেু েরথে পারথব ন্া
ERD Implementation:
• Admin is creator of:
o Staff (created_by_admin_id)
o Client (created_by_admin_id)
o Account (created_by_admin_id)
• Admin approves transactions: approved_by_admin_id
• Admin sends all notifications: created_by_admin_id
• Admin updates system settings: updated_by_admin_id
Confirmed: Admin has full centralized control —

2. Staff Hierarchy & Role


Expected Business Logic:
• Staff created by admin
• Staff assigned to clients
• Staff can initiate transactions
• Staff must follow RBAC rules
ERD Implementation:
• ib_staff → created_by_admin_id
• ib_clients.staff_id → maps assigned staff
• ib_transactions.created_by_staff_id
• ib_user_roles.staff_id for RBAC
Confirmed: Staff functions align with real operational flow —

3. Client Lifecycle
Expected Business Logic:
• Client has unique identity (NID/email)
• Linked to a staff
• Has one or more bank accounts
• Can perform transactions
• Can receive notifications
• Can be inactive/blacklisted
ERD Implementation:
• Unique: national_id, email, client_number
• Linked to: staff_id
• ib_bankaccounts.client_id
• ib_transactions.client_id
• ib_notifications.receiver_client_id
• Status: ENUM('active', 'inactive', 'blacklisted')
Confirmed: Covers onboarding, KYC, account, transaction, notification —

4. Bank Account Ownership


Expected Business Logic:
• Account is linked to 1 client, 1 type
• Created by Admin
• Assigned staff optional
• Tracks balance/status
ERD Implementation:
• client_id (FK)
• acc_type_id → links to ib_acc_types
• staff_id (optional)
• created_by_admin_id
• acc_balance, acc_status (active/closed/suspended)
Confirmed: Proper account linkage and status —

5. Transaction Lifecycle
Expected Business Logic:
• Belongs to a client and account
• Can be created by staff
• Must be approved by admin (in case of manual verification)
• Has type, status, amount
ERD Implementation:
• account_id, client_id
• tr_type (enum: deposit, withdraw, transfer)
• tr_status (enum: pending, approved, rejected)
• approved_by_admin_id, created_by_staff_id
Confirmed: Clear flow of who initiates, who approves —

6. Role-Based Access Control (RBAC)


Expected Business Logic:
• Define roles (admin, teller, manager)
• Assign roles to users (admin/staff)
• Roles map to permissions
ERD Implementation:
• ib_roles, ib_permissions, ib_role_permissions
• ib_user_roles → links roles to admin_id or staff_id
Confirmed: Full RBAC structure present —

7. System Notifications
Expected Business Logic:
• Admin can send notices to clients/staff
• Each notification logged with timestamp
ERD Implementation:
• receiver_client_id, receiver_staff_id, created_by_admin_id
• created_at timestamp
• Confirmed: Directional and traceable —
8. System Settings + Logs
Expected Business Logic:
• System configuration only editable by admin
• Each sensitive operation logged for audit
ERD Implementation:
• ib_systemsettings.updated_by_admin_id
• ib_audit_logs: actor_admin_id, actor_staff_id, actor_client_id, table_name, action,
ip_address, user_agent
Confirmed: Covers compliance (ISO/PCI), audit trail —

Sensitive Field Security


• password fields = VARCHAR(255) → ready for bcrypt()
• transaction_amt = DECIMAL(15,2) → no string corruption
• audit_logs = full trail + environment info
Security concern addressed —

Final Verdict:
Module Remarks
Admin Control Full system-wide control with audit
Staff Management Properly assigned + limited access
Client Management Clean lifecycle + status control
Type-wise, owner-wise, status
Account Lifecycle
tracking
Staff→Admin flow, status, type
Transactions
tracked
Notifications Admin-to-users controlled channel
Role + permission based dynamic
RBAC System
access
Audit Logs Tracks action, by whom, on what
Fields designed for hashing +
Sensitive Data
compliance

Common questions

Powered by AI

The role-based access control (RBAC) structure facilitates security and operations by defining roles like admin, teller, and manager, assigning these roles to either admins or staff, and mapping roles to specific permissions. This ensures that users only have access to functionalities necessary for their role, enhancing both security and operational efficiency. For example, staff can initiate client transactions but cannot approve them unless they have the admin role. The structure is implemented through tables like 'ib_roles', 'ib_permissions', and their associations in 'ib_user_roles' .

The system's design enhances transaction processing efficiency and fraud prevention through multiple mechanisms. Each transaction links to specific accounts and clients, ensuring that records are coherent and easily auditable. The requirement for admin approval, especially for high-value or suspicious transactions, checks fraudulent or erroneous activity as indicated by 'approved_by_admin_id'. Moreover, the role of staff in creating transactions ('created_by_staff_id') without the ability to approve them enforces a separation of duties, a key aspect in fraud prevention. Collectively, these mechanisms provide an effective balance of efficiency and security by streamlining processes while adhering to stringent regulatory standards for financial transactions .

The notification system is significant as it allows for the dissemination of alerts and instructions efficiently from the admin to clients and staff. It is implemented with directional control, using fields such as 'ib_notifications.receiver_client_id', 'receiver_staff_id', and 'created_by_admin_id' to ensure that messages are auditable and traceable. This ensures that communications follow organizational policies and are properly documented for compliance purposes. The use of timestamps in 'created_at' assists in tracking the timeliness and frequency of communications, critical for operational transparency and accountability .

The database ensures transaction traceability by linking every transaction to an account and client, recording who created the transaction via 'created_by_staff_id', and whether it was approved by an admin through 'approved_by_admin_id'. This traceability aligns with KYC (Know Your Customer) and AML (Anti Money Laundering) guidelines, crucial for regulatory compliance. The traceability allows for audit trails that record actions taken, providing a full history of what was done, by whom, and when, utilizing tables such as 'ib_transactions' and 'ib_audit_logs' .

The design of the bank account system supports financial accuracy and security by linking each account to a client and an account type, tracked by 'ib_bankaccounts.client_id' and 'acc_type_id', ensuring clear ownership and type classification. It maintains records of account balances and statuses (active, closed, suspended), reflected in 'acc_balance' and 'acc_status'. Staff can be assigned responsibility for overseeing accounts with 'staff_id', and critical operations require admin approval, reducing the risk of unauthorized access or errors. This structure supports precision and accountability, crucial for maintaining trust and compliance (e.g., with audits).

The admin plays a critical role in controlling sensitive entities within the banking system. This role includes hiring or removing staff, verifying or blacklisting clients, approving or closing accounts, and approving transactions above a certain threshold. Additionally, only the admin can change system settings. These responsibilities reflect in the database through various foreign key relationships where actions done by or initiated by others usually have an 'approved_by_admin_id' field or similar admin-linked fields. For example, staff hiring/removal uses 'ib_staff.created_by_admin_id', client management uses 'ib_clients.created_by_admin_id', transactions require an 'approved_by_admin_id', and system settings changes reflect through 'ib_systemsettings.updated_by_admin_id' .

The database schema supports reliable and secure client management by maintaining unique identifiers like 'national_id' and 'client_number', linking clients to staff through 'ib_clients.staff_id', and supporting status monitoring (e.g., active, inactive, blacklisted). These features ensure that each client is uniquely identifiable, properly managed by assigned staff, and that their status is accurately tracked for compliance and risk management. The client lifecycle is supported through related tables such as 'ib_bankaccounts', 'ib_transactions', and 'ib_notifications' which underline the complete integration and consistency of client data management within the system .

An admin's ability to modify system settings is crucial for maintaining the integrity and operational efficacy of the banking system. These settings may include changes to interest rates, logos, and the system's name, which require a high level of authority to ensure alignment with organizational policies and regulations. Only admins can make these modifications as reflected in 'ib_systemsettings.updated_by_admin_id', reinforcing security and consistency across the system. This central control helps prevent unauthorized alterations that could lead to operational disruptions or compliance failures .

Staff involvement is critical in the client servicing process to ensure personalized service, compliance with regulatory requirements (e.g., KYC), and swift issue resolution. The database structures this relationship by linking clients to specific staff members through 'ib_clients.staff_id', facilitating accountability and efficient management. Staff can also initiate transactions, indicated in 'ib_transactions.created_by_staff_id', allowing for operational efficiency while adhering to RBAC, which limits their access and actions to predefined roles. This structure ensures that client management is coherent, efficient, and secure .

The system's RBAC framework ensures dynamic access control by defining and assigning roles with specific permissions through tables like 'ib_roles', 'ib_permissions', and 'ib_role_permissions'. For example, roles are linked to actual users (staff/admin) in 'ib_user_roles'. This framework prevents unauthorized actions by ensuring users can only perform functions within their designated roles, enhancing security by limiting access to sensitive operations. Benefits include minimized security risks, optimized workflow by properly distributing responsibilities, and streamlined compliance monitoring since actions are controlled and traceable .

You might also like