
Joining Data And Using Triggers In Postgresql
Last updated 10/2023
Created by Bluelime Learning Solutions
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz, 2 Ch
Level: Beginner | Genre: eLearning | Language: English + subtitle | Duration: 42 Lectures ( 4h 19m ) | Size: 1.26 GB
Learn how to extract data from multiple tables and create Triggers
What you'll learn
Install PostgreSQL
Connect to PostgreSQL Database
Create a Table
Populate a Table
Join data using Natural Join
Join data using Cross Join
Join data using Inner Join
Join data using Left Join
Join data using Full Outer Join
Create Triggers
Manage Triggers
Perform Basic CRUD OPeration
Requirements
Basic SQL knowledge
Basic understanding of database concepts
Description
The PostgreSQL Joins clause is used to combine records from two or more tables in a database. A JOIN is a means for combining fields from two tables by using values common to each.The main concept which is focusing on a join is that, two or more data sets, when joined, combined their columns into a new set of rows, including each of the columns requested from each of the data sets. All joins are standing on the foundation of Cartesian product. The Cartesian product is the set of all possible combinations between two data sets. A join creates a set of rows in a temporary table and works on two or more tables, and each table should at least one common field and must maintain a relation between the common fields. Join keeps the structure unchanged of the base tables.Types of PostgreSQL JOINCross JoinInner JoinLeft Outer JoinRight Outer JoinFull Outer JoinA PostgreSQL trigger is a function invoked automatically whenever an event associated with a table occurs. An event could be any of the following: INSERT, UPDATE, DELETE or TRUNCATE.A trigger is a special user-defined function that binds to a table. To create a new trigger, you must define a trigger function first, and then bind this trigger function to a table. The difference between a trigger and a user-defined function is that a trigger is automatically invoked when an event occurs.PostgreSQL provides two main types of triggers: row and statement level triggers. The differences between the two are how many times the trigger is invoked and at what time. For example, if you issue an UPDATE statement that affects 20 rows, the row level trigger will be invoked 20 times, while the statement level trigger will be invoked 1 time.You can specify whether the trigger is invoked before or after an event. If the trigger is invoked before an event, it can skip the operation for the current row or even change the row being updated or inserted. In case the trigger is invoked after the event, all changes are available to the trigger. We will create and manage a basic trigger in this course.This course provides a comprehensive guide to working with data in PostgreSQL, focusing on data joins and triggers. Students will learn how to combine data from multiple tables using various join techniques and how to implement triggers to automate actions in the database.
Who this course is for
SQL Beginners
Anyone who wants to learn something new