This project is a dockerized PostgreSQL database with an employee_data table and some sample data into it.
db
├── Dockerfile # Docker definition of the PostgreSQL DB
├── init.sql # SQL scritps to create and populate a table with sample data
└── README.md # Project documentation
- Clone the repository:
git clone <repository-url>
cd db/
- Build the Docker image:
docker build -t demo-tat .
- Run the container:
docker run -d --name demo-tat-postgres-container -p 5432:5432 demo-tat
Once the container is running, you should be able to connect into it and run SQL queries.
psql -h localhost -U dbuser -d demo
SELECT * FROM employee_data;
The result should be similar to the one demonstrated below.
id | name | age | designation | salary
----+---------------+-----+--------------------+--------
1 | Alice Johnson | 38 | CEO | 50000
2 | Bob Smith | 40 | CTO | 40000
3 | Charlie Brown | 35 | VP of Engineering | 35000
(3 rows)
This project is licensed under the MIT License.