Skip to content

Commit 51fe2a9

Browse files
committed
Initial release
1 parent fa4f212 commit 51fe2a9

43 files changed

Lines changed: 3261 additions & 898 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/encodings.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/uiDesigner.xml

Lines changed: 0 additions & 124 deletions
This file was deleted.

README.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# CRUD Java Application (Uni Project)
2+
3+
A Java application for managing multiple types of databases through an intuitive graphical interface.
4+
5+
## Table of Contents
6+
7+
- [Introduction](#introduction)
8+
- [Features](#features)
9+
- [Supported Databases](#supported-databases)
10+
- [Getting Started](#getting-started)
11+
- [Login Screen](#login-screen)
12+
- [Using the Application](#using-the-application)
13+
- [SQL Databases](#sql-databases)
14+
- [Table Management](#table-management)
15+
- [Data Manipulation](#data-manipulation)
16+
- [Custom Console](#custom-console)
17+
- [MongoDB](#mongodb)
18+
- [Data Manipulation](#data-manipulation-1)
19+
- [Mass Actions](#mass-actions)
20+
- [Notes](#notes)
21+
22+
## Introduction
23+
24+
**CRUD Java** is a Java-based application that provides a platform to interact with various database systems, both SQL and NoSQL. It allows users to perform Create, Read, Update, and Delete (CRUD) operations across different database types through a unified interface.
25+
26+
## Features
27+
28+
- **Multi-Database Support**: Connect to and manage HyperSQL, PostgreSQL, MariaDB, MySQL, SQLite, and MongoDB databases.
29+
- **User Authentication**: Login interfaces tailored for each database type.
30+
- **Table and Collection Management**: Create or delete tables (SQL) and collections (MongoDB) using schemas or manual input.
31+
- **Data Manipulation**: Add, edit, and delete entries, with special considerations for primary keys in SQL databases.
32+
- **Custom Console**: Integrated console for SQL databases with command history, placeholders, and synchronized table views.
33+
- **Pagination and View Control**: Adjust the number of entries per page and navigate through data.
34+
- **Mass Actions**: Perform bulk operations in MongoDB based on specific conditions.
35+
- **Adjustable Interface**: Resize console and input areas, with keyboard shortcuts for enhanced productivity.
36+
37+
## Supported Databases
38+
39+
- **SQL Databases**:
40+
- HyperSQL
41+
- PostgreSQL
42+
- MariaDB
43+
- MySQL
44+
- SQLite
45+
- **NoSQL Database**:
46+
- MongoDB
47+
48+
## Getting Started
49+
50+
### Login Screen
51+
52+
Upon launching the application, you are presented with a selection screen to choose the type of database to connect to. Each database type has its own login interface to capture all necessary connection parameters.
53+
54+
- **Database Selection**: Choose from the supported databases.
55+
- **Credentials Input**: Enter information such as hostname, port, username, and password.
56+
- **Database-Specific Options**: Some databases may require additional settings provided in the login interface.
57+
58+
![Text](https://i.imgur.com/u6VyFjq.png)![Text](https://i.imgur.com/rRzXy8c.png)![Text](https://i.imgur.com/02QY897.png)
59+
60+
---
61+
62+
## Using the Application
63+
64+
The interface varies depending on whether you are working with an SQL database or MongoDB.
65+
66+
### SQL Databases
67+
68+
#### Table Management
69+
70+
After logging in, you will see a list of existing tables in the connected database.
71+
72+
- **Create New Tables**:
73+
- **Using a Schema**: Import a predefined schema to create a table.
74+
- **Manual Creation**: Input the table name, define field names, and specify data types.
75+
- **Delete Existing Tables**: Select a table and choose to delete it, with confirmation to prevent accidental deletions.
76+
77+
![Text](https://i.imgur.com/ojdjsuF.png)![Text](https://i.imgur.com/1ZOKf7H.png)![Text](https://i.imgur.com/pvyTOI8.png)![Text](https://i.imgur.com/qBv1hHH.png)![Text](https://i.imgur.com/mWso7Gh.png)
78+
79+
#### Data Manipulation
80+
81+
After selecting a table, you can view and manipulate its data:
82+
83+
- **Add New Fields**: Add new columns to the table.
84+
- **View Entries**:
85+
- Adjust the number of entries displayed per page.
86+
- Navigate between pages.
87+
- **Edit Entries**:
88+
- Modify field values directly in the table view.
89+
- **Note**: Primary key fields are not editable.
90+
- **Delete Entries**: Select entries to remove them.
91+
92+
#### Custom Console
93+
94+
At the bottom of the SQL database interface is a custom console:
95+
96+
- **Command Execution**: Enter SQL commands.
97+
- **Command History**: Use up (``) and down (``) arrow keys to navigate through previous commands.
98+
- **Placeholders**:
99+
- Use `{}` as a placeholder for the selected table name.
100+
- **Dynamic Updates**:
101+
- Executing queries updates the console output and the table view.
102+
- **Adjustable Size**:
103+
- Resize the console and command input area.
104+
- **Line Breaks**:
105+
- Use `ALT+ENTER` to insert a line break.
106+
107+
![Text](https://i.imgur.com/UMjyPp1.png)![Text](https://i.imgur.com/ymgZ9hh.png)![Text](https://i.imgur.com/nmGbn8I.png)![Text](https://i.imgur.com/6eiAb3D.png)![Text](https://i.imgur.com/C61VGNU.png)
108+
109+
### MongoDB
110+
111+
#### Data Manipulation
112+
113+
- **Viewing Collections**: All collections are listed upon login.
114+
- **Unified Field Display**:
115+
- The data grid shows all fields present across documents.
116+
- Empty cells represent fields not present in a document.
117+
- `'-'` indicates fields that exist but have empty values.
118+
- **Adding Entries**:
119+
- Insert new documents.
120+
- **Field Management**:
121+
- Create new fields as needed.
122+
- Load field models from existing documents.
123+
- **Editing Entries**: Modify any field directly in the data grid.
124+
- **Removing Entries**: Select documents to delete them.
125+
126+
#### Mass Actions
127+
128+
The Mass Action feature allows bulk operations:
129+
130+
- **Add Multiple Entries**: Insert several documents at once.
131+
- **Add/Remove Fields**: Modify multiple documents' structure.
132+
- **Conditional Operations**: Apply actions based on conditions.
133+
- **Batch Deletions**: Remove documents that meet specified conditions.
134+
135+
![Text](https://i.imgur.com/92DDqwJ.png)![Text](https://i.imgur.com/caJhKjd.png)![Text](https://i.imgur.com/LZIsB1b.png)![Text](https://i.imgur.com/ZGfr569.png)![Text](https://i.imgur.com/a15eIz0.png)![Text](https://i.imgur.com/kBuIWSG.png)![Text](https://i.imgur.com/H3B76YT.png)![Text](https://i.imgur.com/1UoFhUk.png)![Text](https://i.imgur.com/blJgiwC.png)
136+
137+
---
138+
139+
## Notes
140+
141+
- Modifying the primary key of an SQL table entry is restricted to maintain data integrity.
142+
- In the custom console, `{}` can be used as a placeholder for the current table name. For example, `SELECT * FROM {}`.
143+
- To insert a line break in the console, press `ALT+ENTER` while typing your command.
144+
145+
---

dependency-reduced-pom.xml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)