The main task of this project is to display on JSP
a group data from database using plain JDBC
and the PostgreSQL
database.
Was created two tables: cities and students with 1:M
relationship between two entities respectively. The application
allows
to generate a list of all students and cities. Moreover, can be displayed a resulting table using SQL queries to
database.
The application is able to provide all CRUD
methods related to each entity in table. Thus, operations such as adding
new cities,
new students, deleting students, and deleting cities are available to the user. Some code coverded with unit tests.
The ultimate goal is to develop a fully functioning and reliable web application with the desired capabilities for both the primary task and the secondary task.
Show
- Java 1.8.0_282
- Apache Tomcat 9.0.73
- Maven 3.8.1
- PostgreSQL 15.1
- Project Lombok 1.18.24
- CRUD methods for student entity
- CRUD methods for city entity
- show resulting 1:M relationship table
Clone the project
git clone https://github.com/Petrovich-A/Student.git
Go to the project directory and run
this script
to populate the database tables.
1:M -> city:students:
city_id SERIAL,
name text NOT NULL,
PRIMARY KEY (city_id),
UNIQUE (name);
student_id SERIAL,
first_name VARCHAR(40) NOT NULL,
last_name VARCHAR(40) NOT NULL,
city_id int NOT NULL,
PRIMARY KEY (student_id),
FOREIGN KEY (student_id) REFERENCES students (student_id),
FOREIGN KEY (city_id) REFERENCES cities (city_id);
- to add the lombok
- to add an error page
- to add checking is entity exists
- opportunity to delete city which associated with student
Petrovich Alexandr - @Petrovich Alexandr - a.piatrovich@gmail.com
Use this section to mention useful resources and libraries that you have used in your projects.