SlideShare a Scribd company logo
PostgreSQL Tutorial For Beginners | Edureka
TYPES OF DBMS
WHAT IS SQL?
WHAT IS POSTGRESQL?
FEATURES OF POSTGRESQL
SQL COMMAND CATEGORIES
INSTALL POSTGRESQL
www.edureka.co
www.edureka.co
Hierarchical
DBMS
Network
DBMS
Relational
DBMS
Object-
Oriented
DBMS
www.edureka.co
www.edureka.co
A standardized
programming language
which is used for
managing relational
databases.
With SQL, you can
modify databases, add,
update or delete rows
of data, retrieve
subsets of information
from a database and
,any more
Relational databases
like MySQL Databases,
oracle, Ms SQL Server,
Sybase etc use SQL.
Queries and other SQL
operations are written
as statements.
Example: select, insert,
add, update, delete,
create, alter, truncate.
www.edureka.co
www.edureka.co
PostgreSQLis an open-source object relational database
system with a 30+ years of active development in the industry.
World’s Most Advanced Open Source Relational Database
www.edureka.co
www.edureka.co
Data Types Data Integrity Performance
Reliability Security Extensibility
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
.
Transaction Control
Language(TCL)
COMMIT, ROLLBACK,
SAVEPOINT
Data Control
Language(DCL)
GRANT, INVOKE
Data Manipulation
Language(DML)
SELECT, INSERT,
UPDATE, DELETE
CREATE, DROP, ALTER
Data Definition Language
(DDL)
Includes the commands which
mainly deal with the
transaction of database.
Includes commands which
mainly deals with the rights,
permissions and other controls
of the database system.
The SQL commands that deals
with the manipulation of data
present in database.
Consists of the commands that
can be used to define the
database schema.
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
Composite vs Simple
Single vs Multivalued
Stored vs Derived
Complex Attributes
ENTITY &
ATTRIBUTES
www.edureka.co
ENTITY &
ATTRIBUTES
Composite vs Simple
A composite attribute can be divided into smaller subparts. These subparts
represent individual basic attributes with their own meanings.
Attributes which are not divisible are simply known as simple or atomic
attributes.
Address
Street _address City State Zip
Number Street House_number
www.edureka.co
ENTITY &
ATTRIBUTES
Composite vs SimpleSingle vs Multivalued
Attributes having single value for a particular entity are known as single-
valued attributes.
A multivalued attribute may have lower and upper bounds to constrain the
number of values allowed for each individual entity.
www.edureka.co
ENTITY &
ATTRIBUTES
Composite vs SimpleSingle vs MultivaluedStored vs Derived
Attributes which are derived from the real entities are known as derived
attributes.
The stored attribute are such attributes which are already stored in the
database and from which the value of another attribute is derived is
called stored attribute.
Age Birth_date
www.edureka.co
ENTITY &
ATTRIBUTES
Composite vs SimpleSingle vs MultivaluedStored vs DerivedComplex Attributes
Attributes that can be represented by grouping composite attributes
between (), separating the components with commas, and by displaying the
multivalued attributes between [] are known as complex attributes.
{Address_phone({Phone(Area_code,Phone_number)},Address(Street_addre
ss{Number,Street, flat_number),City,State,Zip))}
www.edureka.co
www.edureka.co
Candidate
Key
Super
Key
Primary
Key
Alternate
Key
Foreign
Key
www.edureka.co
www.edureka.co
NOT NULL UNIQUE CHECK DEFAULT INDEX
www.edureka.co
Ensures that a NULL
value cannot be
stored in a column
This constraint
makes sure that all
the values in a
column are
different
This constraint
ensures that all the
values in a column
satisfy a specific
condition.
This constraint
consists of a set of
default values for a
column when no
value is specified.
This constraint is
used to create and
retrieve data from
the database very
quickly.
www.edureka.co
CONSTRAINTS IN DATABASE
www.edureka.co
A technique that organizes tables in such a way that redundancy and dependency of data is reduced.
BCNF
3 NF
2 NF
1 NF
www.edureka.co
Salutation Full Name Address Movies Rented Category
Ms. Alice Johnson 1st Street House No 3 Mission Impossible:
Fallout, Clash of Titans
Action, Action
Mr. David Allen 3rd Street 45 Interstellar, Edge Of
Tomorrow
Sci-Fi, Sci-Fi
Mr. David Allen 7th Avenue Mission Impossible:
Fallout
Action
www.edureka.co
NORMALIZATION
First Normal Form
2 NF
3 NF
BCNF
Each table cell should have a single value. So, basically all the records must be unique.
Salutation Full Name Address Movies Rented
Ms. Alice Johnson
1st Street House
No 3
Mission
Impossible: Fallout
Ms. Alice Johnson
1st Street House
No 3
Clash of Titans
Mr. David Allen 3rd Street 45 Interstellar
Mr. David Allen 3rd Street 45 Edge Of Tomorrow
Mr. David Allen 7th Avenue
Mission
Impossible: Fallout
www.edureka.co
NORMALIZATION
3 NF
BCNF
Database should be 1NF and should also have single column primary key.
1 NF
Second Normal Form
Salutation Full Name Address Movies_Rented
ID Salutation Full Name Address
1 Ms Alice
Johnson
1st Street
House No
3
2 Mr David Allen 3rd Street
45
3 Mr David Allen 7th Avenue
ID Movies_Rented
1 Mission Impossible:
Fallout
1 Clash of Titans
2 Interstellar
2 Edge Of Tomorrow
3 Mission Impossible:
Fallout
Table 1
Table 2
www.edureka.co
NORMALIZATION
BCNF
The database should be in 2NF and must not have any transitive functional dependencies.
1 NF
2 NF
Third Normal Form
ID Full Name Address Salutation_ID ID Movies_Rented
Salutation_ID Salutation
1 Mr.
2 Ms.
3 Mrs.
4 Dr.
Table 1 Table 2
Table 3
www.edureka.co
NORMALIZATION
1 NF
2 NF
3 NF
Boyce-Codd Normal
Form
If your database is in 3rd Normal Form, there would be some scenarios where anomalies
would be present, if you have more than candidate key. Then BCNF comes into role, where
you divide your tables further so that there would be only one candidate key present.
www.edureka.co
www.edureka.co
www.edureka.co
ARITHMETIC
OPERATORS
+, -, *, /, %
BITWISE
OPERATORS
&, |, ^
COMPARISON
OPERATORS
==, <, >, <=, >= <>
COMPOUND
OPERATORS
+=, *=, -=, /=,%=,
&=, ^-=, |*=
www.edureka.co
www.edureka.co
Nested queries are SQL queries which have an outer query and inner subquery. The subquery is a query nested within another
query such as SELECT, INSERT, UPDATE or DELETE.
SELECT lastname, firstname
FROM employees
WHERE addressCode IN (SELECT addressCode
FROM office
WHERE country = “INDIA”)
OUTER QUERY SUBQUERY OR INNER QUERY
www.edureka.co
www.edureka.co
UNION
Combines rows from both
the queries
INTERSECT
Keeps only those rows which
are common in both the
queries.
MINUS
Keeps rows from the left query
which are not included in the
right query
LEFT QUERY RIGHT QUERY FINAL RESULT
www.edureka.co
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
JOINS in SQL are commands which are used to combine rows from two or more tables, based on a related column
between those tables. They are predominantly used when a user is trying to extract data from tables which have
one-to-many or many-to-many relationships between them.
What are Joins?
www.edureka.co
TYPES OF
JOINS
INNER JOIN
FULL JOIN
LEFT JOIN
RIGHT JOIN
www.edureka.co
www.edureka.co
A view in SQL is a single table, which is derived from other tables
Query
ROWS
VIEWS
COLUMNS
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
www.edureka.co
Ad

More Related Content

What's hot (20)

Postgresql
PostgresqlPostgresql
Postgresql
NexThoughts Technologies
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
valuebound
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
Edureka!
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
Surya937648
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
Smita Prasad
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Joel Brewer
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
Md.Mojibul Hoque
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
Edureka!
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Top 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | EdurekaTop 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | Edureka
Edureka!
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Jim Mlodgenski
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
CPD INDIA
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
Knowledge Center Computer
 
MySql:Introduction
MySql:IntroductionMySql:Introduction
MySql:Introduction
DataminingTools Inc
 
NOSQL Databases types and Uses
NOSQL Databases types and UsesNOSQL Databases types and Uses
NOSQL Databases types and Uses
Suvradeep Rudra
 
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
MongoDB
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
valuebound
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
Edureka!
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
Surya937648
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
Smita Prasad
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Joel Brewer
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
Edureka!
 
Top 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | EdurekaTop 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | Edureka
Edureka!
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Jim Mlodgenski
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
CPD INDIA
 
NOSQL Databases types and Uses
NOSQL Databases types and UsesNOSQL Databases types and Uses
NOSQL Databases types and Uses
Suvradeep Rudra
 
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
MongoDB
 

Similar to PostgreSQL Tutorial For Beginners | Edureka (20)

Ef code first
Ef code firstEf code first
Ef code first
ZealousysDev
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
Aditya Kumar Tripathy
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
 
Ebook12
Ebook12Ebook12
Ebook12
kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
 
SQL things ace series of the thing useful
SQL things ace series of the thing usefulSQL things ace series of the thing useful
SQL things ace series of the thing useful
avinash4210singh
 
Lecture on DBMS & MySQL.pdf v. C. .
Lecture on DBMS & MySQL.pdf v.  C.     .Lecture on DBMS & MySQL.pdf v.  C.     .
Lecture on DBMS & MySQL.pdf v. C. .
MayankSinghRawat6
 
Sql server
Sql serverSql server
Sql server
Puja Gupta
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full Course
Piyush sachdeva
 
Rdbms
RdbmsRdbms
Rdbms
argusacademy
 
D B M S Animate
D B M S AnimateD B M S Animate
D B M S Animate
Indu George
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
LakshmiSarvani6
 
SQL OVERVIEW for a new introduced student.pptx
SQL OVERVIEW for a new introduced student.pptxSQL OVERVIEW for a new introduced student.pptx
SQL OVERVIEW for a new introduced student.pptx
JosephNhlane
 
7. SQL.pptx
7. SQL.pptx7. SQL.pptx
7. SQL.pptx
chaitanya149090
 
Unit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptxUnit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptx
svasuki0708
 
[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL
Cherrie Ann Domingo
 
Database Basics and MySQL
Database Basics and MySQLDatabase Basics and MySQL
Database Basics and MySQL
Jerome Locson
 
JDBC in Servlets
JDBC in ServletsJDBC in Servlets
JDBC in Servlets
Eleonora Ciceri
 
Sql
SqlSql
Sql
shenazk
 
153680 sqlinterview
153680  sqlinterview153680  sqlinterview
153680 sqlinterview
zdsgsgdf
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
 
SQL things ace series of the thing useful
SQL things ace series of the thing usefulSQL things ace series of the thing useful
SQL things ace series of the thing useful
avinash4210singh
 
Lecture on DBMS & MySQL.pdf v. C. .
Lecture on DBMS & MySQL.pdf v.  C.     .Lecture on DBMS & MySQL.pdf v.  C.     .
Lecture on DBMS & MySQL.pdf v. C. .
MayankSinghRawat6
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full Course
Piyush sachdeva
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
LakshmiSarvani6
 
SQL OVERVIEW for a new introduced student.pptx
SQL OVERVIEW for a new introduced student.pptxSQL OVERVIEW for a new introduced student.pptx
SQL OVERVIEW for a new introduced student.pptx
JosephNhlane
 
Unit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptxUnit 5 Introduction to Oracle and Sql.pptx
Unit 5 Introduction to Oracle and Sql.pptx
svasuki0708
 
Database Basics and MySQL
Database Basics and MySQLDatabase Basics and MySQL
Database Basics and MySQL
Jerome Locson
 
153680 sqlinterview
153680  sqlinterview153680  sqlinterview
153680 sqlinterview
zdsgsgdf
 
Ad

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 

PostgreSQL Tutorial For Beginners | Edureka

  • 2. TYPES OF DBMS WHAT IS SQL? WHAT IS POSTGRESQL? FEATURES OF POSTGRESQL SQL COMMAND CATEGORIES INSTALL POSTGRESQL www.edureka.co
  • 6. A standardized programming language which is used for managing relational databases. With SQL, you can modify databases, add, update or delete rows of data, retrieve subsets of information from a database and ,any more Relational databases like MySQL Databases, oracle, Ms SQL Server, Sybase etc use SQL. Queries and other SQL operations are written as statements. Example: select, insert, add, update, delete, create, alter, truncate. www.edureka.co
  • 8. PostgreSQLis an open-source object relational database system with a 30+ years of active development in the industry. World’s Most Advanced Open Source Relational Database www.edureka.co
  • 10. Data Types Data Integrity Performance Reliability Security Extensibility www.edureka.co
  • 13. . Transaction Control Language(TCL) COMMIT, ROLLBACK, SAVEPOINT Data Control Language(DCL) GRANT, INVOKE Data Manipulation Language(DML) SELECT, INSERT, UPDATE, DELETE CREATE, DROP, ALTER Data Definition Language (DDL) Includes the commands which mainly deal with the transaction of database. Includes commands which mainly deals with the rights, permissions and other controls of the database system. The SQL commands that deals with the manipulation of data present in database. Consists of the commands that can be used to define the database schema. www.edureka.co
  • 18. Composite vs Simple Single vs Multivalued Stored vs Derived Complex Attributes ENTITY & ATTRIBUTES www.edureka.co
  • 19. ENTITY & ATTRIBUTES Composite vs Simple A composite attribute can be divided into smaller subparts. These subparts represent individual basic attributes with their own meanings. Attributes which are not divisible are simply known as simple or atomic attributes. Address Street _address City State Zip Number Street House_number www.edureka.co
  • 20. ENTITY & ATTRIBUTES Composite vs SimpleSingle vs Multivalued Attributes having single value for a particular entity are known as single- valued attributes. A multivalued attribute may have lower and upper bounds to constrain the number of values allowed for each individual entity. www.edureka.co
  • 21. ENTITY & ATTRIBUTES Composite vs SimpleSingle vs MultivaluedStored vs Derived Attributes which are derived from the real entities are known as derived attributes. The stored attribute are such attributes which are already stored in the database and from which the value of another attribute is derived is called stored attribute. Age Birth_date www.edureka.co
  • 22. ENTITY & ATTRIBUTES Composite vs SimpleSingle vs MultivaluedStored vs DerivedComplex Attributes Attributes that can be represented by grouping composite attributes between (), separating the components with commas, and by displaying the multivalued attributes between [] are known as complex attributes. {Address_phone({Phone(Area_code,Phone_number)},Address(Street_addre ss{Number,Street, flat_number),City,State,Zip))} www.edureka.co
  • 26. NOT NULL UNIQUE CHECK DEFAULT INDEX www.edureka.co Ensures that a NULL value cannot be stored in a column This constraint makes sure that all the values in a column are different This constraint ensures that all the values in a column satisfy a specific condition. This constraint consists of a set of default values for a column when no value is specified. This constraint is used to create and retrieve data from the database very quickly. www.edureka.co CONSTRAINTS IN DATABASE
  • 28. A technique that organizes tables in such a way that redundancy and dependency of data is reduced. BCNF 3 NF 2 NF 1 NF www.edureka.co
  • 29. Salutation Full Name Address Movies Rented Category Ms. Alice Johnson 1st Street House No 3 Mission Impossible: Fallout, Clash of Titans Action, Action Mr. David Allen 3rd Street 45 Interstellar, Edge Of Tomorrow Sci-Fi, Sci-Fi Mr. David Allen 7th Avenue Mission Impossible: Fallout Action www.edureka.co
  • 30. NORMALIZATION First Normal Form 2 NF 3 NF BCNF Each table cell should have a single value. So, basically all the records must be unique. Salutation Full Name Address Movies Rented Ms. Alice Johnson 1st Street House No 3 Mission Impossible: Fallout Ms. Alice Johnson 1st Street House No 3 Clash of Titans Mr. David Allen 3rd Street 45 Interstellar Mr. David Allen 3rd Street 45 Edge Of Tomorrow Mr. David Allen 7th Avenue Mission Impossible: Fallout www.edureka.co
  • 31. NORMALIZATION 3 NF BCNF Database should be 1NF and should also have single column primary key. 1 NF Second Normal Form Salutation Full Name Address Movies_Rented ID Salutation Full Name Address 1 Ms Alice Johnson 1st Street House No 3 2 Mr David Allen 3rd Street 45 3 Mr David Allen 7th Avenue ID Movies_Rented 1 Mission Impossible: Fallout 1 Clash of Titans 2 Interstellar 2 Edge Of Tomorrow 3 Mission Impossible: Fallout Table 1 Table 2 www.edureka.co
  • 32. NORMALIZATION BCNF The database should be in 2NF and must not have any transitive functional dependencies. 1 NF 2 NF Third Normal Form ID Full Name Address Salutation_ID ID Movies_Rented Salutation_ID Salutation 1 Mr. 2 Ms. 3 Mrs. 4 Dr. Table 1 Table 2 Table 3 www.edureka.co
  • 33. NORMALIZATION 1 NF 2 NF 3 NF Boyce-Codd Normal Form If your database is in 3rd Normal Form, there would be some scenarios where anomalies would be present, if you have more than candidate key. Then BCNF comes into role, where you divide your tables further so that there would be only one candidate key present. www.edureka.co
  • 36. ARITHMETIC OPERATORS +, -, *, /, % BITWISE OPERATORS &, |, ^ COMPARISON OPERATORS ==, <, >, <=, >= <> COMPOUND OPERATORS +=, *=, -=, /=,%=, &=, ^-=, |*= www.edureka.co
  • 38. Nested queries are SQL queries which have an outer query and inner subquery. The subquery is a query nested within another query such as SELECT, INSERT, UPDATE or DELETE. SELECT lastname, firstname FROM employees WHERE addressCode IN (SELECT addressCode FROM office WHERE country = “INDIA”) OUTER QUERY SUBQUERY OR INNER QUERY www.edureka.co
  • 40. UNION Combines rows from both the queries INTERSECT Keeps only those rows which are common in both the queries. MINUS Keeps rows from the left query which are not included in the right query LEFT QUERY RIGHT QUERY FINAL RESULT www.edureka.co
  • 41. Copyright © 2017, edureka and/or its affiliates. All rights reserved. www.edureka.co
  • 46. JOINS in SQL are commands which are used to combine rows from two or more tables, based on a related column between those tables. They are predominantly used when a user is trying to extract data from tables which have one-to-many or many-to-many relationships between them. What are Joins? www.edureka.co
  • 47. TYPES OF JOINS INNER JOIN FULL JOIN LEFT JOIN RIGHT JOIN www.edureka.co
  • 49. A view in SQL is a single table, which is derived from other tables Query ROWS VIEWS COLUMNS www.edureka.co