Skip to content

MrHusku/SQL-PROJECT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Bank Credit Management System (Oracle SQL)

Project Overview

This project is a comprehensive database solution designed to manage the end-to-end lifecycle of bank loans. It handles everything from client registration and credit approval to repayment schedules, payment tracking, and automated penalty calculations for overdue installments.

Designed for an Oracle SQL environment, this project demonstrates advanced database modeling, data integrity enforcement, and complex business logic automation.


Tech Stack & SQL Concepts

  • Data Definition Language (DDL): Optimized relational schema using constraints (PRIMARY KEY, FOREIGN KEY, CHECK, UNIQUE, NOT NULL).
  • Data Manipulation Language (DML): Data management and status automation using correlated subqueries.
  • Complex Querying (DQL): Multi-table JOINs, aggregation (GROUP BY, HAVING), and hierarchical queries (CONNECT BY).
  • Database Objects: Implementation of VIEWs for data abstraction, SEQUENCEs for ID generation, and INDEXes for performance tuning.

Database Schema

The system architecture consists of 5 interconnected tables:

Table Name Description Key Features
PROIECT_CLIENTI Client Registry SSN/CNP tracking, Income records
PROIECT_CREDITE Loan Details Interest rates, Credit types, Amounts
PROIECT_RATE Installments Repayment schedules, Status tracking
PROIECT_PLATI Payments Transaction history (Card, Cash, Wire)
PROIECT_PENALIZARI Penalties Automated late fee calculation

Key Features & Business Logic

Automated Status Updates

  • Payment Validation: Installments are automatically marked as 'Paid' when the total payment amount meets the requirement through correlated subqueries.
  • Overdue Tracking: Overdue installments are identified and flagged as 'intarziata' based on the current system date (SYSDATE).

Advanced Reporting

  • Financial Analysis: Calculates the real-time remaining balance for each loan.
  • Visualization: Visualizes hierarchical repayment schedules using LEVEL and CONNECT BY.
  • Risk Assessment: Identifies high-income clients relative to their city average.

Maintenance

  • Automatic Cleanup: The script includes a robust DROP block at the beginning to allow seamless re-runs for testing purposes.

How to Run

  1. Access an Oracle SQL environment (e.g., SQL Developer, Oracle Live SQL).
  2. Download the ProiectBazeDeDate.sql file from this repository.
  3. Run the entire script. It will automatically:
    • Clean up existing project tables.
    • Build the 5-table relational structure.
    • Populate the database with sample data.
    • Execute the business logic updates and analytical reports.

Author: Pais Dorian-Alexandru

About

A comprehensive Oracle SQL relational database for managing the end-to-end loan lifecycle, featuring automated installment tracking, penalty calculation logic, and advanced financial reporting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages