Skip to content

A desktop banking application working with database replication written in C#

Notifications You must be signed in to change notification settings

trung-kieen/bank-database-replication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this

A simple desktop application powered by DevExpress WinForms Controls.

Database replicate with SQL Server Replication technology for improving scalability and availability

Architecture

  • Authentication and authorization: built on top of MS SQL Server login, user, server role, database role
  • Database architecture: Two-Tier architecture

system-design database-connection

Features

  • Distribute transaction
  • Parallel Query Execution
  • Undo / Redo

tao-login_xem-sao-ke tao-tk-tu-kh them-xoa-nhanvien thuc-hien-giao-dich xem-thong-ke chuyen-nhan-vien

Advantage

  • Database system able to scaling horizontally
  • Speed up query when find data from smaller database. Especially when query for local database instead of remote database server
  • Parallel query able to gather data from many database, speed up query execution by optimize many computer hardware

Downside

  • Slow data synchronize MS SQL server replication technology might allow different result from many aspect in a distribute transaction
  • Hard to manager connection to many database via network
  • In this project there is no strategy to handle single point of failure

Historical problem

  • Boilerplate code on data access, handle exception
  • SQL injection vulnerabilities 🫣
  • No Dockerization: binding ip address among computers are not trival when create docker compose

Installation

  • MS SQL Server Management Studio (SSMS)
  • 4 MS SQL Server with name: NGANHANG, NGANHANG1, NGANHANG2, NGANHANG3 with same database name NGANHANG. All setup detail replication in scripts/ folder (DDL script).
  • Service: Sql Server Agent and Microsoft Distribute Transaction Coordinator to be enable
  • Change sql login user sa and remote login password in Program.cs for appropriate with publisher database
  • Visual studio .NET and DevExpress for winforms compatible with version of visual studio

Recommend: Visual studio 2017 developer edition and DevExpress 19.x

Resources

If you're interested in diving deeper into the topics related to this project, here are some useful resources:

License

All code is licensed under an MIT license. This allows you to re-use the code freely, remixed in both commercial and non-commercial projects. The only requirement is to include the same license when distributing.

Disclaimers

For educational purposes only. Please do not submit my project, create your own instead.