How do I use PostgreSQL in terminal?

How do I use PostgreSQL in terminal?

Install postgresql in linux

The first thing we will do is to install PostgreSQL on our machine, for Windows it is very easy, we just need to go to the Postgresql download page and download the installer, then it will be next, next, next and ready. In addition it installs us a visual environment, for it we look for pgAdmin in the Windows search engine and it will open it to us in the navigator.

The next thing we will do is to create our user and database, if we want to do it from pgAdmin, just open pgAdmin, right click on PostgreSQL <version>, select create and then Login/Group Role.

Now we will learn how to create our user and database by console, for this we open a terminal (in Windows SQL Shell is installed so if you are doing it in Windows and you do not want to use pgAdmin you can do it from there).

Now that we have this, we do the makemigrations and migrate to create our tables in the database. If you have doubts about how to create the tables you can look at the second part of the tutorial on how to create a blog with Django.

Sudo -i -u postgres

Next I show you how to connect to a Postgres database from the Linux terminal in Debian or Ubuntu and its distributions, in those servers that do not have the graphical environment installed or for the simple convenience of the database administrator.

Read more  Is it OK to be a brony?

Note: If we are in a work network or our office, we must verify that the client has permissions to connect to the database server, for this see my article Giving permissions to specific IPs in PostgreSQL from Linux.

Configure postgresql linux

Next I show you how to connect to a Postgres database from the Linux terminal in Debian or Ubuntu and its distributions, in those servers that do not have the graphical environment installed or for simple comfort of the database administrator.

Note: If we are in a work network or our office, we must verify that the client has permissions to connect to the database server, for this see my article Giving permissions to specific IPs in PostgreSQL from Linux.

Installing postgresql on ubuntu

MySQL is an open source relational SQL database, which organizes data into one or more tables in which data types can be related to each other. It is vertically scalable, which means that an ultimate machine will do the work for you. It is currently the most widely used of the four database systems.

PostgreSQL (sometimes referred to as Postgres) is also an open source SQL relational database with an emphasis on extensibility and standards compliance. It can now also handle JSON, but generally works best for structured data, vertical scaling, and ACID-compliant needs such as e-commerce and financial transactions.

Redis is an open source noSQL in-memory data structure store. It uses key-value pairs for storage instead of documents. Redis is known for its flexibility, performance and broad language support. It is flexible enough to be used as a message broker or cache and can use data structures such as lists, sets and hashes.

Read more  How were the provisions of the Convention on the Rights of the Child established?