Mark As Completed Discussion

J. PostgresSQL

1. What is PostgreSQL?

An enterprise-level, flexible, robust, open-source, and object-relational DBMS that supports flexible workloads along with handling concurrent users. It is also known as Postgres as it was based on POSTGRES at Berkeley Computer Science Department. It was developed to help developers build enterprise-level applications by upholding data integrity by making systems fault-tolerant.

2. What data types are available in PostgreSQL?

PostgreSQL supports a variety of data types including:

  • UUID
  • Numeric types
  • Temporal types
  • Geometric primitives
  • Arbitrary precision numeric
  • XML
  • Boolean
  • Character types
  • Array
  • JSON

3. What is table partitioning in PostgreSQL?

The process of dividing a large table into smaller partitions. PostgreSQL supports ranges and lists partitioning through table inheritance. This greatly enhances query performance.

4. Define tokens in PostgreSQL?

A token can be a key word, an identifier, a quoted identifier, a literal (or constant), or a special character symbol. Tokens are normally separated by whitespace (space, tab, newline), but need not be if there is no ambiguity (which is generally only the case if a special character is adjacent to some other token type).

5. What are string constants in PostgreSQL?

A string constant in PostgreSQL is a sequence of some character that is bounded by single quotes (').

6. How do you fill in missing values in PostgreSQL?

Missing values in PostgreSQL can be filled with COALESCE command. COALESCE command has the same functionality as IFNULL command in typical SQL-command. The COALESCE command in PostgreSQL can be used to fill in missing values. This is the equivalent to the IFNULL command other SQL.

TEXT/X-SQL
1COALESCE(Our_NULL_Val, Value_To_Replace)
2
3# Example fill NULL values with '0'
4COALESCE(NULL,0)