SlideShare ist ein Scribd-Unternehmen logo
1 von 56
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

Weitere ähnliche Inhalte

Was ist angesagt?

The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDBvaluebound
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
Ten Reasons Why You Should Prefer PostgreSQL to MySQL
Ten Reasons Why You Should Prefer PostgreSQL to MySQLTen Reasons Why You Should Prefer PostgreSQL to MySQL
Ten Reasons Why You Should Prefer PostgreSQL to MySQLanandology
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQLJoel Brewer
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functionsfarwa waqar
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB Habilelabs
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBLee Theobald
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
 
PostgreSql query planning and tuning
PostgreSql query planning and tuningPostgreSql query planning and tuning
PostgreSql query planning and tuningFederico Campoli
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredDanish Mehraj
 
Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략Jin wook
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptxSurya937648
 

Was ist angesagt? (20)

The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
Get to know PostgreSQL!
Get to know PostgreSQL!Get to know PostgreSQL!
Get to know PostgreSQL!
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Ten Reasons Why You Should Prefer PostgreSQL to MySQL
Ten Reasons Why You Should Prefer PostgreSQL to MySQLTen Reasons Why You Should Prefer PostgreSQL to MySQL
Ten Reasons Why You Should Prefer PostgreSQL to MySQL
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
SQL - RDBMS Concepts
SQL - RDBMS ConceptsSQL - RDBMS Concepts
SQL - RDBMS Concepts
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
MySQL Basics
MySQL BasicsMySQL Basics
MySQL Basics
 
Postgresql tutorial
Postgresql tutorialPostgresql tutorial
Postgresql tutorial
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
PostgreSql query planning and tuning
PostgreSql query planning and tuningPostgreSql query planning and tuning
PostgreSql query planning and tuning
 
Sql commands
Sql commandsSql commands
Sql commands
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 

Ähnlich wie PostgreSQL Tutorial For Beginners | Edureka

PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaEdureka!
 
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!
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12kaashiv1
 
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 CoursePiyush sachdeva
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answersLakshmiSarvani6
 
Database Basics and MySQL
Database Basics and MySQLDatabase Basics and MySQL
Database Basics and MySQLJerome Locson
 
Sql Interview Questions
Sql Interview QuestionsSql Interview Questions
Sql Interview Questionsarjundwh
 

Ähnlich wie PostgreSQL Tutorial For Beginners | Edureka (20)

PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
 
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 ...
 
Ef code first
Ef code firstEf code first
Ef code first
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Ebook12
Ebook12Ebook12
Ebook12
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
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. .
 
Sql server
Sql serverSql server
Sql server
 
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
 
Rdbms
RdbmsRdbms
Rdbms
 
D B M S Animate
D B M S AnimateD B M S Animate
D B M S Animate
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
 
7. SQL.pptx
7. SQL.pptx7. SQL.pptx
7. SQL.pptx
 
[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL
 
Database Basics and MySQL
Database Basics and MySQLDatabase Basics and MySQL
Database Basics and MySQL
 
JDBC in Servlets
JDBC in ServletsJDBC in Servlets
JDBC in Servlets
 
Sql
SqlSql
Sql
 
Sql Interview Questions
Sql Interview QuestionsSql Interview Questions
Sql Interview Questions
 
Sql
SqlSql
Sql
 

Mehr von 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 | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaEdureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaEdureka!
 
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| EdurekaEdureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaEdureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | EdurekaEdureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEdureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEdureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaEdureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaEdureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaEdureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
 

Mehr von 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
 
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
 
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
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | 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
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | 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
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | 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
 
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
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Kürzlich hochgeladen

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

PostgreSQL Tutorial For Beginners | Edureka

  • 1.
  • 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