Accessing Database Using Java and MySQL: Part 1

The preceding article will show you how transaction processes are done in banks through Java & MySQL.

Hello friends.

We will now learn some interesting and very useful things.

Sometimes we wonder how the various types of transaction processes work that occur in banks. How fast and accurate are all the processing done and how is the data accessed from the database? We always think about the techniques, procedures, concepts, logics, ways and so on behind all the processing.

database

So we are here to understand that, the logic concepts and so on using Java and MySQL for the database. We will move step-by-step to understand everything easily by taking practical examples and the various results associated with it.

We will understand the entire processing in the further four parts:

  • Transactions involved for Authorized Customer
  • Transactions involved for Authorized Employee
  • Transactions involved for Authorized Administrator
  • Transactions involved for Authorized Administrator, Customer and Employee simultaneously

Transactions involved for an Authorized Customer


Customer

For an authorized customer, we will create a separate Java file, Customer.java, and another separate Java file, ConnectDB.java, for connecting to the database. The database is created in MySQL for all the authorized personnel.

A customer can do the following transactions:

  • Can check his/her details (details consist of account number, password, name, address, contact and account balance).
  • Can change his/her password
  • Can withdraw his/her money

Transactions involved for an Authorized Employee


login

For an authorized employee, we will create a separate Java file, Employee.java, and another separate Java file, ConnectDB.java, for connecting it to the database because here we are explaining all the three personnel transactions separately.

An employee can do the following transactions:

    • Can check customer's details
    • Can check his/her details
    • Can change his/her password

Transactions involved for an Authorized Administrator


admin

For an authorized administrator, we will create a separate Java file Administrator.java, and another separate Java file, ConnectDB.java, for connecting to the database.

An administrator can do the following transactions:
  • Can check details of any customer
  • Can check details of any employee
  • Can change the password of any customer
  • Can change the password of any employee
  • Can change his/her password

Transactions involved for Authorized Administrator, Customer and Employee simultaneously


In this part, we will see the entire set of transactions simultaneously as we always thinking about it. We will have the option to choose that either we are a customer, an employee or an admin who will log in for doing the various transactions.

There is taken care of various parameters and alerts that are essential in the transaction processes. There will be separate outputs for each transaction for a better understanding. And all these things will happen in the next parts of this article in which all the techniques, concepts, procedures and so on will be explained with a practical illustration and the results associated with it. Until then be excited about learning new things.

For reading next part, click the below link

Accessing Database Using Java and MySQL: Part 2

Thank you, keep learning and sharing.