Skip to content

Client-Server Database System: Java Swing Frontend + Java Socket Server. Translates SQL inputs into MongoDB document storage operations.

License

Notifications You must be signed in to change notification settings

levilevente/miniDBMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java SQL-to-MongoDB Management System

Java

A Client-Server Database Management System built in Java. It features a custom parser that allows users to execute MSSQL-style commands on a MongoDB backend.


📖 Overview

This project was created as a sophomore-year (2nd year) college coursework assignment for the Databases course.

The application bridges the gap between SQL and NoSQL. It allows users familiar with SQL syntax (like SELECT, INSERT) to interact with a MongoDB database through a graphical interface, without needing to write raw MongoDB queries.

img.png

🏗 Architecture

The system uses a Client-Server model:

  1. Client: A Java Swing GUI that accepts user input.
  2. Server: A Java Socket application that parses the SQL manages computational logic and executes it on MongoDB.

🛠 Tech Stack

  • Language: Java (100%)
  • Frontend: Java Swing (GUI)
  • Backend: Java Sockets & ServerSocket
  • Storage: MongoDB (NoSQL)
  • Driver: MongoDB Java Driver

⚙️ Configuration & Setup

1. Prerequisites

  • Java JDK: Version 8 or higher.
  • MongoDB: Community Edition (installed locally).
  • OS: macOS (Required for the commands below).

2. Start the Database (macOS)

Before running the Java application, you must start the MongoDB service via Homebrew.

# Start MongoDB Service
brew services start mongodb-community

Default Connection: mongodb://localhost:27017

Note: Ensure port 27017 is free.

🚀 How to Run

Because this is a networked application, you must run the components in the specific order below.

Step 1: Start the Server

Run the backend entry point first. This opens the socket port and connects to Mongo.

  • Class: ServerWindow.java
  • Action: Run main() method.
  • Status: On the UI press start button.

Step 2: Start the Client

Run the frontend entry point.

  • Class: GUI.java
  • Action: Run main() method.
  • Status: The GUI window will appear.

💻 Supported Commands

The system parses SQL-like syntax into MongoDB document operations.

Create (Insert)

INSERT INTO students (id, name, grade) VALUES (101, 'Odon', 95);

Read (Select)

SELECT * FROM students WHERE grade > 90;

Update

UPDATE students SET grade = 98 WHERE id = 101;

Delete

DELETE FROM students WHERE id = 101;

👥Contributors

  • Levente Daroczi - levilevente
  • Beniamin Demeter - benimester

About

Client-Server Database System: Java Swing Frontend + Java Socket Server. Translates SQL inputs into MongoDB document storage operations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages