Skip to content

Allows to show on JSP a collection of data from a database using basic JDBC and the PostgreSQL database, which contains two tables: cities and students with a 1:M relationship. The app generates a list of all students and cities. Furthermore, CRUD methods are available for both entities.

License

Notifications You must be signed in to change notification settings

Petrovich-A/Student

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student application

GitHub last commit (branch) GitHub commit activity (branch) GitHub pull requests


📔 Table of Contents

🌟 About the Project

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.

📷 Screenshots

Alt text

👾 Tech Stack

Show
  • Java 1.8.0_282
  • Apache Tomcat 9.0.73
  • Maven 3.8.1
  • PostgreSQL 15.1
  • Project Lombok 1.18.24

🎯 Features

  • CRUD methods for student entity
  • CRUD methods for city entity
  • show resulting 1:M relationship table

🏃 Run Locally

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.

🔑 Database structure

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);

🧭 Have to fix:

  • to add the lombok
  • to add an error page
  • to add checking is entity exists
  • opportunity to delete city which associated with student

🤝 Contact

Petrovich Alexandr - @Petrovich Alexandr - [email protected]

💎 Acknowledgements

Use this section to mention useful resources and libraries that you have used in your projects.

About

Allows to show on JSP a collection of data from a database using basic JDBC and the PostgreSQL database, which contains two tables: cities and students with a 1:M relationship. The app generates a list of all students and cities. Furthermore, CRUD methods are available for both entities.

Topics

Resources

License

Stars

Watchers

Forks