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.
- Host: GitHub
- URL: https://github.com/abdo-essam/online-recruitment-database-project
- Owner: abdo-essam
- Created: 2023-05-18T22:33:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-02T01:45:48.000Z (over 2 years ago)
- Last Synced: 2025-03-15T15:44:06.486Z (about 1 year ago)
- Topics: database, microsoft-sql-server, sql
- Homepage:
- Size: 3.58 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π― Online Recruitment Database System
[](https://www.microsoft.com/sql-server)
[](https://github.com/)
[](LICENSE)
[](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:
**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:
**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**
[](https://github.com/Abdo-Essam)
[](https://linkedin.com/in/abdo-essam)
---
### β Star this repository if you find it helpful!
**Made with β€οΈ for the Database Course (IS211)**