Objective
Create a resume database with skills extraction and candidate matching. This enables recruitment teams to search candidates by skills, experience, and qualifications efficiently.
Step 1: Create Candidates Table
Create a table for candidate information.
CREATE TABLE candidates (
id INTEGER PRIMARY KEY,
resume_pdf PDF,
full_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
phone VARCHAR(50),
location VARCHAR(100),
current_title VARCHAR(100),
years_experience INTEGER,
education_level VARCHAR(50),
highest_degree VARCHAR(100),
summary TEXT,
resume_embedding VECTOR(384),
source VARCHAR(50),
status VARCHAR(20) DEFAULT 'new',
applied_date DATE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Step 2: Create Skills Table
Create a table for candidate skills.
CREATE TABLE candidate_skills (
id INTEGER PRIMARY KEY,
candidate_id INTEGER NOT NULL,
skill_name VARCHAR(100) NOT NULL,
skill_category VARCHAR(50),
proficiency_level VARCHAR(20),
years_experience INTEGER,
is_primary BOOLEAN DEFAULT FALSE,
FOREIGN KEY (candidate_id) REFERENCES candidates(id)
);
Step 3: Create Experience Table
Track work experience.
CREATE TABLE candidate_experience (
id INTEGER PRIMARY KEY,
candidate_id INTEGER NOT NULL,
company_name VARCHAR(255) NOT NULL,
job_title VARCHAR(100) NOT NULL,
start_date DATE,
end_date DATE,
is_current BOOLEAN DEFAULT FALSE,
description TEXT,
location VARCHAR(100),
FOREIGN KEY (candidate_id) REFERENCES candidates(id)
);
Step 4: Insert Sample Candidates
Add sample candidate records.
INSERT INTO candidates (id, full_name, email, phone, location, current_title, years_experience, education_level, highest_degree, summary, source, status, applied_date) VALUES
(1, 'Alice Johnson', 'alice.johnson@email.com', '555-0101', 'San Francisco, CA', 'Senior Software Engineer', 8, 'Masters', 'MS Computer Science', 'Experienced full-stack developer specializing in cloud-native applications and microservices architecture.', 'LinkedIn', 'screening', '2024-01-15'),
(2, 'Bob Smith', 'bob.smith@email.com', '555-0102', 'New York, NY', 'Data Scientist', 5, 'Masters', 'MS Data Science', 'Machine learning specialist with experience in NLP and computer vision projects.', 'Indeed', 'interview', '2024-01-18'),
(3, 'Carol Williams', 'carol.williams@email.com', '555-0103', 'Austin, TX', 'DevOps Engineer', 6, 'Bachelors', 'BS Information Technology', 'Cloud infrastructure expert with strong Kubernetes and CI/CD experience.', 'Referral', 'new', '2024-01-20'),
(4, 'David Chen', 'david.chen@email.com', '555-0104', 'Seattle, WA', 'Product Manager', 7, 'MBA', 'MBA', 'Technical product manager with background in software development and agile methodologies.', 'Company Website', 'offer', '2024-01-10'),
(5, 'Emily Davis', 'emily.davis@email.com', '555-0105', 'Boston, MA', 'Frontend Developer', 4, 'Bachelors', 'BS Computer Science', 'React and TypeScript specialist focused on building accessible user interfaces.', 'LinkedIn', 'screening', '2024-01-22'),
(6, 'Frank Miller', 'frank.miller@email.com', '555-0106', 'Chicago, IL', 'Backend Developer', 3, 'Bachelors', 'BS Software Engineering', 'Java and Python developer with experience in API development and database design.', 'Indeed', 'new', '2024-01-25');
Step 5: Insert Candidate Skills
Add skills for candidates.
INSERT INTO candidate_skills (id, candidate_id, skill_name, skill_category, proficiency_level, years_experience, is_primary) VALUES
-- Alice's skills
(1, 1, 'Python', 'Programming', 'expert', 8, TRUE),
(2, 1, 'JavaScript', 'Programming', 'advanced', 6, TRUE),
(3, 1, 'AWS', 'Cloud', 'expert', 5, TRUE),
(4, 1, 'Docker', 'DevOps', 'advanced', 4, FALSE),
(5, 1, 'PostgreSQL', 'Database', 'advanced', 6, FALSE),
-- Bob's skills
(6, 2, 'Python', 'Programming', 'expert', 5, TRUE),
(7, 2, 'Machine Learning', 'AI/ML', 'expert', 5, TRUE),
(8, 2, 'TensorFlow', 'AI/ML', 'advanced', 4, TRUE),
(9, 2, 'SQL', 'Database', 'advanced', 5, FALSE),
(10, 2, 'NLP', 'AI/ML', 'advanced', 3, FALSE),
-- Carol's skills
(11, 3, 'Kubernetes', 'DevOps', 'expert', 5, TRUE),
(12, 3, 'AWS', 'Cloud', 'expert', 6, TRUE),
(13, 3, 'Terraform', 'DevOps', 'advanced', 4, TRUE),
(14, 3, 'CI/CD', 'DevOps', 'expert', 6, FALSE),
-- Emily's skills
(15, 5, 'React', 'Frontend', 'expert', 4, TRUE),
(16, 5, 'TypeScript', 'Programming', 'expert', 4, TRUE),
(17, 5, 'CSS', 'Frontend', 'advanced', 4, FALSE),
(18, 5, 'Accessibility', 'Frontend', 'advanced', 3, FALSE);