Skip to content

sadeep654/Song-Download-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Banner


🔹 Overview

A fully functional Java application built using Object-Oriented Programming (OOP), MySQL, and JDBC. The system manages artists, songs, and song prices, and includes CRUD operations stored in a real database. This upgraded version transforms the original assignment into a production-style, database-backed system.

water

Full system description referenced from project documentation.


🔹 Features

🎤 Artist Management

  • Add new artists
  • Automatically generated artist IDs
  • List all artists

🎶 Song Management

  • Add songs with title, price, artist ID
  • Update song prices
  • Delete songs
  • List all songs with artist details
  • Supports real MySQL data storage

▶️ Song Playback Simulation

  • Simulate song plays
  • Estimate revenue after platform fee
  • Demonstrates Java class interactions

🧱 Architecture Overview

  • DAO Pattern (ArtistDAO, SongDAO)
  • Modular OOP classes
  • MySQL-backed persistence
  • Console-based UI (MainMenu)
  • Lightweight reusable models

🔹 Architecture

Project Structure

Java-Music-Management/
├── src/
│   ├── Artist.java
│   ├── User.java
│   ├── Operators.java
│   ├── PlayASong.java
│   ├── Calculations.java
│   ├── DBConnection.java
│   ├── ArtistDAO.java
│   ├── SongDAO.java
│   └── MainMenu.java
├── database/
    └── init_database.sql

Architecture Summary

Music Artist & Song Management System


🔹 Configurations

MySQL Database Setup

Run the provided SQL script: database/init_database.sql

Or manually execute:

CREATE DATABASE musicdb;
USE musicdb;

CREATE TABLE artists (
    artist_id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL
);

CREATE TABLE songs (
    song_id INT AUTO_INCREMENT PRIMARY KEY,
    artist_id INT NOT NULL,
    title VARCHAR(200) NOT NULL,
    price DECIMAL(6,2) NOT NULL,
    FOREIGN KEY (artist_id) REFERENCES artists(artist_id) ON DELETE CASCADE
);

JDBC Configuration

Update your MySQL credentials in DBConnection.java:

private static final String URL = "jdbc:mysql://localhost:3306/musicdb?serverTimezone=UTC";
private static final String USER = "root";
private static final String PASS = "your_password_here";

▶️ Running the Application

1️⃣ Compile the project javac *.java

2️⃣ Run the system java MainMenu

3️⃣ Application Menu

=== Music Management System (MySQL) ===
1) Add Artist
2) Add Song
3) Update Song Price
4) Delete Song
5) List Songs
6) Simulate Play
7) List Artists
0) Exit

🔹 Class Overview

Models

  • Artist.java – Artist entity
  • Song (inside PlayASong.java) – Song entity
  • User.java – Placeholder for future authentication
  • Operators.java – Example operator information

Logic

  • Calculations.java – Revenue & math utilities
  • PlayASong.java – Simulates playback & revenue estimation

Database Layer

  • DBConnection.java – JDBC connector
  • ArtistDAO.java – Insert & list artists
  • SongDAO.java – CRUD operations for songs

Main Entry Point

  • MainMenu.java – Console-based interactive menu

🔹 Future Enhancements

  • Add authentication for admins/users
  • Add GUI using JavaFX or Swing
  • Add playlist management
  • Add user accounts and premium packages
  • Add REST API using Spring Boot
  • Add full CRUD UI

🔹 License

This project is licensed under the MIT License. See the LICENSE file for details.


🔹 Authors

Copyright (c) 2020 Sadeep Dilshan Kasthuriarachchi

🔹 Citation

If you reference this work, please cite:

Kasthuriarachchi, S.D. (2020) Music Artist & Song Management System. [online] Available at: https://github.com/sadeep654/Song-Download-System (Accessed: date-you-accessed)

About

This is a simple system that allows artists to add songs to the system, including song titles and prices, created using MySQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors