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.
- Project Overview
- Database Schema
- Python Scripts
- Getting Started
- Optional Enhancements
- Contributing
- License
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
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.
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
To get started with this project, follow these steps:
-
Clone the repository
git clone https://github.com/yourusername/employee_management.git cd employee_management
-
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
- Create a PostgreSQL database named
-
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
-
Run the Python scripts
- Execute the Python script to perform CRUD operations.
python employee_management.py
- 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.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.