Setup SMS Database using Postgres¶
Let us go ahead and setup SMS database using Postgres so that we can learn SQL as part of this course using it.
Here are the highlevel steps invovled.
- Connect to database running as part of pg.itversity.com container using docker compose command.
- Run required commands to create database, create user and grant permissions on database to user.
- Come out of it. Later you need to use these details to connect to the database to learn SQL using jupyter based environment.
Connect to pg.itversity.com
You need to make sure that you run this from your host (Mac or Windows or AWS Cloud9 or Linux).
docker-compose exec pg.itversity.com psql -U postgres
Run SQL Commands
You need to make sure that you are in Postgres CLI.
CREATE DATABASE itversity_sms_db; CREATE USER itversity_sms_user WITH ENCRYPTED PASSWORD 'itversity'; GRANT ALL ON DATABASE itversity_sms_db TO itversity_sms_user; \q
In [ ]: