PostgreSQL application database in the era of big data

    PostgreSQL is a powerful open source object-relational database system. With over 15 years of active development and a proven architecture, it has built a solid reputation for reliability, data integrity and correctness. It runs on all major operating systems including Linux, UNIX (AIX, BSD, HP-UX, macOS, Solaris) and Windows. It is fully ACID compliant and fully supports foreign keys, joins, views, triggers and stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storing blobs, including pictures, sounds or videos. It has native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, etc., as well as special documentation .

An enterprise-grade database, PostgreSQL has features such as multi-version concurrency control (MVCC), point-in-time recovery, tablespaces, asynchronous replication, nested transactions (savepoints), online/hot backup, sophisticated query planner/optimizer and write-ahead Record fault tolerance. It supports international character sets, multibyte character encodings, Unicode, it is sorting-sensitive, case-sensitive and formatting. Both the amount of data that can be managed and the number of concurrent users that can be accommodated are highly scalable. There are active PostgreSQL instances in production that manage many terabytes of data, as well as manage petabyte-scale clusters. The following table lists some common PostgreSQL limitations.

limit value
Maximum database size unlimited
maximum table size 32 TB
maximum row size 1.6 TB
Maximum field size 1 GB
Maximum number of rows per table unlimited
Maximum number of columns per table 250 - 1600 depending on column type
Maximum index per table unlimited

PostgreSQL has won user and industry recognition , including five-time winners of the Linux New Media Award for Best Database System and the Linux Magazine Editors' Choice Award for Best Database Management System.

Powerful and standards-compliant

PostgreSQL prides itself on standards compliance. Its SQL implementation is strongly compliant with the ANSI-SQL:2008 standard. It fully supports subqueries (including subqueries in the FROM clause), read commit, and serializable transaction isolation levels. While PostgreSQL has a fully relational system catalog that natively supports multiple schemas per database, its catalog can also be accessed through the information schemas defined in the SQL standard.

Data integrity features include (composite) primary keys, foreign keys with limits and cascading updates/deletes, check constraints, unique constraints, and not-null constraints.

It also has a lot of extensions and advanced features. Among the conveniences are auto-incrementing columns by sequence, and  LIMIT/OFFSET allows partial result sets to be returned. PostgreSQL supports composite, unique, partial, and functional indexes that can use any B-tree, R-tree, hash, or GiST storage method.

The GiST  ( Generalized Search Tree ) index is an advanced system that brings together a variety of different sorting and search algorithms, including B-trees, B+ trees, R-trees, partial sum trees, ranked B+ trees, and more. It also provides an interface that allows the creation of custom data types and extensible query methods for searching them. Thus, GiST provides the flexibility to specify what you store,  how you store it, and the ability to identify new ways to search through it, far more than ways --- through these standard B-trees, R-trees and Other general searches provide algorithms.

GiST is the basis for many public projects such as OpenFTS and PostGIS that use PostgreSQL . OpenFTS (Open Source Full Text Search Engine) provides online data indexing and relevance ranking for database searches. PostGIS is a project that adds support for geographic objects in PostgreSQL, allowing it to be used as a spatial database for geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial extension.

Other advanced features include table inheritance, rule system and database events. Table inheritance places object orientation on table creation, allowing database designers to derive new tables from other tables , treating them as base classes. Even better, PostgreSQL supports both single and multiple inheritance in this way.

A rule system (also known as a query rewrite system ) allows database designers to create rules that identify specific operations for a given table or view and dynamically convert them into alternate operations as they are processed.

The event system is an inter-process communication system in which messages and events can be transmitted between clients  using the LISTEN and NOTIFY commands , allowing simple peer-to-peer communication and advanced database event coordination. Since notifications can be issued from triggers and stored procedures, PostgreSQL clients can monitor database events such as table updates, inserts or deletes.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326118153&siteId=291194637