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.
- Add new products.
- View details of a specific product.
- Update existing products.
- Delete products.
- List all products.
- Add new customers.
- View details of a specific customer.
- Update existing customers.
- Delete customers.
- List all customers.
- Add new sales records.
- View details of a specific sale.
- Update existing sales records.
- Delete sales records.
- List all sales.
- Generate monthly sales reports.
- View sales reports by product.
- View sales reports by region.
- 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.
- Java Development Kit (JDK) 8 or higher
- MySQL database
- Maven build tool
-
Clone the repository:
git clone 'https://github.com/aftermath22/Sales-Reporting-System.git'
-
Import the project into your favorite Java IDE (e.g., IntelliJ IDEA, Eclipse).
-
Configure the database connection in the DAO classes (
CustomerDao
,ProductDao
,SaleDao
). Ensure that the database schema is set up as required. -
Build the project using Maven:
mvn clean install
-
Run the
App.java
file to start the application.
- Launch the application by running the
App.java
file. - Follow the menu prompts to interact with the system.
- Insert Product
- Insert Customer
- Insert Sale
- View Product
- View Customer
- View Sale
- Update Product
- Update Customer
- Update Sale
- Delete Product
- Delete Customer
- Delete Sale
- Get All Products
- Get All Customers
- Get All Sales
- Get Monthly Sales
- Get Sales by Product
- Get Sales by Region
- Exit
-
com.mycompany.beans
- Contains data models:
Customer
,Product
, andSale
.
- Contains data models:
-
com.mycompany.dao
- Provides Data Access Object (DAO) classes:
CustomerDao
,ProductDao
, andSaleDao
.
- Provides Data Access Object (DAO) classes:
-
com.mycompany.SalesReportingSystem
- Contains the
App
class, which serves as the entry point and manages user interactions.
- Contains the
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.
- 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.
- Implements advanced HQL queries:
- 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.
- 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.
- 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.
-
To add a new product:
- Select option
1
from the main menu. - Enter the product details when prompted.
- Select option
-
To generate a monthly sales report:
- Select option
16
from the main menu. - View the formatted report in the console.
- Select option
Feel free to fork the repository and submit pull requests to enhance the application. Contributions are welcome!
This project is licensed under the MIT License.
Happy Coding!