Employee Management System

This project is a database management system for employees and departments. It includes tables for employees and departments. The database is built using PostgreSQL, and this project includes scripts to create the database schema, perform CRUD operations, and interact with it using Python.

Table of Contents

Project Overview

The Employee Management System is designed to help manage the following:

  • Departments and their details
  • Employees and their details, including contact information and hire dates
  • Relationships between employees and departments

Database Schema

The database schema is defined in the schema.sql file. It includes the following tables:

  • departments: Stores information about departments.
  • employees: Stores information about employees.

Python Scripts

The employee_management.py file contains Python scripts to interact with the database. These scripts include functions to:

  • Create new departments and employees
  • Read employee data
  • Update employee data
  • Delete employee data

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository

    git clone https://github.com/yourusername/employee_management.git
    cd employee_management
  2. Set up the database

    • Create a PostgreSQL database named employee_management.
    • Execute the schema.sql file to create the tables.
    createdb employee_management
    psql -d employee_management -f schema.sql
  3. Set up the Python environment

    • Create a virtual environment and install required packages.
    python3 -m venv venv
    source venv/bin/activate
    pip install psycopg2-binary
  4. Run the Python scripts

    • Execute the Python script to perform CRUD operations.
    python employee_management.py

Optional Enhancements

  • Implement stored procedures for common operations.
  • Create views for complex queries.
  • Develop a simple web interface to interact with the database.
  • Add additional tables and relationships, such as project assignments or performance reviews.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.