An application which stores data in a relational database for university with JDBC
Application data stored in scheme as depicted below:
The database is to contain data on all students, lecturers, subjects taught and classrooms at the school. The information contained in the database is to allow for preparation of a timetable and registration of grades obtained by students in individual subjects.
The application allows you to perform CRUD (Create-Read-Update-Delete) operations i.e:
- Inserting new entities records into database
- Reading entities records from database based on query
- Updating entities records stored in database
- Deleting entities records from database
Unique searching functions for entities:
- Grade - find grades which value is greater than the parameter value
- Group β find group which type is the same as the parameter value
- Room β find rooms which capacity within lower and upper bounds
- Subject β find subjects which acronym length equals 3
- Person β find people whose names starts with the parameter
- Student β find students whose date of enrollment earlier than the parameter value
- Teacher β find teachers without academic rank
- Lesson β find lessons which duration (expressed in minutes) equals the parameter value
Compiling the project:
- Connect to the server via the software.
- Run the data/mssql/setup.sql file to create a test database and add linked entities to it.
- Change the link to connect to the server, remembering to specify your login and password.
Now you can start testing methods which will work with the entities in the database. Each method, which performs the basic functions (CRUD), as well as the unique functions of the entities, has a unit test. The sequential execution of test methods ( add() -> update() -> delete() ) for any of the entities will result in adding a record -> its updating -> its removing from the entity. Method with unique entity function and findById() method add test data -> test it -> delete added information.