Mount volumes to persist data in local & initialize database in Docker

When a docker container is deleted, relaunching it from the image will start a fresh new container without any of the changes made in the previously running containerThis happens because when we create a new container from an image, we add a new writable layer on top of the underlying stack of layers present in … Continue reading Mount volumes to persist data in local & initialize database in Docker

Import data from local to postgreSQL and pgAdmin4 running on Docker

Copy the csv file to a local folderOpen pgAdmin4 and select the table where you want to import the data intoRight click and select Import/Export Select the Import option and click on three dots for file name Click on the icon highlighted in red which is to drag file Drag the file that you want … Continue reading Import data from local to postgreSQL and pgAdmin4 running on Docker

Run PostgreSQL and pgAdmin in docker for local development using docker compose

create a directory mkdir postgres-docker && cd postgres-dockercreate a file and name it as docker-compose.yml Add the following content in the docker-compose,yml file version: "3.8" services: db: image: postgres container_name: local_pgdb restart: always ports: - "54320:5432" environment: POSTGRES_USER: user POSTGRES_PASSWORD: admin volumes: - local_pgdata:/var/lib/postgresql/data pgadmin: image: dpage/pgadmin4 container_name: pgadmin4_container restart: always ports: - "5050:80" environment: … Continue reading Run PostgreSQL and pgAdmin in docker for local development using docker compose

SQL Vs No-SQL

Relational databases store data in table - rows and columns. Each row contains all the information about one entity and each column contains all the separate data points. Some of the most popular relational databases are MySQL, Oracle, MS SQL Server, SQLite, Postgres, and MariaDB. Non-relational databases are unstructured and have a dynamic schema. Example … Continue reading SQL Vs No-SQL