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

Installing A Dbms (Postgresql) : João R. Campos

The document outlines the installation process for PostgreSQL, a free and open-source relational database management system. It covers the necessary steps to set up PostgreSQL, including the installation of psql and pgAdmin, as well as configuring the database for practical exercises. Additionally, it provides an overview of database management systems and mentions alternatives like Oracle Database.

Uploaded by

francisco.nsr
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)
11 views13 pages

Installing A Dbms (Postgresql) : João R. Campos

The document outlines the installation process for PostgreSQL, a free and open-source relational database management system. It covers the necessary steps to set up PostgreSQL, including the installation of psql and pgAdmin, as well as configuring the database for practical exercises. Additionally, it provides an overview of database management systems and mentions alternatives like Oracle Database.

Uploaded by

francisco.nsr
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

Installing a DBMS (PostgreSQL)


João R. Campos

Bachelor in Informatics Engineering


Department of Informatics Engineering
University of Coimbra
2024/2025
Outline
• Database Management Systems (DBMSs)
• Installation of PostgreSQL
– psql
– pgadmin
• Setup the database for the demos seen in the T and TP lessons

Register your presence at UCStudent!


J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 2
Database Management System (DBMS)
• A Database Management System (DBMS) is software package to
define, manipulate, retrieve and manage data in a database

Database Application
Database System
Interface
User interface
applications for the DBMS Database
users to access and
manipulate the data
Interface

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 3
Some Alternatives Available
• Commercial

• Open source

Lightweight NoSQL
(not a server) column-oriented

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 4
Oracle Database
• Commonly referred to as Oracle DBMS or simply as Oracle
– Oracle Corporation
– First version in 1979, Oracle v2
– Current version: Oracle Database 23ai

• Multi-model database management system


• Commonly used for running Online Transaction Processing (OLTP),
Data Warehousing (DW) and mixed (OLTP & DW) workloads
• Available by several service providers on-prem, on-cloud, or as
hybrid cloud installation
• One of the the most complete and most used commercial DBMSs
– It has been a market driver for many years!

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 5
PostgreSQL
• Free and open-source, commonly referred to as Postgres
– University of California, Berkeley
– First version in 1997, release 6.0 (successor to the Ingres database)
– Current version: 17

• Relational database management system (RDBMS), emphasizing


extensibility and SQL compliance
• Is available for Linux, FreeBSD, OpenBSD, and Windows
• Many organizations use PostgreSQL as the primary database, e.g.:
– Instagram, TripAdvisor, Amazon Redshift, WhitePages.com, MusicBrainz,
BASF, Sony Online

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 6
What are we going to do next?
• Install PostgreSQL
– psql
– pgadmin

• Setup the database for the exercises in the following lessons


– Create user, database and schema
– Create tables

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 7
The Outcome Will Be…

psql
PostgreSQL
Network

loopback
address

browser pgAdmin

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 8
Native Installation of PostgreSQL
• Download the certified installer for the latest version from:
– https://www.postgresql.org/download/

• Run the installer


– Select what you want to install
• pgadmin can be installed together with the DBMS
• psql can also be installed (select Command Line Tools)
– Set the directory where the database files will be stored
– Define the password (postgres) for the postgres user (default superuser)
– Select the port number to be used to connect to the server (default is 5432)
– Note: remove Stack Builder Check option after installation

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 9
Native Installation of PostgreSQL

• Access the database via psql (important!)


– Windows: add C:\Program Files\PostgreSQL\17\bin to PATH environment variable
– Linux/macOS:
• edit file ~/.bash_profile: nano ~/.bash_profile

• add line: export PATH=/Library/PostgreSQL/17/bin:$PATH


– exit nano (ctr+x)

• reload: source ~/.bash_profile

– Connect: psql -d postgres -U postgres

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 10
Practical Exercises

Solve the practical exercises made available


for this class

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 11
Q&A

J.R. Campos, Marco Vieira Databases (LEI) – Practical Labs - Lesson #1, 2024/2025 12
Databases

Installing a DBMS (PostgreSQL)


João R. Campos

Bachelor in Informatics Engineering


Department of Informatics Engineering
University of Coimbra
2024/2025

You might also like