Build a Chat App With Nestjs and PostgreSQL

[ad_1] The code for this tutorial is available on my GitHub repository. Feel free to clone it as you follow the steps. Let’s begin! What Is NestJS? NestJS is a Node.js framework for creating fast, testable, scalable, loosely coupled server-side applications that use TypeScript. It takes advantage of powerful HTTP server frameworks such as Express … Read more

CockroachDB TIL: Volume 7 – W3scools Database

[ad_1] This is my series of articles covering short “today I learned” topics as I work with CockroachDB. Read the previous installments:  Topic 1: Show Last Query Statistics CockroachDB has a very user-friendly and helpful UI called DB Console. I like to refer to it when I debug query performance. There is a very useful … Read more

Functions in PostgreSQL

PostgreSQL Functions PostgreSQL functions are stored procedures and can be easily understood as a set of SQL and procedural statements. They are stored on the database server. A function can be invoked using the SQL interface. It facilitates to ease the operations within the database. A PostgreSQL function can be created in several languages including … Read more

CROSS Join in PostgreSQL

CROSS JOIN The PostgreSQL CROSS Join query combines each row of the first table with each row of the second table in the result set. Thus, if we select all the fields of both the table than the resultant table contains x*y rows, where the FIRST table has x number of rows and the Second … Read more

Full Outer Join in PostgreSQL

Full Outer Join: The Full Outer Join query after joining returns all the records from the selected fields of both the tables irrespective of the fact that the join condition is met or not. Syntax: SELECT expr_1, expr_2, … expr_n FROM table_1 FULL OUTER JOIN table_2 ON join_predicate; Parameters: join_predicate: It is used to specify … Read more

Left Outer Join in PostgreSQL

OUTER JOIN The PostgreSQL database supports three major types of Outer joins: Left Outer Join or Left Join Right Outer Join or Right Join Full Outer Join or Full Join Left Outer Join: The Left Outer Join query after joining returns all the records from the Left table for the specified fields along with the … Read more

RIGHT OUTER JOIN in PostgreSQL

Right Outer Join: The Right Outer Join query after joining returns all the records from the Right table for the specified fields along with the records from the Left table where the join condition is met. Syntax: SELECT expr_1, expr_2, … expr_n FROM table_1 RIGHT OUTER JOIN table_2 ON join_predicate; Parameters: join_predicate: It is used … Read more

JOINS in PostgreSQL

PostgreSQL JOINS To create a new table with the records as a combination of records from multiple tables, the PostgreSQL Join Query is used. Types of Joins: The PostgreSQL database supports mainly five types of Joins. These are: Inner or Simple Join Left Outer Join Right Outer Join Full Outer Join Cross Join INNER JOIN … Read more

VIEW in PostgreSQL

CREATE VIEW The view is a virtual table in PostgreSQL that does not store any data, since it has no physical existence as such. Syntax: CREATE [TEMP | TEMPORARY] VIEW name AS SELECT column_1, column_2, column_3,…… FROM table WHERE view_conditions; Parameters: name: It is used to specify the name of the PostgreSQL VIEW to be … Read more

BETWEEN condition in PostgreSQL

PostgreSQL BETWEEN To filter the results, the PostgreSQL BETWEEN condition is used with SELECT, INSERT, UPDATE and DELETE statements to get values within a specific range from an expression. Syntax: WHERE expression BETWEEN value1 AND value2; Parameters: expression: It is used to specify the column or field. value1, value2: They are used to specify the … Read more