Skip to content

piepelniCa/java-task-manager-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager with SQLite

A console-based Java task manager built with Maven and SQLite.

This project allows users to manage tasks using a local database, with support for creating, viewing, updating, filtering, and deleting tasks.


Features

  • Add new tasks
  • View all tasks
  • Mark tasks as done
  • Edit task titles
  • Remove tasks
  • Show completed tasks
  • Show not completed tasks
  • Persistent local storage with SQLite
  • Input validation and basic error handling

Technologies Used

  • Java 17
  • Maven
  • SQLite
  • JDBC
  • SQL
  • Object-Oriented Programming (OOP)

Project Structure

TaskManagerDB/
├── src/
│   └── main/
│       └── java/
│           ├── Main.java
│           ├── Task.java
│           └── DatabaseManager.java
├── pom.xml
├── .gitignore
└── README.md

Database

The application uses a local SQLite database file:

tasks.db

Table structure:

CREATE TABLE IF NOT EXISTS tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL,
    done INTEGER NOT NULL
);

How to Run

  1. Clone the repository:
git clone https://github.com/piepelniCa/java-task-manager-db.git
  1. Open the project in IntelliJ IDEA

  2. Let Maven load the dependencies

  3. Run:

Main.java

Example Menu

--- TASK MANAGER DB ---
1. Add task
2. View tasks
3. Mark task as done
4. Remove task
5. Exit
6. Edit task title
7. Show completed tasks
8. Show not completed tasks

What I Learned

  • How to set up a Maven-based Java project
  • How to connect Java to SQLite using JDBC
  • How to perform CRUD operations with SQL
  • How to separate application logic into model, database, and UI layers
  • How to validate user input and handle common edge cases

Future Improvements

  • Search tasks with SQL queries
  • Add timestamps for created tasks
  • Sort tasks by date or status
  • Build a GUI version
  • Convert the project into a REST API with Spring Boot

Author

Tadas Kardauskas

GitHub: https://github.com/piepelniCa


This project was created as part of my transition into IT and to strengthen my Java and backend development skills.

About

Java Maven task manager with SQLite database using JDBC (CRUD operations, filtering, validation)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages