An open API service indexing awesome lists of open source software.

https://github.com/abdo-essam/online-recruitment-database-project

An online recruitment system is a service that automates company’s recruiting needs by getting volumes of employment applications over the internet.
https://github.com/abdo-essam/online-recruitment-database-project

database microsoft-sql-server sql

Last synced: 23 days ago
JSON representation

An online recruitment system is a service that automates company’s recruiting needs by getting volumes of employment applications over the internet.

Awesome Lists containing this project

README

          

# 🎯 Online Recruitment Database System

[![SQL Server](https://img.shields.io/badge/SQL%20Server-CC2927?style=for-the-badge&logo=microsoft%20sql%20server&logoColor=white)](https://www.microsoft.com/sql-server)
[![Database](https://img.shields.io/badge/Database-316192?style=for-the-badge&logo=postgresql&logoColor=white)](https://github.com/)
[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](http://makeapullrequest.com)


A comprehensive database solution for automating company recruitment processes and connecting job seekers with employers


Features β€’
Schema β€’
ER Diagrams β€’
Queries β€’
Installation β€’
Usage

---

## πŸ“‹ Table of Contents

- [Overview](#-overview)
- [Features](#-features)
- [Database Schema](#-database-schema)
- [ER Diagrams](#-er-diagrams)
- [SQL Queries & Analytics](#-sql-queries--analytics)
- [Installation](#-installation)
- [Usage](#-usage)
- [Sample Data](#-sample-data)
- [Project Structure](#-project-structure)
- [Contributing](#-contributing)
- [License](#-license)

---

## 🌟 Overview

The **Online Recruitment Database System** is a robust database solution designed to automate and streamline the recruitment process for both **job seekers** and **employers**. This system provides a centralized platform where:

- πŸ” **Job Seekers** can create profiles, upload their experience and education details, search for vacancies, and apply for jobs
- 🏒 **Employers** can manage their company profiles, post job vacancies, and track applications
- πŸ“Š **Administrators** can oversee the entire system and generate insightful analytics

The beauty of this online recruitment solution lies in its **accessibility and ease of use**. Anywhere on the globe, designated individuals are able to receive, process, and keep a record of CVs within a web-based information powerhouse.

---

## ✨ Features

### πŸ‘€ Job Seeker Features
- βœ… User registration and profile management
- βœ… Add/update personal information
- βœ… Manage education history
- βœ… Track work experience
- βœ… Search vacancies by criteria
- βœ… Apply for jobs
- βœ… Save jobs for later

### 🏒 Employer Features
- βœ… Company registration and profile
- βœ… Post new job vacancies
- βœ… Manage job listings
- βœ… Set salary ranges
- βœ… Hide/show job posts
- βœ… Track applications
- βœ… Filter candidates

### πŸ“Š Analytics & Reporting
- πŸ“ˆ Most popular job titles by applications
- πŸ“‰ Jobs without applicants tracking
- πŸ† Top employers by announcements
- πŸ“‹ Available positions per employer
- πŸ‘₯ Job seeker activity reports

---

## πŸ—„οΈ Database Schema

The database consists of **14 interconnected tables** designed to handle all aspects of the online recruitment process:

### Core Tables

| Table | Description | Key Fields |
|-------|-------------|------------|
| `JobSeeker` | Stores job seeker profiles | firstname, lastname, email, industry, career level |
| `Employer` | Stores company information | company_name, website_url, establishment_date |
| `Job_post` | Active job listings | salary range, experience required, description |
| `Application` | Job applications | apply_date, job post reference, seeker reference |

### Reference Tables

| Table | Description |
|-------|-------------|
| `Career` | Career levels (Student, Entry Level, Experienced, Manager, Senior Management) |
| `Industry` | Industry categories (IT, Manufacturing, Real Estate, etc.) |
| `Job_type` | Employment types (Full Time, Part Time, Freelance, Internship, etc.) |
| `Job_category` | Job categories (IT/Software Development, Marketing, Finance, etc.) |
| `Job_title` | Job position titles |
| `City` | City locations |
| `states` | State/Country information |

### Supporting Tables

| Table | Description |
|-------|-------------|
| `Education` | Job seeker education history (degree, major, university, GPA) |
| `Experience` | Work experience records (company, duration, description) |
| `Saved_jobs` | Bookmarked jobs by seekers |
| `admin` | System administrator accounts |

### πŸ”— Table Relationships

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Employer │────▢│ Job_post │◀────│ Industry β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Application β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Education │────▢│ JobSeeker │◀────│ Experience β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ“ ER Diagrams

### Conceptual ERD (Entity-Relationship Diagram)

The conceptual model shows the high-level entities and their relationships without implementation details:


Conceptual ERD

**Key Entities:**
- **Job Seeker** - Central entity with attributes for personal info, career level, and industry
- **Employer** - Company entity with establishment details and contact information
- **Job** - Job posting entity linking employers to job seekers through applications
- **Education** & **Experience** - Supporting entities for job seeker qualifications

---

### Physical ERD (Database Schema)

The physical model shows the actual database implementation with tables, columns, data types, and foreign key constraints:


Physical ERD

**Implementation Details:**
- All primary keys use `IDENTITY(1,1)` for auto-increment
- Foreign key constraints ensure referential integrity
- Boolean fields use `BIT` type with appropriate defaults
- Date fields use `DATE` and `SMALLDATETIME` types
- Salary fields use `DECIMAL(10,2)` for precision

---

## πŸ” SQL Queries & Analytics

This project includes **6 powerful analytical queries** to extract meaningful insights from the recruitment data:

### Query A: Most Popular Job Title
> *What was the most interesting job "title" that had maximum number of applicants?*

```sql
SELECT TOP(1) M.job_title AS [Job Title],
M.NumOfApplies AS [Number Of Applies]
FROM (
SELECT Job_title.job_title, COUNT(*) AS NumOfApplies
FROM Application
JOIN Job_post ON Job_post.ID = Application.id_jobpost
JOIN Job_title ON job_title.ID = Job_post.jobtitle_id
GROUP BY job_title
) AS M
ORDER BY M.NumOfApplies DESC;
```

---

### Query B: Jobs Without Applicants
> *What was the announced job "title" that hadn't any applicants last month?*

```sql
SELECT DISTINCT Job_title.job_title
FROM Job_title
JOIN Job_post ON Job_title.ID <> ALL (
SELECT job_title.ID
FROM Application
JOIN Job_post ON Job_post.ID = Application.id_jobpost
JOIN Job_title ON job_title.ID = Job_post.jobtitle_id
WHERE created_at BETWEEN
DATEADD(day, 1-DAY(EOMONTH(CURRENT_TIMESTAMP,-1)), EOMONTH(CURRENT_TIMESTAMP,-1))
AND EOMONTH(CURRENT_TIMESTAMP,-1)
);
```

---

### Query C: Top Employer by Announcements
> *Who was the employer with the maximum announcements last month?*

```sql
SELECT TOP(1) Employer.ID, Employer.company_name,
Employer.contact_no, Employer.email,
City.[name] AS City, states.[name] AS State,
m.posts AS [Number of announcements]
FROM (
SELECT Employer.ID AS Employer_id, COUNT(*) AS posts
FROM Employer
JOIN Job_post ON Job_post.id_employer = Employer.ID
WHERE created_at BETWEEN
DATEADD(day, 1-DAY(EOMONTH(CURRENT_TIMESTAMP,-1)), EOMONTH(CURRENT_TIMESTAMP,-1))
AND EOMONTH(CURRENT_TIMESTAMP,-1)
GROUP BY Employer.ID
) AS m
JOIN Employer ON Employer.ID = m.Employer_id
JOIN City ON City.cities_id = Employer.city_id
JOIN states ON states.ID = City.state_id
ORDER BY [Number of announcements] DESC;
```

---

### Query D: Inactive Employers
> *Who were the employers that didn't announce any job last month?*

```sql
SELECT Employer.ID, Employer.company_name,
Employer.contact_no, Employer.email,
City.[name] AS City, states.[name] AS State
FROM Employer
JOIN City ON City.cities_id = Employer.city_id
JOIN states ON states.ID = City.state_id
WHERE Employer.ID <> ALL (
SELECT Employer.ID
FROM Employer
JOIN Job_post ON Employer.ID = Job_post.id_employer
WHERE created_at BETWEEN
DATEADD(day, 1-DAY(EOMONTH(CURRENT_TIMESTAMP,-1)), EOMONTH(CURRENT_TIMESTAMP,-1))
AND EOMONTH(CURRENT_TIMESTAMP,-1)
);
```

---

### Query E: Available Positions by Employer
> *What were the available positions at each employer last month?*

```sql
SELECT Job_post.id_employer AS [Employer ID], Job_post.ID AS [Post ID],
job_title.job_title, Job_post.[description],
Job_category.job_category, job_type.job_type,
Industry.[name] AS Industry, min_salary, max_salary,
City.[name] AS City, states.[name] AS State,
Job_post.experience_years
FROM Job_post
JOIN Job_title ON job_title.ID = Job_post.jobtitle_id
JOIN City ON City.cities_id = Job_post.city_id
JOIN states ON states.ID = Job_post.state_id
JOIN Job_category ON Job_category.ID = Job_post.job_category
JOIN Job_type ON job_type.ID = Job_post.jobtype_id
JOIN Industry ON Industry.id = Job_post.industry_id
WHERE Job_post.is_active = 1
AND created_at BETWEEN
DATEADD(day, 1-DAY(EOMONTH(CURRENT_TIMESTAMP,-1)), EOMONTH(CURRENT_TIMESTAMP,-1))
AND EOMONTH(CURRENT_TIMESTAMP,-1)
ORDER BY Job_post.id_employer;
```

---

### Query F: Job Seeker Applications Summary
> *For each seeker, retrieve all their information and the number of jobs they applied for*

```sql
SELECT JobSeeker.ID, JobSeeker.firstname, JobSeeker.lastname,
JobSeeker.email, JobSeeker.about_me, JobSeeker.contact_no,
JobSeeker.date_of_birth, JobSeeker.gender,
states.[name] AS State, City.[name] AS City,
Career.[name] AS Career, Industry.[name] AS Industry,
COUNT(Application.jobseeker_id) AS NumberOfApplies
FROM Application
RIGHT JOIN JobSeeker ON Application.jobseeker_id = JobSeeker.ID
LEFT JOIN City ON JobSeeker.city_id = City.cities_id
LEFT JOIN states ON JobSeeker.state_id = states.ID
LEFT JOIN Career ON JobSeeker.career_id = Career.ID
LEFT JOIN Industry ON JobSeeker.industry_id = Industry.id
GROUP BY JobSeeker.ID, JobSeeker.firstname, JobSeeker.lastname,
JobSeeker.email, JobSeeker.about_me, JobSeeker.contact_no,
JobSeeker.date_of_birth, JobSeeker.gender,
City.[name], states.[name], Career.[name], Industry.[name]
ORDER BY NumberOfApplies DESC;
```

---

## πŸš€ Installation

### Prerequisites
- Microsoft SQL Server 2016 or later
- SQL Server Management Studio (SSMS) or Azure Data Studio

### Setup Instructions

1. **Clone the repository**
```bash
git clone https://github.com/Abdo-Essam/Online-Recruitment-Database-Project.git
cd Online-Recruitment-Database-Project
```

2. **Create the database**
```sql
CREATE DATABASE OnlineRecruitment;
USE OnlineRecruitment;
```

3. **Create tables**
- Open `create tables.TXT` in SSMS
- Execute the script to create all tables

4. **Insert sample data**
- Open `insert in tables.TXT` in SSMS
- Execute the script to populate with sample data

5. **Run analytical queries**
- Navigate to the `queries/` folder
- Execute queries a.TXT through f.TXT as needed

---

## πŸ’» Usage

### Creating a Job Seeker Profile

```sql
INSERT INTO JobSeeker(firstname, lastname, email, password, about_me,
city_id, state_id, contact_no, career_id,
date_of_birth, gender, industry_id)
VALUES ('John', 'Doe', 'john.doe@email.com', 'securepass123',
'Experienced software developer...', 1, 1, '01234567890',
3, '1995-06-15', 'M', 4);
```

### Posting a Job Vacancy

```sql
INSERT INTO Job_post(id_employer, jobtitle_id, min_salary, max_salary,
city_id, state_id, experience_years, description,
job_category, jobtype_id, industry_id)
VALUES (1, 2, 5000, 10000, 1, 1, 2,
'We are looking for a skilled web designer...',
6, 1, 4);
```

### Applying for a Job

```sql
INSERT INTO Application(id_jobpost, jobseeker_id)
VALUES (1, 1);
```

---

## πŸ“ Sample Data

The database comes pre-loaded with sample data including:

### 🏒 Sample Employers
| Company | Industry | Location |
|---------|----------|----------|
| Facebook | Technology | Fort Wayne, Indiana |
| Google | Technology | Lincoln, Nebraska |
| Amazon | E-commerce | Birmingham, Alabama |
| AE | Technology | Birmingham, Alabama |
| Souq | E-commerce | Fort Wayne, Indiana |

### πŸ‘₯ Sample Job Seekers
| Name | Career Level | Industry |
|------|--------------|----------|
| Abdo Kamal | Experienced | FMCG |
| Yara Yaser | Entry Level | Manufacturing |
| Abdo Essam | Student | Computer Software |
| Ahmed Mostafa | Entry Level | IT Services |
| Sara Ahmed | Entry Level | Manufacturing |

### πŸ“‹ Sample Job Types
- Full Time
- Part Time
- Work From Home
- Freelance/Project
- Internship
- Shift Based
- Volunteering
- Student Activity

---

## πŸ“‚ Project Structure

```
Online-Recruitment-Database-Project/
β”‚
β”œβ”€β”€ πŸ“„ README.md # Project documentation
β”œβ”€β”€ πŸ“„ create tables.TXT # DDL scripts for table creation
β”œβ”€β”€ πŸ“„ insert in tables.TXT # Sample data insertion scripts
β”œβ”€β”€ πŸ“„ DATA.TXT # Reference data values
β”‚
β”œβ”€β”€ πŸ“ queries/ # SQL analytical queries
β”‚ β”œβ”€β”€ a.TXT # Most popular job query
β”‚ β”œβ”€β”€ b.TXT # Jobs without applicants query
β”‚ β”œβ”€β”€ c.TXT # Top employer query
β”‚ β”œβ”€β”€ d.TXT # Inactive employers query
β”‚ β”œβ”€β”€ e.TXT # Available positions query
β”‚ └── f.TXT # Job seeker summary query
β”‚
β”œβ”€β”€ πŸ–ΌοΈ ERD conceptual .png # Conceptual ER diagram
β”œβ”€β”€ πŸ–ΌοΈ ERD Physical.png # Physical database schema
β”‚
β”œβ”€β”€ πŸ“„ IS211 Project Description.pdf # Original project requirements
└── πŸ“„ IS211-20180144.pdf # Project report
```

---

## 🀝 Contributing

Contributions are welcome! Here's how you can help:

1. **Fork** the repository
2. **Create** a feature branch (`git checkout -b feature/AmazingFeature`)
3. **Commit** your changes (`git commit -m 'Add some AmazingFeature'`)
4. **Push** to the branch (`git push origin feature/AmazingFeature`)
5. **Open** a Pull Request

### Contribution Ideas
- πŸ› Bug fixes and improvements
- πŸ“ Additional SQL queries
- 🎨 Enhanced ERD visualizations
- πŸ“– Documentation improvements
- πŸ§ͺ Performance optimizations

---

## πŸ“œ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

## πŸ‘¨β€πŸ’» Author

**Abdo Essam**

[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Abdo-Essam)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/abdo-essam)

---

### ⭐ Star this repository if you find it helpful!


Stars
Forks
Watchers

**Made with ❀️ for the Database Course (IS211)**