Вы находитесь на странице: 1из 18

PostgreSQL

Copyright MahaOnline Limited


Technical Session - Agenda

What is PostgreSQL?
PostgreSQL is a advance, open source object-relational
database system (ORDBMS)

PostgreSQL runs on all major operating systems, including Linux, UNIX


Mac OS X, Solaris and Windows

PostgreSQL is not controlled by any corporation or other private entity


and the source code is available free of charge

Copyright MahaOnline Limited


Technical Session - Agenda

Who Uses PostgreSQL


Skype
Heroku
Instagram
Disqus
Yahoo!
NASA
Copyright MahaOnline Limited
Technical Session - Agenda
Key Features of PostgreSQL

PostgreSQL offers many modern features including the following

Complex SQL queries


SQL Sub-selects
Foreign keys
Trigger
Views
Transactions

Copyright MahaOnline Limited


Technical Session - Agenda

PostgreSQL can be extended by the user in many ways

Data types
Functions
Operators
Aggregate functions
Index methods

If you dont like any part of the system, you can always develop a custom
plugin to enhance it to meet your requirements e.g., adding a new optimizer

Copyright MahaOnline Limited


Technical Session - Agenda

PostgreSQL limits
Limit Value
Maximum Database Size Unlimited
Maximum Table Size 32 TB
Maximum Row Size 1.6 TB
Maximum Field Size 1 GB
Maximum Rows per Table Unlimited
Maximum Columns per Table 250 - 1600 depending on column types
Maximum Indexes per Table Unlimited

Copyright MahaOnline Limited


Technical Session - Agenda

Advantages of PostgreSQL :
An open-source SQL standard compliant RDBMS:

PostgreSQL is open-source and free, yet a very powerful relational


database management system.

Strong community:

PostgreSQL is supported by a devoted and experienced community which


can be accessed through knowledge-bases and Q&A sites 24/7 for free.

Copyright MahaOnline Limited


Technical Session - Agenda

Advantages of PostgreSQL :
Strong third-party support:

Regardless of the extremely advanced features, PostgreSQL is adorned


with many great and open-source third-party tools for designing, managing
and using the management system.

Extensible:

It is possible to extend PostgreSQL programmatically with stored


procedures, like an advanced RDBMS should be.

Copyright MahaOnline Limited


Technical Session - Agenda

Disadvantages of PostgreSQL :
Performance:

For simple read-heavy operations, PostgreSQL can be an over-kill and


might appear less performant than the counterparts, such as MySQL.

Popularity:

Given the nature of this tool, it lacks behind in terms of popularity, despite
the very large amount of deployments - which might affect how easy it
might be possible to get support.

Copyright MahaOnline Limited


Technical Session - Agenda

When To Use PostgreSQL :


Data integrity:

When reliability and data integrity are an absolute necessity without


excuses, PostgreSQL is the better choice.

Complex, custom procedures:

If you require your database to perform custom procedures, PostgreSQL,


being extensible, is the better choice.

Copyright MahaOnline Limited


Technical Session - Agenda

When To Use PostgreSQL :


Complex designs:

Compared to other open-source and free RDBMS implementations, for


complex database designs, PostgreSQL offers the most in terms of
functionality and possibilities without giving up on other valuable assets.

Copyright MahaOnline Limited


Technical Session - Agenda

When Not To Use PostgreSQL


Speed:

If all you require is fast read operations, PostgreSQL is not the tool to go
for.

Replication:

Unless you are willing to spend the time, energy and resources, achieving
replication with MySQL might be simpler for those who lack the database
and system administration experience.

Copyright MahaOnline Limited


Technical Session - Agenda

PostgreSQL vs MySQL
mysql> CREATE TABLE cake (name VARCHAR(3));
Query OK, 0 rows affected (0.02 sec)

mysql> INSERT INTO cake (name) VALUES ('pancake');


Query OK, 1 row affected, 1 warning (0.03 sec)

Copyright MahaOnline Limited


Technical Session - Agenda

PostgreSQL vs MySQL
mysql> SELECT * FROM cake;
+------+
| name |
+------+
| pan |
+------+
1 row in set (0.03 sec)

Copyright MahaOnline Limited


Technical Session - Agenda

PostgreSQL vs MySQL
testdb=# CREATE TABLE cake (name
VARCHAR(3));
CREATE TABLE

testdb=# INSERT INTO cake (name) VALUES


('pancake');
ERROR: value too long for type character
varying(3)
Copyright MahaOnline Limited
Technical Session - Agenda
Postgresql Challenges

PgAdmin 4
Different data types
Syntax
Create functions instead of Procedures

Copyright MahaOnline Limited


Technical Session - Agenda
Postgresql important sites

https://www.postgresql.org/
www.postgresqltutorial.com/
https://www.tutorialspoint.com/postgresql/
https://pgexercises.com/
http://postgresguide.com/

Copyright MahaOnline Limited


Thank You
Copyright MahaOnline Limited

Вам также может понравиться