Sei sulla pagina 1di 10

6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

SQL WORLD
GET YOUR SQL QUERY FAST AND FURIOUS..

HOME COMPLEX SQL QUERIES ORACLE ORACLE BI UNIX POSTGRESQL

ABOUT US CONTACT PRIVACY POLICY

Postgresql Interview
SEARCH YOUR TOPIC HERE

Questions | Postgresql SEARCH …

Intereview Questions with


Answers YOU MIGHT INTERESTED IN :

 February 21, 2018  admin  SQL Interview Questions 0


Business Analytics Software

Noritz Error Codes

Cheap Folding Tables

Employee Satisfaction

Free Data Visualization

Database Management

Related Topics
LIKE OUR WEBSITE AT
FACEBOOK
1. Constructi 3. Healthy 5. Free Flow

2. Type 2 4. Registratio 6. High Complexsql.com


202 likes

Postgresql Interview
Questions : Like Page

In my previous article i have given the idea about di erent interview Be the first of your friends to like this
questions in sql. In this article i will try to explain Postgresql Interview
Questions with its answers.Postgresql which is simply named as Postgres
is Widely used Object Relational Database Management System for Large SUBSCRIBE AND GET NEW
web applications.Here In this article we will discuss History Of Postgresql PDF BOOK
in detail.In MAC OS Postgresql is default database.Michel Stonebraker is
Father of Postgresql who has started Post Ingres project for supporting
Contemporary Database systems..Because of its security and open
http://www.complexsql.com/postgresql-interview-questions/ 1/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

source DBMS it is one of the widely used database management system Email address:
in world. SUBSCRIBE FOR FREE

Related Topics SIGN UP

1. Construction Project Management


CATEGORIES
2. Type 2 Diabetes Symptoms
BI Tutorials
3. Healthy Diabetes Diet
Oracle 18c

4. Registration Form Oracle Errors

PLSQL Tutorials
5. Free Flow Chart
Roles and Responsibilities

SQL Complex Queries


Following are some interview questions of postgresql :
SQL Di erence Between

1.What is postgresql? Explain history of postgresql. (80% asked SQL Interview Questions
Postgresql Interview Questions )
SQL Interview Questions For
Answer : Freshers

SQL Joins
Postgresql which is simply named as Postgres is Widely used Object
Relational Database Management System for Large web SQL Performance Tuning
applications.Here In this article we will discuss History Of Postgresql in
SQL Tutorials
detail.In MAC OS Postgresql is default database.Michel Stonebraker is
Father of Postgresql who has started Post Ingres project for supporting Unix Interview Questions
Contemporary Database systems.PostgreSQL’s developers pronounce
Unix Tutorials
PostgreSQL as It is abbreviated as Postgres because of ubiquitous support
for the SQL Standard among most relational databases.PostgreSQL,
originally called Postgres, was created at UCB by a computer science TRANSLATE IN YOUR
professor named Michael Stonebraker, who went on to become the CTO LANGUAGE
of Informix Corporation. Stonebraker started Postgres in 1986 as a
followup project to its predecessor, Ingres, now owned by Computer Select Language
Associates. The name Postgres thus plays o of its predecessor (as in Powered by Translate
“after Ingres”). Ingres, developed from 1977 to 1985, had been an
exercise in creating a database system according to classic RDBMS
theory. Postgres, developed between 1986-1994, was a project meant to
break new ground in database concepts such as exploration of “object
relational” technologies.An enterprise class database, PostgreSQL boasts
sophisticated features such as Multi-Version Concurrency Control (MVCC),
point in time recovery, tablespaces, asynchronous replication, nested
transactions (savepoints), online/hot backups, a sophisticated query
planner/optimizer, and write ahead logging for fault tolerance.

2.What are di erent advantages of Postgresql? (80% asked


Postgresql Interview Questions )

Answer :
TOP POSTS

http://www.complexsql.com/postgresql-interview-questions/ 2/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

20 SQL Queries for


interview | Complex SQL
Queries for Interview
Following are the advantages of postgresql :
Create le in unix using
multiple ways | Cat
Reliable
Command with examples
Stable
| Touch command with
Open source examples | Di erence
Extensible between Cat and Touch |

Easy to learn Unix Commands to create


le | Create le using Vi
Cross Platform
editor
Designed for High Volume Environments
SQL Interview Questions
Flexible
For Fresher
Better Support

3.What are di erent features of Postgresql? RECENTLY ADDED

Answer :
Important SQL Developer Interview
Questions with Answers
Following are some features of Postgresql :
Database interview Questions with
1) Object relational database answers for Fresher and
2) Extensibility and support for SQL Experienced Professionals
3) Database validation and exible API
4) Procedural languages and MVCC Data Mart vs Data warehouse |

5) Client server and WAL. Di erence between Data


warehouse and Data mart
4.What is maximum size of table in postgresql? Dimensional Data Modeling |
Dimensional modeling with Simple
Answer:
steps

The postgresql has maximum size of table is 32TB. Best SQL Books | SQL Books
Reviews with its Bullet-points
5.What is the option that can be used in PostgreSQL to make
transactions see rows a ected in previous parts of the transaction?
(80% asked Postgresql Interview Questions )

Answer:

The SQL standard de nes four levels of transaction isolation in terms of


three phenomena that must be prevented between concurrent
transactions. These undesirable phenomena are:

Dirty read
A transaction reads data written by a concurrent uncommitted
transaction.

Nonrepeatable read
A transaction re-reads data it has previously read and nds that data has
been modi ed by another transaction (that committed since the initial
read).
http://www.complexsql.com/postgresql-interview-questions/ 3/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Phantom read
A transaction re-executes a query returning a set of rows that satisfy a
search condition and nds that the set of rows satisfying the condition
has changed due to another recently-committed transaction.

6.Explain Multi Version concurrency control.

Answer :

Multi version concurrency control or MVCC is used to avoid unnecessary


locking of the database. This removes the time lag for the user to log into
his database. This feature or time lag occurs when some one else is on
the content. All the transactions are kept as a record.

7.How the stats updated in Postgresql?

Answer:

 To update statistics in PostgreSQL explicit ‘vacuum’ call is made. Hope


you know the method of doing this. If not let us know and we would help
you.Vacuum with the option Analyze is used to update statistics in
Postgresql VACUUM ANALYZE ; is the syntax.
8.What is write ahead logging in Postgresql?
Answer:
This feature increases the reliability of the database by logging changes
before any changes or updations to the data base. This provides log of
database incase of a database crash. This helps to start the work from the
point it was discontinued.

9.How to start database server in postgresql?

Answer:

1. /usr/local/etc/rc.d/010.pgsql.sh start
2. /usr/local/etc/rc.d/postgresql start

10.How to stop database server in postgresql?

Answer:

1. /usr/local/etc/rc.d/010.pgsql.sh stop
2. /usr/local/etc/rc.d/postgresql stop

11.Which di erent languages are supported by postgresql?

Answer:

Some of the languages which PostgreSQL supports are as follows:


It supports a language of its own known as PL/pgSQL and it supports
internal procedural languages. Pl/pgSQL can be compared to oracle,
PL/SQL, etc. Languages such as Perl, Python, TCL can be used as
embedded languages.

http://www.complexsql.com/postgresql-interview-questions/ 4/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

12.What is purpose of overlay function in Postgresql?

Answer:

Overlay functions purpose is to replace substring from a speci ed


position to a speci ed position.

Example:

Select Overlay(‘www.complexpql.com’ Placing ‘sql’ From 12 For 3) “Overlay


Example”

/* Result */

Overlay Example
—————
www.complexsql.com

12.What is String_to_array function in postgresql?

Answer:

This function used to convert the speci ed string in to array.This


functions splits a string to an array provided the delimeter is supplied. It
returns an array.

Syntax: String_To_Array(String,delimeter)

e.g.

Select String_To_Array(‘Postgresql is cool language’,’ ‘)

/* Result */
string_to_array
—————-
{Postgresql,is,cool,language}

13.Explain about command Enable debug.

http://www.complexsql.com/postgresql-interview-questions/ 5/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Answer:

This command is used for enabling compilation of all libraries and


applications. This process generally slows down the system and it also
increases the binary le size. Debugging symbols are present which can
assist developers in noticing bugs and problems associated with their
script.

14.Explain about functions in Postgresql.

Answer:

Functions are important because they help the code to be executed on


the server. Some of the languages which can program functions for
e cient use are PL/pgSQL which is the native language of PostgreSQL.
Scripting languages are supported by many languages such as PHP, Perl,
Python, etc. PL/R a statistical language can also be used.

15.How to nd version of postgresql?

Answer:

To nd out the version in postgresql use following command :

select version();

16.Which are di erent type of indexes in postgresql?

Answer:

There are built in functions such as B-tree, hash table, and GIST indices
can be used or users can de ne their own indices. PostgreSQL can scan
the index backwards. Expression index could be created with the result of
an expression. Partial index created with addition of WHERE clause.

17.How to select rst 10 records in postgresql?

Answer:

User needs to use the limit clause to select rst n records in postgresql.

Select * from tablename limit 10;

18.How to calculate cube root in postgresql?(60% asked Postgresql


Interview Questions )

Answer:

To calculate the Cuberoot use ||/ operator.

Example:

e.g. Select ||/ 16 “CubeRoot of 16”

http://www.complexsql.com/postgresql-interview-questions/ 6/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Result:

CubeRoot of 16
—————-
2.5

19.What are Triggers in postgresql?

Answer:

By SQL query you can trigger an event. Triggers can be activated with the
help of INSERT and UPDATE queries. These can be attached to tables.
Triggers more than one can be triggered alphabetically. These triggers
have the capability to invoke functions from other languages.

20.Which are di erent datatypes of Postgresql?

Answer:

There are di erent new datatypes supported by postgresql.Following are


those datatypes :

1) Arbitrary precision numeric’s


2) Geometric primitives
3) Arrays
4) XML etc
Users can create their own indexes and make them indexed.

21.Which are di erent database administration tools used in


Postgresql?

Answer :

There are various data administration tools they are

1) Psql
2) Pgadmin
3) Phppgadmin

Most of these tools are front end administration tools and web based
interfaces. Out of these phppgadmin is the most popular one.

22.What is pgadmin?Explain.(100% asked Postgresql Interview


Questions )

Answer :

Pgadmin forms a graphical front end administration tool. This feature is


available under free software released under Artistic License. Pgadmin iii
is the new database administration tool released under artistic license.

23.How to create database in postgresql?

http://www.complexsql.com/postgresql-interview-questions/ 7/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Answer:

Creating a database is the primary step in creating a database. A


command $createdb newdatabasedb.

CREATE DATABASE

This creates a new database and a message displays CREATE DATABASE


which indicates that the creation of the database was successful.

24.What is Write ahead log in postgresql?

Answer:

write-ahead log (WAL),  means it always writes the transactions to the log
following with writing the modi ed pages to the disk to maintain the
transaction ACID properties.

25.Explain about tokens in postgresql?

Answer :

Tokens are also known to contain several special character symbols. It


can be considered as keyword, constant, identi er and quoted identi er.
Keywords include pre de ned SQL meanings and SQL commands.
Variable names such as tables, columns, etc are represented by
identi ers.

These are some bery important postgresql interview questions.Hope you


like this article of Postgresql Interview Questions and dont forget to
comment in comment section.

http://www.complexsql.com/postgresql-interview-questions/ 8/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Like 10  

Share this:

   10

Related

Important SQL SQL Interview Interview SQL


Developer Interview Questions for Testers Questions | Interview
Questions with April 24, 2018 Questions for SQL
Answers In "SQL Interview April 12, 2018
May 22, 2018 Questions" In "SQL Interview
In "SQL Interview Questions"
Questions"

About admin  133 Articles


Oracle Consultant with Vast Experience in Oracle BI
and SQL PLSQL Development

 PREVIOUS NEXT 
Autosys Interview Data warehouse
Questions | Important Interview Questions |
Interview Questions of Data warehousing
Autosys Interview Questions

BE THE FIRST TO COMMENT

Leave a Reply
Your email address will not be published.

Comment

http://www.complexsql.com/postgresql-interview-questions/ 9/10
6/4/2018 Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Name *

Email *

Website

POST COMMENT

Notify me of follow-up comments by email.

Notify me of new posts by email.

Copyright © 2018 | www.complexsql.com | Amit S

http://www.complexsql.com/postgresql-interview-questions/ 10/10

Potrebbero piacerti anche