0% found this document useful (0 votes)
8 views13 pages

Lab Work 4. Instructions For PostgreSQL

Uploaded by

hastpauli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views13 pages

Lab Work 4. Instructions For PostgreSQL

Uploaded by

hastpauli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Databases Design.

Introduction to SQL

PostgreSQL

IITU, ALMATY
PostgreSQL + pgAdmin
• PostgreSQL is an advanced, enterprise-class, and open-
source RDBMS. PostgreSQL supports both SQL (relational)
and JSON (non-relational) querying. PostgreSQL is used as
a database for many web applications as well as mobile and
analytics applications.

• pgAdmin is a graphical tool for managing and developing


databases.
PostgreSQL installation
www.postgresql.org/download/

• This installer includes the PostgreSQL server,


pgAdmin;
Connection to server
• Open pgAdmin on your computer.
• Enter the password you set during installation.
• If during installation you did not set a password, then
use "00000000" by default .
Connection to server

Double click

Enter the password again


Creating a new database
• Right mouse click on ”Databases” -> Create -> Databases
Creating a new database
• Write the database name (for example, University)
• Choose the owner (postgres)
Creating a new database
• The new database University is created.
Creating a new database
• Right mouse click on ”University” -> CREATE Script
CREATE DATABASE
• The script is opened.
• The CREATE DATABASE command is already
executed by default through the interface.
CREATE TABLE
• Now you need to create all tables one by one.
• Write the SQL code for the new table below, select it
with the mouse and press Execute.
CREATE TABLE
• If the table was created successfully, you will see the
following message.
• If not, you will see the error text in the same field.
Save as *.sql
• The script is not saved by default; therefore, it is necessary
to intentionally save the database code as *.sql

You might also like