Skip to content

The Sales Reporting System is a Java-based application designed for efficient sales management and reporting. Using Hibernate and MySQL, it provides features like CRUD operations for customers, products, and sales, along with insightful reporting tools. This system simplifies data handling and helps organizations make informed decisions.

License

Notifications You must be signed in to change notification settings

aftermath22/Sales-Reporting-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sales Reporting System

Welcome to the Sales Reporting System, a Java-based application designed to manage and report on sales data efficiently. This system allows users to manage customers, products, and sales records while also generating insightful sales reports.

Features

Product Management

  • Add new products.
  • View details of a specific product.
  • Update existing products.
  • Delete products.
  • List all products.

Customer Management

  • Add new customers.
  • View details of a specific customer.
  • Update existing customers.
  • Delete customers.
  • List all customers.

Sales Management

  • Add new sales records.
  • View details of a specific sale.
  • Update existing sales records.
  • Delete sales records.
  • List all sales.

Reporting

  • Generate monthly sales reports.
  • View sales reports by product.
  • View sales reports by region.

HQL Queries

  • Retrieve all sales records.
  • Retrieve all customer records.
  • Retrieve all product records.
  • Fetch sales grouped by region.
  • Generate monthly sales summaries.
  • Get total sales grouped by product.

Getting Started

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • MySQL database
  • Maven build tool

Setup

  1. Clone the repository:

    git clone 'https://github.com/aftermath22/Sales-Reporting-System.git'
  2. Import the project into your favorite Java IDE (e.g., IntelliJ IDEA, Eclipse).

  3. Configure the database connection in the DAO classes (CustomerDao, ProductDao, SaleDao). Ensure that the database schema is set up as required.

  4. Build the project using Maven:

    mvn clean install
  5. Run the App.java file to start the application.

Usage

  1. Launch the application by running the App.java file.
  2. Follow the menu prompts to interact with the system.

Main Menu Options

  1. Insert Product
  2. Insert Customer
  3. Insert Sale
  4. View Product
  5. View Customer
  6. View Sale
  7. Update Product
  8. Update Customer
  9. Update Sale
  10. Delete Product
  11. Delete Customer
  12. Delete Sale
  13. Get All Products
  14. Get All Customers
  15. Get All Sales
  16. Get Monthly Sales
  17. Get Sales by Product
  18. Get Sales by Region
  19. Exit

Code Structure

Packages

  • com.mycompany.beans

    • Contains data models: Customer, Product, and Sale.
  • com.mycompany.dao

    • Provides Data Access Object (DAO) classes: CustomerDao, ProductDao, and SaleDao.
  • com.mycompany.SalesReportingSystem

    • Contains the App class, which serves as the entry point and manages user interactions.

Key Classes

App.java

The main class that serves as the entry point to the application. It handles user input, navigates through various operations, and invokes methods from DAO classes.

DAO Classes

  • CustomerDao: Handles CRUD operations for customers.
  • ProductDao: Handles CRUD operations for products.
  • SaleDao: Handles CRUD operations and reporting for sales.
    • Implements advanced HQL queries:
      • getAllSale(): Fetch all sales records.
      • getSalebyRegion(): Summarize sales by region.
      • getMonthlySale(): Retrieve sales totals by month.
      • getSalebyProduct(): List total sales grouped by product.

Technologies and Frameworks Used

Maven

  • Merits:
    • Simplifies dependency management and build processes.
    • Provides a standardized project structure.
    • Supports a wide range of plugins for added functionality.
  • Demerits:
    • Steep learning curve for beginners.
    • Dependency conflicts can occur if not managed carefully.

Hibernate

  • Merits:
    • Simplifies database interactions with Object-Relational Mapping (ORM).
    • Reduces boilerplate SQL code.
    • Supports caching for improved performance.
  • Demerits:
    • Can be complex to configure for beginners.
    • May lead to performance overhead for complex queries.

MySQL

  • Merits:
    • Reliable and widely used relational database system.
    • Offers high performance and scalability.
    • Comprehensive support and documentation available.
  • Demerits:
    • Requires manual optimization for large datasets.
    • Limited support for non-relational data.

Example Usage

  1. To add a new product:

    • Select option 1 from the main menu.
    • Enter the product details when prompted.
  2. To generate a monthly sales report:

    • Select option 16 from the main menu.
    • View the formatted report in the console.

Some Simulation Results

WhatsApp Image 2024-12-11 at 16 25 30_bc7cc8a6
WhatsApp Image 2024-12-11 at 16 25 30_24f78812
WhatsApp Image 2024-12-11 at 16 25 30_413fb0b1
WhatsApp Image 2024-12-11 at 16 25 30_08c60156
WhatsApp Image 2024-12-11 at 16 25 31_73fe73ee
WhatsApp Image 2024-12-11 at 16 25 31_38dda634
WhatsApp Image 2024-12-11 at 16 25 31_de17063a
WhatsApp Image 2024-12-11 at 16 25 31_bafe10bf

Database Implications

image
image

Contribution

Feel free to fork the repository and submit pull requests to enhance the application. Contributions are welcome!

License

This project is licensed under the MIT License.


Happy Coding!

About

The Sales Reporting System is a Java-based application designed for efficient sales management and reporting. Using Hibernate and MySQL, it provides features like CRUD operations for customers, products, and sales, along with insightful reporting tools. This system simplifies data handling and helps organizations make informed decisions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages