Postgres database is used in data science for analyzing data. It become most popular for data scientist and data analyst.
What is PostgreSQL?
PostgreSQL is Object Relational Database Management System (ORDBMS).For analyzing data it uses SQL language.
Users of PostgreSQL are Instagram, Skype etc.
How to install postgreSQL?
I am going to tell you how to install on windows.
How to install postgreSQL in 10 easy steps?
Step 1- postgreSQL – Firstly, you can download postgreSQL latest version from Google. Here, I have downloaded postgreSQL 12.
-Run as administrator then click next.
Step 2-Installation directory – you can Keep Installation directory as default then click next.
i) PostgreSQL Server is an actual database application for Postgres.
ii) pgAdmin 4 is a UI tool that are going to interact with PostgreSQL server.
We need mainly these two options.
Default all these 4 options are checked then click next.
Step 4-Data Directory– you can take Data Directory take as default.
This password is needed in pgAdmin 4 login for server connectivity.
After creating the password then Click next.
Step 6-Port– Default port 5432 is already there.
If some other application is using same port then you can check that applications.
I think you don’t have any issue; this is very rare port no.
Step 7- Advanced options– you can take Select the Locale as default locale then click next.
Step 8-Pre installation summary–This setting will be used for the installations then click next.
Step 9-Ready to install– Now is set is ready to begin installing postgreSQL in your computer. Then click next it starts installing postgreSQL.
Step 10-you can unchecked start builder then click finish. Everything thing is installed inside postgreSQL 12 folder.
Now, you can check all components are installed in your PC.
Working on pgAdmin 4
Connection of postgreSQL database inside pgAdmin 4-
1-Firstly open pgAdmin 4
2-When you expand Servers tab – PostgreSQL 12 is already there.
3-When you expand postgreSQL 12 tab- It will ask you password. You need to enter that password which you have created when you are installing postgreSQL.
Then we are connected to postgreSQL.
4-Now we have Databases tab inside postgreSQLtab ,if you expand we can see postgres database.
Then expand it, we got many items which are object of database.
You can see below screenshot.
For database purpose, mainly we work on tables or views. Now, we can analyses data by using Postgres database.
I hope you understood basic of PostgreSQL in Data Science. IN next article I will explain you analyzing data in database.
You will learn many more concepts in new articles. Keep reading.