SlideShare a Scribd company logo
1 of 15
OBJECT RELATIONAL &
EXTENDED
RELATIONAL DATABASES
By Amar Myana
THINGS I’LL TALK ABOUT
• Relational & Object Oriented Database Management Systems.
AKA( RDBMS & OODBMS )
• PostgreSQL ( Object-Relational Database Management System )
• Architecture
• Client/Server Model
• Storage and Replication
• Getting Started
RDBMS & OODBMS
• Born in 1980s
• Current Market Share:
Rank
DBMS Database
Model
Score
Apr
2016
Mar
2016
Apr
2015
Apr
2016
Mar
2016
Apr
2015
1 1 1 Oracle Relational
DBMS
1467.53 -4.48 +21.40
2 2 2 MySQL Relational
DBMS
1370.11 +22.39 +85.53
3 3 3 Microsoft SQL
Server
Relational
DBMS
1135.05 -1.45 -14.07
4 4 4 MongoDB Document
Store
312.44 +7.11 +33.85
5 5 5 PostgreSQL Relational 303.73 +4.10 +35.41
PostgreSQL
• Is an Object-Relational Database Management System (ORDBMS)
with an emphasis on extensibility and standard-compliance.
• Cross-platform and runs on many operating systems ( *nix, OS X,
Windows )
• Features
• Implements the majority of the core SQL:2011 standard
• ACID Compliant
• Transactional avoiding locking issues using multiversion concurrency control
( MVCC )
• Immunity to dirty reads and full serializability
• Handles complex SQL queries
• Updateable views and Materialized Views, triggers, foreign keys; support
ARCHITECTURE
Client/Server Model
• Types of process:
• `postmaster`, supervisory daemon process
• Utility processes (bgwriter, walwriter, syslogger, archiver, statscollector and
autovacuum launcher) and
• User Backend process (postgres process itself, Server Process)
• Connection Initialization:
• Client request for connection to the database, firstly request hit to postmaster
daemon process after performing Authentication and authorization it spawns
one new backend server process.
• Libpq allows a single frontend to make multiple connections to backend
processes.
• Single-threaded process that can only execute one query at a time.
• Memory
• Shared Buffers
• WAL Buffers
• Clog Buffers
• Other Buffers
• PostreSQL shared memory is very big and all the buffers are not in sync,
mean all are independent.
• Utility Process:
• BG Writer
• WAL Writer
• Stats-collector
• Archiver
• Syslogger
• WAL Sender
• WAL Receiver
STORAGE AND REPLICATION
• Replication
• Built-in binary replication & synchronous replcication
• Indexes
• Built-in support for regular B-tree and hash indexes, and two types of inverted
indexes
• Generalized Search Trees( GiST ), Generalized Inverted Indexes ( GIN )
• Expression indexes, Partial indexes, k-nearest neighbors ( k-NN ) indexing and
Block Range Indexes ( BRIN )
• Schemas
• A schema holds all objects.
• Schemas effectively act like namespaces, allowing objects of the same name to
co-exist in the same database.
• User-defined Objects
• New types of almost all objets inside the database can be created, including:
• Casts
• Conversions
• Data types
• Domains
• Functions, including aggregate functions and window functions
• Indexes including custom indexes for custom types
• Operators ( existing ones can be overloaded )
• Procedural Languages
• Inheritance
• Inherit characteristics from a “parent” table.
• SELECT * FROM ONLY parent_table;
Getting Started
• To create a new database, in this example named mydb, you use the
following command:
• $ createdb mydb
• If you do not want to use your database anymore you can remove it:
• $ dropdb mydb
• Accessing a Database
• Running the PostgreSQL interactive terminal program, called “psql”, which allows
you to interactively enter, edit, and execute SQL commands.
• $psql mydb
• psql (version)
Type “help” for help.
mydb=>
• Creating a New Table
• CREATE TABLE weather(
city varchar(80),
temp_lo int, -- low temperature
temp_hi int, -- high temperature
prcp real, -- precipitaion
date date
);
• DROP TABLE tablename;
• Populating a Table With Rows
• INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
• COPY weather FROM '/home/user/weather.txt';
• Inheritance
• It opens up interesting new possibilities of database design.
• Let's create two tables: A table cities and a table capitals.
• CREATE TABLE cities (
name text,
population real,
altitude int -- (in ft)
);
• CREATE TABLE capitals (
state char(2)
) INHERITS (cities);
• In this case, a row of capitals inherits all columns (name, population, and
altitude) from its parent, cities.
• The following query finds all the cities that are not state capitals and are situated
at an altitude of 500 feet or higher:
•SELECT name, altitude
FROM ONLY cities WHERE altitude > 500;
Summary
• PostgreSQL has many features not touched upon in this introduction.
• PostgreSQL gives much more power for dba and developers to
design the database according to the specific application.
• It’s adopted by the major sites like yahoo, reddit etc.
• More introductory material, please visit the PostgreSQL website for
links.
Arigato 

More Related Content

What's hot

10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
koolkampus
 

What's hot (20)

Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbms
 
ORDBMS.pptx
ORDBMS.pptxORDBMS.pptx
ORDBMS.pptx
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
Data Warehouse Fundamentals
Data Warehouse FundamentalsData Warehouse Fundamentals
Data Warehouse Fundamentals
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
 
Object oriented dbms
Object oriented dbmsObject oriented dbms
Object oriented dbms
 
Kdd process
Kdd processKdd process
Kdd process
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
Uddi
UddiUddi
Uddi
 
Hadoop Ecosystem
Hadoop EcosystemHadoop Ecosystem
Hadoop Ecosystem
 
Implementation Issue with ORDBMS
Implementation Issue with ORDBMSImplementation Issue with ORDBMS
Implementation Issue with ORDBMS
 
Tutorial for RDF Graphs
Tutorial for RDF GraphsTutorial for RDF Graphs
Tutorial for RDF Graphs
 
Adbms 17 object query language
Adbms 17 object query languageAdbms 17 object query language
Adbms 17 object query language
 
Active database
Active databaseActive database
Active database
 
Odbms concepts
Odbms conceptsOdbms concepts
Odbms concepts
 
Presentation on tablespaceses segments extends and blocks
Presentation on tablespaceses segments extends and blocksPresentation on tablespaceses segments extends and blocks
Presentation on tablespaceses segments extends and blocks
 
Chapter 4 terminolgy of keyvalue databses from nosql for mere mortals
Chapter 4 terminolgy of keyvalue databses from nosql for mere mortalsChapter 4 terminolgy of keyvalue databses from nosql for mere mortals
Chapter 4 terminolgy of keyvalue databses from nosql for mere mortals
 
Store procedures
Store proceduresStore procedures
Store procedures
 
Sql ppt
Sql pptSql ppt
Sql ppt
 

Viewers also liked (6)

9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)
 
ORDBMS
ORDBMSORDBMS
ORDBMS
 
NoSQL Databases - Lecture 12 - Introduction to Databases (1007156ANR)
NoSQL Databases - Lecture 12 - Introduction to Databases (1007156ANR)NoSQL Databases - Lecture 12 - Introduction to Databases (1007156ANR)
NoSQL Databases - Lecture 12 - Introduction to Databases (1007156ANR)
 
Rdbms
RdbmsRdbms
Rdbms
 

Similar to Object Relational Database Management System

xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytxjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
WrushabhShirsat3
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
Rahul Borate
 

Similar to Object Relational Database Management System (20)

NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
Drop acid
Drop acidDrop acid
Drop acid
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
No sql Database
No sql DatabaseNo sql Database
No sql Database
 
Webinar 2017. Supercharge your analytics with ClickHouse. Alexander Zaitsev
Webinar 2017. Supercharge your analytics with ClickHouse. Alexander ZaitsevWebinar 2017. Supercharge your analytics with ClickHouse. Alexander Zaitsev
Webinar 2017. Supercharge your analytics with ClickHouse. Alexander Zaitsev
 
Solr cloud the 'search first' nosql database extended deep dive
Solr cloud the 'search first' nosql database   extended deep diveSolr cloud the 'search first' nosql database   extended deep dive
Solr cloud the 'search first' nosql database extended deep dive
 
The No SQL Principles and Basic Application Of Casandra Model
The No SQL Principles and Basic Application Of Casandra ModelThe No SQL Principles and Basic Application Of Casandra Model
The No SQL Principles and Basic Application Of Casandra Model
 
unit-ii.pptx
unit-ii.pptxunit-ii.pptx
unit-ii.pptx
 
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytxjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
Revision
RevisionRevision
Revision
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
NoSQL Intro with cassandra
NoSQL Intro with cassandraNoSQL Intro with cassandra
NoSQL Intro with cassandra
 
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
 
Database Technologies
Database TechnologiesDatabase Technologies
Database Technologies
 
NoSql - mayank singh
NoSql - mayank singhNoSql - mayank singh
NoSql - mayank singh
 
Intro to HBase - Lars George
Intro to HBase - Lars GeorgeIntro to HBase - Lars George
Intro to HBase - Lars George
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology Landscape
 
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 

Object Relational Database Management System

  • 1. OBJECT RELATIONAL & EXTENDED RELATIONAL DATABASES By Amar Myana
  • 2. THINGS I’LL TALK ABOUT • Relational & Object Oriented Database Management Systems. AKA( RDBMS & OODBMS ) • PostgreSQL ( Object-Relational Database Management System ) • Architecture • Client/Server Model • Storage and Replication • Getting Started
  • 3. RDBMS & OODBMS • Born in 1980s • Current Market Share: Rank DBMS Database Model Score Apr 2016 Mar 2016 Apr 2015 Apr 2016 Mar 2016 Apr 2015 1 1 1 Oracle Relational DBMS 1467.53 -4.48 +21.40 2 2 2 MySQL Relational DBMS 1370.11 +22.39 +85.53 3 3 3 Microsoft SQL Server Relational DBMS 1135.05 -1.45 -14.07 4 4 4 MongoDB Document Store 312.44 +7.11 +33.85 5 5 5 PostgreSQL Relational 303.73 +4.10 +35.41
  • 4. PostgreSQL • Is an Object-Relational Database Management System (ORDBMS) with an emphasis on extensibility and standard-compliance. • Cross-platform and runs on many operating systems ( *nix, OS X, Windows ) • Features • Implements the majority of the core SQL:2011 standard • ACID Compliant • Transactional avoiding locking issues using multiversion concurrency control ( MVCC ) • Immunity to dirty reads and full serializability • Handles complex SQL queries • Updateable views and Materialized Views, triggers, foreign keys; support
  • 6. Client/Server Model • Types of process: • `postmaster`, supervisory daemon process • Utility processes (bgwriter, walwriter, syslogger, archiver, statscollector and autovacuum launcher) and • User Backend process (postgres process itself, Server Process) • Connection Initialization: • Client request for connection to the database, firstly request hit to postmaster daemon process after performing Authentication and authorization it spawns one new backend server process. • Libpq allows a single frontend to make multiple connections to backend processes. • Single-threaded process that can only execute one query at a time.
  • 7. • Memory • Shared Buffers • WAL Buffers • Clog Buffers • Other Buffers • PostreSQL shared memory is very big and all the buffers are not in sync, mean all are independent. • Utility Process: • BG Writer • WAL Writer • Stats-collector • Archiver • Syslogger • WAL Sender • WAL Receiver
  • 8. STORAGE AND REPLICATION • Replication • Built-in binary replication & synchronous replcication • Indexes • Built-in support for regular B-tree and hash indexes, and two types of inverted indexes • Generalized Search Trees( GiST ), Generalized Inverted Indexes ( GIN ) • Expression indexes, Partial indexes, k-nearest neighbors ( k-NN ) indexing and Block Range Indexes ( BRIN ) • Schemas • A schema holds all objects. • Schemas effectively act like namespaces, allowing objects of the same name to co-exist in the same database.
  • 9.
  • 10. • User-defined Objects • New types of almost all objets inside the database can be created, including: • Casts • Conversions • Data types • Domains • Functions, including aggregate functions and window functions • Indexes including custom indexes for custom types • Operators ( existing ones can be overloaded ) • Procedural Languages • Inheritance • Inherit characteristics from a “parent” table. • SELECT * FROM ONLY parent_table;
  • 11. Getting Started • To create a new database, in this example named mydb, you use the following command: • $ createdb mydb • If you do not want to use your database anymore you can remove it: • $ dropdb mydb • Accessing a Database • Running the PostgreSQL interactive terminal program, called “psql”, which allows you to interactively enter, edit, and execute SQL commands. • $psql mydb • psql (version) Type “help” for help. mydb=>
  • 12. • Creating a New Table • CREATE TABLE weather( city varchar(80), temp_lo int, -- low temperature temp_hi int, -- high temperature prcp real, -- precipitaion date date ); • DROP TABLE tablename; • Populating a Table With Rows • INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27'); • COPY weather FROM '/home/user/weather.txt';
  • 13. • Inheritance • It opens up interesting new possibilities of database design. • Let's create two tables: A table cities and a table capitals. • CREATE TABLE cities ( name text, population real, altitude int -- (in ft) ); • CREATE TABLE capitals ( state char(2) ) INHERITS (cities); • In this case, a row of capitals inherits all columns (name, population, and altitude) from its parent, cities. • The following query finds all the cities that are not state capitals and are situated at an altitude of 500 feet or higher: •SELECT name, altitude FROM ONLY cities WHERE altitude > 500;
  • 14. Summary • PostgreSQL has many features not touched upon in this introduction. • PostgreSQL gives much more power for dba and developers to design the database according to the specific application. • It’s adopted by the major sites like yahoo, reddit etc. • More introductory material, please visit the PostgreSQL website for links.