DEV Community


Making an HR software with Spring Boot Part II

kudzaitsapo profile image Kudzai Tsapo Updated on ・2 min read

Welcome to the second part of this not really awesome tutorial, on how to make an employee management system in java. In the last tutorial, we decided ... actually, I decided to describe what we are going to be doing, and why ...ish.

Now, I know I unilaterally decided on the technology stack, so let me go back to that for a bit. The Dull Company makes underground bunkers for presidents and rich people (umm ... yes). It has been operational for a few decades, and it employs a a few hundred people. Since Aware is a Java based software, the new IT Director is convinced that Java is the best language for developing software (don't ask me...). Therefore, all IT based systems, even the once they have outsourced, are all Java systems. With his bias, he told you to use Java with MySQL, hence the Spring Boot unilateral declaration. Anyway, there are other technology stacks included in the entire package, and these include but are not limited to Elastic Search and Apache Kafka, and for DevOps, there's Jenkins, Docker and Kubernetes. However, I will not be covering these technologies in this tutorial series. (Because I'm too lazy lol)

So, in this tutorial, we are going to design the database of the system. Actually, scratch that. I'm going to post an already made database design, and I'll try my best to explain how I came up with it. The software I used to make the database design is

Of course, the database could be better, and of course, there's a better way of doing things. However, this way works, and it's for educational purposes. Therefore, it'd be nice if someone could give me a break.

Anyway, continuing with our scenario, as the software engineer, you have managed to sit down with HR, and they've given you the requirements. The requirements are as vague as they can be, and someone even had the decency to draft a "requirements specification document". Don't ask me who!

However, you, being smarter than everyone, manage to figure out what the company needs. And yes, scratch what they want ... (ahem). So, going through the SRS, you know that every employee is under a department. Each department has a manager, and this is a job title given to privileged individuals (ahem). There are different job titles, for example, you being a Software Engineer, means that is your job title under the IT department.

Every employee is entitled to leave days, and if an employee misbehaves, it must be recorded in the system.

Alt Text

So, above is the diagram I've drawn using, and that's what we're going to be using for the database. Now that we're done with database design, we're going to start implementing the database in the next tutorials.

Yes, I know the database diagram can be better, and some parts might be total BS (ummm), but then again ... it works! (I know it does) Let's continue in the next tutorial...

Discussion (0)

Forem Open with the Forem app