Building Bricks of HR: How Maya Created Her Company’s First Database

Meet Maya, the office manager at a small but growing company called BrightTech. With 20 employees and lots of spreadsheets flying around, she faced a big challenge:

“How do I keep track of who works here, their jobs, their time off, and salaries—without losing my mind?”

Her solution?

Build a database.

(And no, Maya wasn’t a programmer.)

STEP 1: Understand the People and Process

Maya took a notebook and listed what she needed to manage:

  • Employees and their contact info
  • Job titles and departments
  • Who reports to whom
  • Leave (vacation) records
  • Salary information
  • Performance reviews

She realized:

“This is just organized information. I can split this into tables.”

STEP 2: Sketch the Tables Like a Mind Map

Here’s what Maya came up with:

Table NameWhat It Stores
EmployeesBasic info: name, email, phone, hire date
DepartmentsDepartment names like HR, Sales, IT
JobsTitles like Developer, Analyst, Manager
SalariesEmployee ID, amount, date
LeaveRecordsVacation requests by date and reason

STEP 3: Define Relationships Between Tables

Maya learned an important lesson:

“Don’t repeat information—connect it instead.”

So instead of putting the department name in every employee row, she just linked it with a key.

Here’s how they connect:

  • Every employee belongs to one department
  • Every employee has one job title
  • Every salary record is for one employee
  • Leave records are also for one employee

These links are called relationships.

STEP 4: Write Simple Table Designs

Maya then defined the tables using plain English (translated later to SQL):

Employees Table

  • EmployeeID (primary key)
  • FirstName
  • LastName
  • Email
  • Phone
  • HireDate
  • DepartmentID → links to Departments
  • JobID → links to Jobs

Departments Table

  • DepartmentID (primary key)
  • DepartmentName

Jobs Table

  • JobID (primary key)
  • JobTitle

Salaries Table

  • SalaryID (primary key)
  • EmployeeID → links to Employees
  • Amount
  • EffectiveDate

LeaveRecords Table

  • LeaveID (primary key)
  • EmployeeID → links to Employees
  • LeaveDate
  • Reason
  • Status

STEP 5: Sample SQL Table Code (Optional for Tech Teams)

CREATE TABLE Employees (
  EmployeeID INT PRIMARY KEY,
  FirstName VARCHAR(50),
  LastName VARCHAR(50),
  Email VARCHAR(100),
  Phone VARCHAR(15),
  HireDate DATE,
  DepartmentID INT,
  JobID INT
);

CREATE TABLE Departments (
  DepartmentID INT PRIMARY KEY,
  DepartmentName VARCHAR(50)
);

CREATE TABLE Jobs (
  JobID INT PRIMARY KEY,
  JobTitle VARCHAR(50)
);

CREATE TABLE Salaries (
  SalaryID INT PRIMARY KEY,
  EmployeeID INT,
  Amount DECIMAL(10, 2),
  EffectiveDate DATE
);

CREATE TABLE LeaveRecords (
  LeaveID INT PRIMARY KEY,
  EmployeeID INT,
  LeaveDate DATE,
  Reason VARCHAR(100),
  Status VARCHAR(20)
);

STEP 6: How Maya Uses the Database

  • The HR team views all employees and their departments easily.
  • The Finance team runs reports from the Salaries table.
  • The Manager can pull all vacation history from LeaveRecords.
  • Everyone gets clean data and no more messy spreadsheets!

Conclusion: Databases Make It Work, Simply

Maya didn’t start with code—she started with understanding the business.

She broke it into real-life categories, designed simple linked tables, and let the database do the work.

“I didn’t build software,” she said.

“I just built a better way to organize people and decisions.”

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *