Sei sulla pagina 1di 10

6/4/2018

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

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

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

SEARCH YOUR TOPIC HERE

SEARCH …

YOU MIGHT INTERESTED IN :

admin

0

21, 2018  admin  SQL Interview Questions  0 Related Topics 1. Constructi Healthy 3.

Related Topics

admin  SQL Interview Questions  0 Related Topics 1. Constructi Healthy 3. Free Flow 5.

Postgresql Interview Questions :

In my previous article i have given the idea about di erent interview 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 web applications.Here In this article we will discuss History Of Postgresql 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

Complexsql.com 202 likes Like Page
Complexsql.com
202 likes
Like Page

Be the first of your friends to like this

SUBSCRIBE AND GET NEW PDF BOOK

6/4/2018

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

source DBMS it is one of the widely used database management system in world.

Related Topics

used database management system in world. Related Topics Email address: SUBSCRIBE FOR FREE SIGN UP 1.

Email address:

SUBSCRIBE FOR FREE

SIGN UP

Following are some interview questions of postgresql :

1.What is postgresql? Explain history of postgresql. (80% asked Postgresql Interview Questions )

Answer :

Postgresql which is simply named as Postgres is Widely used Object Relational Database Management System for Large web applications.Here In this article we will discuss History Of Postgresql 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.PostgreSQL’s developers pronounce 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 professor named Michael Stonebraker, who went on to become the CTO of Informix Corporation. Stonebraker started Postgres in 1986 as a followup project to its predecessor, Ingres, now owned by Computer Associates. The name Postgres thus plays o of its predecessor (as in “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 :

TRANSLATE IN YOUR LANGUAGE

Select Language

Select Language

Powered by

TRANSLATE IN YOUR LANGUAGE Select Language Powered by Translate TOP POSTS
IN YOUR LANGUAGE Select Language Powered by Translate TOP POSTS

TOP POSTS

6/4/2018

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Questions | Postgresql Intereview Questions with Answers 20 SQL Queries for interview | Complex SQL Queries

Following are the advantages of postgresql :

Reliablefor Interview Following are the advantages of postgresql : Stable Open source Extensible Easy to learn

StableFollowing are the advantages of postgresql : Reliable Open source Extensible Easy to learn Cross Platform

Open sourceFollowing are the advantages of postgresql : Reliable Stable Extensible Easy to learn Cross Platform Designed

Extensiblethe advantages of postgresql : Reliable Stable Open source Easy to learn Cross Platform Designed for

Easy to learnof postgresql : Reliable Stable Open source Extensible Cross Platform Designed for High Volume Environments

Cross Platform: Reliable Stable Open source Extensible Easy to learn Designed for High Volume Environments Flexible Better

Designed for High Volume EnvironmentsStable Open source Extensible Easy to learn Cross Platform Flexible Better Support Create le in unix

Flexiblelearn Cross Platform Designed for High Volume Environments Better Support Create le in unix using multiple

Better SupportPlatform Designed for High Volume Environments Flexible Create le in unix using multiple ways | Cat

3.What are di erent features of Postgresql?

Answer :

Following are some features of Postgresql :

1) Object relational database 2) Extensibility and support for SQL 3) Database validation and exible API 4) Procedural languages and MVCC 5) Client server and WAL.

4.What is maximum size of table in postgresql?

Answer:

The postgresql has maximum size of table is 32TB.

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).

RECENTLY ADDED

Best SQL Books | SQL Books Reviews with its Bullet-points http://www.complexsql.com/postgresql-interview-questions/

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:

as a record. 7.How the stats updated in Postgresql? Answer: To update statistics in PostgreSQL explicit

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.

6/4/2018

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Questions | Postgresql Intereview Questions with Answers 12.What is purpose of overlay function in Postgresql?

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.

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”

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?

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.

6/4/2018

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Questions | Postgresql Intereview Questions with Answers Share this:   10 Related Like 10 
Share this:   10 Related
Share this:
10
Related
Like 10 
Like 10

Important SQL Developer Interview Questions with Answers May 22, 2018 In "SQL Interview Questions"

SQL Interview Questions for Testers April 24, 2018 In "SQL Interview Questions"

Interview SQL Questions | Interview Questions for SQL April 12, 2018 In "SQL Interview Questions"

SQL April 12, 2018 In "SQL Interview Questions" About admin  133 Articles Oracle Consultant with

About admin 133 Articles

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

with Vast Experience in Oracle BI and SQL PLSQL Development  PREVIOUS Autosys Interview Questions |
Interview Questions | Data warehousing Interview Questions BE THE FIRST TO COMMENT Leave a Reply Your

BE THE FIRST TO COMMENT

Leave a Reply

Your email address will not be published.

Comment

a Reply Your email address will not be published. Comment http://www.complexsql.com/postgresql-interview-questions/

6/4/2018

Postgresql Interview Questions | Postgresql Intereview Questions with Answers

Name *

Name * Email * Website

Email *

Name * Email * Website

Website

Questions with Answers Name * Email * Website POST COMMENT Notify me of follow-up comments by

POST COMMENT

Notify me of follow-up comments by email.with Answers Name * Email * Website POST COMMENT Notify me of new posts by email.

Notify me of new posts by email.POST COMMENT Notify me of follow-up comments by email. Copyright © 2018 | www.complexsql.com | Amit

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

by email. Copyright © 2018 | www.complexsql.com | Amit S http://www.complexsql.com/postgresql-interview-questions/