<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hamza Mushtaque</title>
    <description>The latest articles on DEV Community by Hamza Mushtaque (@hamza_ghouri).</description>
    <link>https://dev.to/hamza_ghouri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1058270%2F3832243e-bf0b-4cde-aa4e-86eae59b689a.jpg</url>
      <title>DEV Community: Hamza Mushtaque</title>
      <link>https://dev.to/hamza_ghouri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hamza_ghouri"/>
    <language>en</language>
    <item>
      <title>Data Migration to PostgreSQL: Strategies for a Smooth Transition</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sun, 30 Jul 2023 10:39:46 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/data-migration-to-postgresql-strategies-for-a-smooth-transition-3em0</link>
      <guid>https://dev.to/hamza_ghouri/data-migration-to-postgresql-strategies-for-a-smooth-transition-3em0</guid>
      <description>&lt;p&gt;PostgreSQL being one of the most popular Database Management System, is often considered to use or be moved to for numerous number of reason varying on needs. Hence, we really need a smooth transitions in order to avoid any catastrophic outcomes.&lt;br&gt;
In this blog, we will be discussing few strategies to ensure smooth transition to PostgreSQL.&lt;/p&gt;

&lt;h4&gt;
  
  
  Perform Frequent Tests
&lt;/h4&gt;

&lt;p&gt;It is a really good idea to move your database into mirroring non-productive environment before moving to productive environment. It unable us to perform all kind of testing operations without massing up our database. It will unable us to resolve all the issues before hand by realizing earlier in a testing/non productive environment. Hence, we will be able to move to our productive environment later by avoiding any possible unseen complications.&lt;/p&gt;

&lt;h4&gt;
  
  
  Not Assigned Work to single Individual
&lt;/h4&gt;

&lt;p&gt;Developers invest significant time and effort in creating sophisticated systems with Postgres. However, if this knowledge isn't shared with the broader DevOps team, the value of their work can be lost when the individual responsible transitions out of the company. To prevent starting from scratch, IT departments should assign this work to a small group of developers, ensuring that multiple team members are well-versed in the system's implementation.&lt;/p&gt;

&lt;p&gt;Furthermore, adopting modern practices like running Postgres on Kubernetes simplifies and enhances the process of conducting repeatable unit tests for migrations. This approach promotes reliability and facilitates the seamless execution of unit tests, validating the effectiveness of the work accomplished on the system. By embracing collaborative efforts and leveraging cutting-edge techniques, organizations can safeguard their investments in Postgres-based systems and foster continuous development and improvement.&lt;/p&gt;

&lt;h4&gt;
  
  
  Check Compatibility
&lt;/h4&gt;

&lt;p&gt;Most of the time we choose database on whim or based on usage or based on size of the database. As it's better than nothing but deciding on size or usage might gets misleading sometimes.&lt;br&gt;
For example smallest databases are based on logic sometimes or do not follow 1 to 1 relationship between existing and targeted database which might pose numerous complexities.&lt;/p&gt;

&lt;p&gt;To prevent such oversights, companies can utilize tools that assess the compatibility of their existing databases with Postgres. By identifying the most and least compatible databases, they can strategically begin with the easiest ones first. This approach enables the IT team to gain valuable experience, which they can leverage when tackling more complex cases later on. Taking a systematic and informed approach empowers organizations to make smoother transitions to Postgres, maximizing efficiency and minimizing potential challenges along the way.&lt;/p&gt;

&lt;h4&gt;
  
  
  Seek Professional Help
&lt;/h4&gt;

&lt;p&gt;Sometimes, we lack the PostgreSQL expertise within our organization. Hence, we try to undergo extensive research in order to resolve the pending issues or to fulfill the requirement. This approach is time consuming and not tailored made for your specific requirements which makes it inefficient and error prone that's why you should try to seek experts from PostgreSQL experts and professional in order to be efficient and to make your journey to PostgreSQL seamless.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prioritize
&lt;/h4&gt;

&lt;p&gt;Transitioning to Postgres can sometimes be deprioritized among infrastructure improvements, but companies can expedite the process by clearly defining their goals and desired outcomes. For instance, a user-focused company may benefit from improved data integrity and reduced transaction times, while a company focused on time savings might consolidate multiple database types into Postgres to streamline maintenance and troubleshooting efforts. By narrowing their focus to a few key objectives, companies can achieve tangible results more swiftly.&lt;/p&gt;

&lt;p&gt;While migrating to a new database may seem daunting, PostgreSQL's adherence to industry standards and Relational Database Theory, coupled with the abundance of external support available, makes the process smoother. Careful planning, rigorous testing in the production environment, and seeking assistance from relevant experts can ensure a seamless transition to Postgres and unlock the numerous advantages offered by this robust open-source platform. With the right approach and support, companies can embrace Postgres with confidence and leverage its potential to drive success in their data management endeavors.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>database</category>
    </item>
    <item>
      <title>PostgreSQL VS MySQL</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sat, 29 Jul 2023 16:05:45 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-vs-mysql-1k35</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-vs-mysql-1k35</guid>
      <description>&lt;h3&gt;
  
  
  MySQL
&lt;/h3&gt;

&lt;p&gt;MySQL is a relational database management system that lets you store data as tables with rows and columns. It’s a popular system that powers many web applications, dynamic websites, and embedded systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  PostgreSQL
&lt;/h3&gt;

&lt;p&gt;PostgreSQL is an object-relational database management system that offers more features than MySQL. It gives you more flexibility in data types, scalability, concurrency, and data integrity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Similarities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Both of them are relational database management systems. Hence, They store data in tables that are interrelated to each other via common column values.&lt;/li&gt;
&lt;li&gt;Both of them use SQL as an interface to read and edit data.&lt;/li&gt;
&lt;li&gt;Both are open source and have strong developer community support.&lt;/li&gt;
&lt;li&gt;Both have a built-in data backup, replication, and access control features.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dissimilarities
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Triggers
&lt;/h4&gt;

&lt;p&gt;Triggers are stored procedure that runs automatically when a related event occurs in the database management system.&lt;/p&gt;

&lt;p&gt;Only AFTER and BEFORE triggers are used in a MySQL database for SQL INSERT, UPDATE, and DELETE statements. Which explains that only the procedure will run automatically before or after the user modifies the data.&lt;/p&gt;

&lt;p&gt;While as in case of PostgreSQL, it supports the INSTEAD OF trigger, so you can run complex SQL statements using functions.&lt;/p&gt;

&lt;h4&gt;
  
  
  Stored Procedures
&lt;/h4&gt;

&lt;p&gt;Stored procedures are pieces of SQL queries or code statements stored before hand. In order to utilize later or to enable the reusability in the database which will increase the efficiency.&lt;/p&gt;

&lt;p&gt;While both MySQL and PostgreSQL support stored procedures, PostgreSQL allows you to call stored procedures written in languages other than SQL unlike MySQL.&lt;/p&gt;

&lt;h4&gt;
  
  
  Views
&lt;/h4&gt;

&lt;p&gt;A view is a sub set data/table that is created from retrieving related data from tables present in database. &lt;/p&gt;

&lt;p&gt;Both of them supports views but PostgreSQL offers advanced view options like creating materialized views. which improve database performance for complicated queries.&lt;/p&gt;

&lt;h4&gt;
  
  
  Data Types
&lt;/h4&gt;

&lt;p&gt;MySQL is a purely relational database.&lt;br&gt;
While PostgreSQL is an object-relational database which allows it to store data as objects with properties. Hence, enabling concepts like inheritance.&lt;/p&gt;

&lt;h4&gt;
  
  
  Indexes
&lt;/h4&gt;

&lt;p&gt;Databases utilize indexes to enhance data retrieval speed. By configuring the database management system, frequently accessed data can be sorted and stored differently from other data.&lt;/p&gt;

&lt;p&gt;MySQL offers support for B-tree and R-tree indexing, which organizes data hierarchically. On the other hand, PostgreSQL provides a range of index types, including trees, expression indexes, partial indexes, and hash indexes. These options allow you to optimize your database performance according to specific scaling requirements.&lt;/p&gt;

&lt;h4&gt;
  
  
  Concurrency control
&lt;/h4&gt;

&lt;p&gt;Multiversion Concurrency Control (MVCC) is an advanced database technique that ensures safe parallel read and update operations on the same data. By creating duplicate copies of records, MVCC allows multiple users to access and modify data simultaneously without compromising data integrity. This feature enables efficient concurrency management in the database, enhancing overall performance and user experience.&lt;/p&gt;

&lt;p&gt;MySQL does not offer MVCC whereas PostgreSQL supports this feature.&lt;/p&gt;

&lt;h4&gt;
  
  
  ACID compliance
&lt;/h4&gt;

&lt;p&gt;Atomicity, Consistency, Isolation, and Durability (ACID) are fundamental database properties that guarantee the integrity and reliability of the data even in the face of unexpected errors. These properties ensure that database transactions are processed in a manner that maintains a valid state, regardless of any interruptions or failures that may occur during the process. For instance, if an update operation affects multiple rows but encounters a system failure midway, the ACID properties ensure that no row is left in an inconsistent or incomplete state, preserving the overall data integrity.&lt;/p&gt;

&lt;p&gt;MySQL supports ACID compliance only for InnoDB and NDB Cluster storage engines or software modules. &lt;br&gt;
Whereas PostgreSQL is fully ACID compliant in all configurations.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>mysql</category>
    </item>
    <item>
      <title>PostgreSQL: Backup Best Practices</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Mon, 24 Jul 2023 05:45:04 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-backup-best-practices-4o32</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-backup-best-practices-4o32</guid>
      <description>&lt;p&gt;As, we are well aware data is of utmost value and losing it can be really problematic issue. Hence, in this article we will be discussing the best practices related to data backup and recovery in PostgreSQL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Utilize pg_dump:
&lt;/h2&gt;

&lt;p&gt;You can use pg_dump utility for backing up the data. It comes built in most distributions of Postgres. Hence, you do not need any additional installation.&lt;br&gt;
pg_dump is really flexible and fast. In term of flexibility it allows you to have compressed backup or exclude any number of tables while backing up data and it is really fast because it utilizes the multi-processing techniques.&lt;br&gt;
You can use pg_restore for restoring your data to original state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consider pg_dumpall:
&lt;/h2&gt;

&lt;p&gt;pg_dumpall is another utility for the backup. Unlike pg_dump it stores everything including schema of the database. Which allows us to return to our original state at any point. Hence, you even have the structures of your table stored which gives us more control.&lt;br&gt;
In short, if you need complete backup pg_dumpall is a better choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement Continuous Archiving and Point-in-Time Recovery (PITR):
&lt;/h2&gt;

&lt;p&gt;Continuous Archiving allow us to have a possible recovery at every point by ensuring that it archives at each moment. Hence, at any moment if we face data loss we could go back and restore out data.&lt;br&gt;
While PITR ensure the restoration of data at any point in time which is an essential feature in backup and recovery.&lt;br&gt;
When used together, these two feature provides robust backup and disaster recovery system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Backup Frequency:
&lt;/h2&gt;

&lt;p&gt;Try to perform frequent backup because if you perform backup for example once a month or once a week and you lose data near the next backup. You gonna lose data for all these days in between. Hence, performing frequent backup can ensure you lose less amount of data incase of an unfortunate event. For example, if you backup daily, you only gonna lose few hours worth of data.&lt;br&gt;
Also, try to have multiple backup files. Incase one becomes corrupt, you do not lose all your data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Store backups securely:
&lt;/h2&gt;

&lt;p&gt;Try to store your backups at the safe place and different place than your database because if you are saving your backup on the same server as your database, incase of the crash. you are going to lose both of them.&lt;br&gt;
Hence, try to have backups stored at different safe locations. You could also store at multiple locations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Regularly test backups:
&lt;/h2&gt;

&lt;p&gt;Also, once in a while try restoring your backups to ensure they work properly. otherwise you gonna get nasty surprise incase you have been storing data for months or years and that file does not works or becomes corrupt or some reasons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Backup WAL files:
&lt;/h2&gt;

&lt;p&gt;Do not forget to back up Write-Ahead Log (WAL) files as they are really crucial for facilitating database restoration to a consistent state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Safeguard the PostgreSQL configuration file:
&lt;/h2&gt;

&lt;p&gt;Backup the PostgreSQL configuration file along with the rest of the database because it contains all the information needed to work properly. It also contains information related to database and the user allowed to access the database.&lt;br&gt;
Without this file, it's not possible for the database to work properly. Hence, backing up that file is really crucial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid using DROP DATABASE:
&lt;/h2&gt;

&lt;p&gt;Be cautious when using the DROP DATABASE command, as it permanently deletes all data and makes the recovery impossible. Hence, try using DROP TABLE, it will delete table and it's data while retaining the database structure which will make restoration possible.&lt;/p&gt;

&lt;p&gt;By following these best practices, it is possible to ensure the safety and availability of your PostgreSQL database.&lt;br&gt;
it will minimize the risk of data loss and will enable efficient recovery in case of any unforeseen event.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>postgressql</category>
    </item>
    <item>
      <title>EDB* Plus</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sun, 16 Jul 2023 21:15:13 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/edb-plus-577i</link>
      <guid>https://dev.to/hamza_ghouri/edb-plus-577i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;EDB* plus is a utility program that provides CLI to Enterprise DB. EDB* plus enables us to accept numerous types of commands like SQL commands, EDB*Plus commands and SPL anonymous blocks.&lt;br&gt;
Because of the compatibilities of EDB* Plus commands with Oracle SQL* Plus commands, it provides various capabilities including Recording output, Executing OS commands, executing batch scripts, Formatting output from SQL commands, executing stored procedures and querying certain database objects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Supported Platforms
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Linux x86-64 (amd64)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;RHEL
&lt;/li&gt;
&lt;li&gt;OL
&lt;/li&gt;
&lt;li&gt;Rocky Linux/AlmaLinux
&lt;/li&gt;
&lt;li&gt;CentOS7
&lt;/li&gt;
&lt;li&gt;SLES
&lt;/li&gt;
&lt;li&gt;Ubuntu 22.04/20.04
&lt;/li&gt;
&lt;li&gt;Debian
### Linux on IBM Power (ppc64le)&lt;/li&gt;
&lt;li&gt;RHEL
&lt;/li&gt;
&lt;li&gt;SLES
### Windows x86-64&lt;/li&gt;
&lt;li&gt;Windows Server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Supported EDB Postgres Advanced Server (EPAS) Version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;EPAS 15&lt;/li&gt;
&lt;li&gt;EPAS 14&lt;/li&gt;
&lt;li&gt;EPAS 13&lt;/li&gt;
&lt;li&gt;EPAS 12 &lt;/li&gt;
&lt;li&gt;EPAS 11&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  EDB* Plus Commands
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ACCEPT –&lt;/strong&gt; We Use ACCEPT command to display a prompt and wait for keyboard input. The value from the input is placed in the specified variable.&lt;br&gt;
&lt;strong&gt;APPEND –&lt;/strong&gt; It is used to add the given text at the end of the SQL buffer.&lt;br&gt;
&lt;strong&gt;CHANGE –&lt;/strong&gt; It is used to search and replace the data in the current line given by SQL buffer. &lt;br&gt;
&lt;strong&gt;CLEAR –&lt;/strong&gt; Clear is used to do multiple things like clearing the data inside SQL buffer, clearing the screen or deleting the column definitions associated with the COLUMN command.&lt;br&gt;
&lt;strong&gt;COLUMN –&lt;/strong&gt;In simpler terms, the COLUMN command is used to control how the output is formatted. However, it's important to note that any formatting changes made using the COLUMN command will only apply to the current session and will not persist beyond that.&lt;br&gt;
&lt;strong&gt;CONNECT –&lt;/strong&gt; It is used to change the connection of database to different use or connecting the different database itself.&lt;br&gt;
&lt;strong&gt;DEFINE –&lt;/strong&gt; It is used to create user variables or change the value of user variables.&lt;br&gt;
&lt;strong&gt;DEL –&lt;/strong&gt; It is used to delete any number of lines from the SQL buffer.&lt;br&gt;
&lt;strong&gt;DESCRIBE –&lt;/strong&gt; In everyday language, the DESCRIBE command is used to show various information depending on what you're looking at, for a table or view, it displays a list of columns, their data types, and their lengths. For a procedure or function, it shows a list of parameters. For a package, it reveals a list of procedures and functions along with their respective parameters. Additionally, when you use DESCRIBE on a synonym, it provides information about the structure of the underlying database object that the synonym points to.&lt;br&gt;
&lt;strong&gt;DISCONNECT –&lt;/strong&gt; It is used to close the running database connection without ending the EDB* Plus session.&lt;br&gt;
&lt;strong&gt;EDIT –&lt;/strong&gt; It is used to open an external editor for editing OS files or the content of SQL buffer.&lt;br&gt;
&lt;strong&gt;EXECUTE –&lt;/strong&gt; It is used to execute SPL procedure from the EDB* Plus.&lt;br&gt;
&lt;strong&gt;EXIT/QUIT –&lt;/strong&gt; It is used to end the EDB* Plus session.&lt;br&gt;
&lt;strong&gt;GET –&lt;/strong&gt; It is used to load the data present inside the given file into the SQL buffer.&lt;br&gt;
&lt;strong&gt;HELP/? –&lt;/strong&gt; It is used to get help on any specified topic. &lt;br&gt;
&lt;strong&gt;HOST –&lt;/strong&gt; It is used to execute the OS commands from the EDB* Plus.&lt;br&gt;
&lt;strong&gt;INPUT –&lt;/strong&gt; It is used to add the line of text after the current line inside the SQL buffer.&lt;br&gt;
&lt;strong&gt;LIST –&lt;/strong&gt; It is used to display the content of SQL buffer.&lt;br&gt;
&lt;strong&gt;PASSWORD –&lt;/strong&gt; It is used to change the database password.&lt;br&gt;
&lt;strong&gt;PAUSE –&lt;/strong&gt; It is used to display prompt and wait until user press ENTER. &lt;br&gt;
&lt;strong&gt;PROMPT –&lt;/strong&gt; It is used to display the prompt before continuing further. &lt;br&gt;
&lt;strong&gt;REMAKE –&lt;/strong&gt; It is used to comment inside the script.&lt;br&gt;
&lt;strong&gt;SAVE –&lt;/strong&gt; It is used to write the content of SQL buffer inside the OS file.&lt;br&gt;
&lt;strong&gt;SET –&lt;/strong&gt; It is used for specifying the value of variables with session scope that enables us to control EDB* Plus behavior.&lt;br&gt;
&lt;strong&gt;SET AUTOCOMMIT –&lt;/strong&gt; In simpler terms, the SET AUTOCOMMIT command is used to define how transactions are committed in EDB Postgres Advanced Server.&lt;br&gt;
&lt;strong&gt;SET COLUMN SEPARATOR –&lt;/strong&gt; It is used to set the displayed text between the columns.&lt;br&gt;
&lt;strong&gt;SET ECHO –&lt;/strong&gt; It is used to enable the display of SQL and EDB* Plus script statements on the screen while the execute.&lt;br&gt;
&lt;strong&gt;SET FEEDBACK –&lt;/strong&gt; It is used to display the information after the execution of a SQL statement.&lt;br&gt;
&lt;strong&gt;SET FLUSH –&lt;/strong&gt; It is used to control the display buffering. &lt;br&gt;
&lt;strong&gt;SET HEADING –&lt;/strong&gt; It is used to specify whether to display the headings for the columns.&lt;br&gt;
&lt;strong&gt;SET HEADSEP –&lt;/strong&gt; To put it in simpler terms, the SET HEADSEP command is used to choose a different character as the heading separator for the COLUMN HEADING command. By default, the separator character is set to '|'.&lt;br&gt;
&lt;strong&gt;SET LINESIZE –&lt;/strong&gt; It is used to define the width of a line.&lt;br&gt;
&lt;strong&gt;SET NEWPAGE –&lt;/strong&gt; It is used to define the number of blank lines after each page breaks.&lt;br&gt;
&lt;strong&gt;SET NULL –&lt;/strong&gt; It is used to define the string for displaying when NULL is encountered while the display of output buffer.&lt;br&gt;
&lt;strong&gt;SET PAGESIZE –&lt;/strong&gt; It is used to define the number of printed lines in a page.&lt;br&gt;
&lt;strong&gt;SET SQLCASE –&lt;/strong&gt; It is used to define whether to convert the SQL statements to lower or upper case before transmitting to server.&lt;br&gt;
&lt;strong&gt;SET PAUSE –&lt;/strong&gt; It is particularly helpful when it is included in a script. This command shows a prompt to the user and waits until the user presses the "Return" key before proceeding further.&lt;br&gt;
&lt;strong&gt;SET SPACE –&lt;/strong&gt; It is used to define the number of spaces to display between columns.&lt;br&gt;
&lt;strong&gt;SET SQLPROMT –&lt;/strong&gt; It is used to set the value for the prompt.&lt;br&gt;
&lt;strong&gt;SET TERMOUT –&lt;/strong&gt; It is used to enable the option for displaying the command output.&lt;br&gt;
&lt;strong&gt;SET TIMING –&lt;/strong&gt; It is to specify whether to display the execution time taken by each SQL statement after its done executing.&lt;br&gt;
&lt;strong&gt;SET TRIMSPOOL –&lt;/strong&gt; The SET TRIMSPOOL command is used to eliminate any extra spaces at the end of each line in the output file specified by the SPOOL command.&lt;br&gt;
&lt;strong&gt;SET Verify –&lt;/strong&gt; Incase of the encounter of the substitution variables, it is used to define whether to display both old and new values of the SQL statements.&lt;br&gt;
&lt;strong&gt;SHOW –&lt;/strong&gt; It is used to display the values of current parameters.&lt;br&gt;
&lt;strong&gt;SPOOL –&lt;/strong&gt; It is used to send the outputs from the display to the file.&lt;br&gt;
&lt;strong&gt;START –&lt;/strong&gt; It is used to run the EDB* Plus Script.&lt;br&gt;
&lt;strong&gt;UNDEFINE –&lt;/strong&gt; It is used to destroy the variables; we created using the DEFINE command.&lt;br&gt;
&lt;strong&gt;WHENEVER SQLERROR –&lt;/strong&gt; It provides error handing for the PL/SQL block error or SQL errors.&lt;/p&gt;

</description>
      <category>postgres</category>
    </item>
    <item>
      <title>PostgreSQL Basics: Exploring SELECT DISTINCT</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Mon, 10 Jul 2023 04:53:07 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-basics-exploring-select-distinct-2h1p</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-basics-exploring-select-distinct-2h1p</guid>
      <description>&lt;p&gt;In this tutorial, we will be exploring &lt;code&gt;SELECT DISTINCT&lt;/code&gt; and how to use them for removing duplicate rows form the result set returned by PostgreSQL query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As, we know when we run &lt;code&gt;Select&lt;/code&gt; statement. It returns some data and that data contains duplicates sometimes. Hence, &lt;code&gt;Distinct&lt;/code&gt; clause is used to discard all the duplicates. &lt;code&gt;Distinct&lt;/code&gt; clause can be used on single or multiple columns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT DISTINCT column
FROM table_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, column will be used to evaluate duplicates.&lt;br&gt;
It is also possible to use multiple columns for evaluating the duplicates.&lt;br&gt;
Only thing we need to do is to define multiple columns after &lt;code&gt;distinct&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT DISTINCT column1, column2
FROM table_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this scenario, the evaluation of duplicates will consider the combination of values found in both the column1 and column2 columns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;Assume we have following table named distinct_demo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bcvEzHY9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkngagofd1kggbpw4kx3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bcvEzHY9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkngagofd1kggbpw4kx3.png" alt="Table" width="382" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;let's use &lt;code&gt;distinct&lt;/code&gt; only on one column.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT DISTINCT bcolor
FROM distinct_demo
ORDER BY bcolor;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VRvLMwqQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg9n8ve4ybhel63yj0cx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VRvLMwqQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg9n8ve4ybhel63yj0cx.png" alt="Result" width="183" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's consider the case of using &lt;code&gt;distinct&lt;/code&gt; on multiple columns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT DISTINCT bcolor, fcolor
FROM distinct_demo
ORDER BY bcolor, fcolor;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WzJuia7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycq39489slxw2qxe91e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WzJuia7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycq39489slxw2qxe91e6.png" alt="Result" width="326" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we used the &lt;code&gt;SELECT DISTINCT&lt;/code&gt; clause in PostgreSQL, specifying both the bcolor and fcolor columns, the database considered the combined values of both columns to determine the uniqueness of each row. The query results displayed the distinct combinations of bcolor and fcolor from the distinct_demo table. It is important to note that the distinct_demo table contained two rows with the value "red" in both the bcolor and fcolor columns. However, when the DISTINCT was applied to both columns, one of those rows was eliminated from the result set since it was considered a duplicate.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PostgreSQL Basics: Exploring Order By</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Mon, 10 Jul 2023 04:13:43 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-basics-exploring-order-by-1an4</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-basics-exploring-order-by-1an4</guid>
      <description>&lt;p&gt;In this tutorial, we will be exploring &lt;code&gt;Order By&lt;/code&gt; and how to use them for sorting results returned by &lt;code&gt;Select&lt;/code&gt; statement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As, we know when we run &lt;code&gt;Select&lt;/code&gt;statement. It returns some data and that data is in unsorted form. Hence, &lt;code&gt;Order By&lt;/code&gt; is used to sort data returned by &lt;code&gt;Select&lt;/code&gt;statement in ascending or descending order based on the expression provided.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT select_list
FROM table_name
ORDER BY sort_expression1 [ASC | DESC], sort_expression2 [ASC | DESC], ......, sort_expressionN [ASC | DESC]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we can provide multiple sort_expression separated by &lt;code&gt;,&lt;/code&gt; to sort our data. It sorts based on the sequence. First according to first expression then second and so on. &lt;br&gt;
We can use either &lt;code&gt;ASC&lt;/code&gt; for ascending or &lt;code&gt;DESC&lt;/code&gt; for descending.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;ASC&lt;/code&gt; is by default. Hence, if you use nothing it will sort data in ascending order.&lt;/p&gt;

&lt;p&gt;Following is the flow of the PostgreSQL statements during execution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8_axS5oQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/punaayu4v400eo314y2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8_axS5oQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/punaayu4v400eo314y2z.png" alt="Flow" width="697" height="122"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence, because of this order. It is possible to use column alias defined in &lt;code&gt;Select&lt;/code&gt; clause in &lt;code&gt;Order BY&lt;/code&gt; clause.&lt;/p&gt;
&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;Assume we have customer table and we run following query.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3uXFY0AB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vacsi2wtnupyrymyx9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3uXFY0AB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vacsi2wtnupyrymyx9w.png" alt="Customer Table" width="237" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name, last_name
FROM customer
ORDER BY first_name ASC;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2tdRV-OR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgxckhv8vb1o12um3afe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2tdRV-OR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgxckhv8vb1o12um3afe.png" alt="Result" width="425" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As, we discussed earlier that &lt;code&gt;ASC&lt;/code&gt; is default. Hence, we could write our query as following too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name, last_name
FROM customer
ORDER BY first_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will generate same results.&lt;/p&gt;

&lt;p&gt;Now, let's sort in descending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name, last_name
FROM customer
ORDER BY last_name DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hhZyD0hX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nmtk5d8oo8utuj0ug66.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hhZyD0hX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nmtk5d8oo8utuj0ug66.png" alt="Result" width="509" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's sort using multiple column!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name, last_name
FROM customer
ORDER BY first_name ASC, last_name DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZeIRO-Y6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7yql571njhw02y8by0e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZeIRO-Y6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7yql571njhw02y8by0e.png" alt="Result" width="462" height="493"&gt;&lt;/a&gt;&lt;br&gt;
As you can observe, it first sorts based on first name in ascending order then it sorts based on last name in descending order.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>PostgreSQL Basics: Exploring Column Alias</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Tue, 04 Jul 2023 08:14:11 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-basics-exploring-column-alias-1a23</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-basics-exploring-column-alias-1a23</guid>
      <description>&lt;p&gt;In this tutorial, we will be exploring column alias and how to assign temporary names to different columns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Column aliases are used to assign temporary name to column or expression in SELECT statement. The whole purpose of aliases is to provide meaningful names to the outputs.&lt;br&gt;
We use these aliases to also merge results from two different columns for creating more meaningful single columns.&lt;br&gt;
For example: extracting first name and second name from table and then merging those results and giving them name as Full name using alias.&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name AS alias_name
FROM table_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;alias_name is used instead of column_name in the result of above query.&lt;/p&gt;

&lt;p&gt;**Note: **The AS is optional here. Hence, removing AS from the above query will provide similar result.&lt;/p&gt;

&lt;p&gt;**Note: **For using alias with spaces in between, alias should be placed inside "". Following is an example demonstration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name AS "alias name"
FROM table_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;Assume we have customer table and we run following query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name, last_name
FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WhTebWR6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p3bcf8mij2snnfp1ue3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WhTebWR6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p3bcf8mij2snnfp1ue3a.png" alt="Table" width="362" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now assume, in our particular case, surname is more commonly used instead of last name.&lt;br&gt;
Hence, we need to rename our column name as surname as it's more understandable in our region. This is where we could use Alias!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name, last_name AS surname
FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Hj7zEIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iztty8e5pvs2d8ob31cx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Hj7zEIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iztty8e5pvs2d8ob31cx.png" alt="Table" width="375" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As, you can see last name is changed to surname.&lt;/p&gt;

&lt;p&gt;Now, we gonna look at the example where we combine fist name and last name as talked about earlier.&lt;/p&gt;

&lt;p&gt;first, let's just combine them, later we gonna use alias to give it meaningful name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name || ' ' || last_name 
FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;Note: *&lt;/em&gt; &lt;code&gt;||&lt;/code&gt; is an operator, used in postgreSQL to concatinate two or more strings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Dv9eW8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6yr1u1shzb5z77c1qyhc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Dv9eW8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6yr1u1shzb5z77c1qyhc.png" alt="Table" width="225" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As, you can see, we do have a required result but with no meaningful heading. Hence, now we would use Alias to give this expression meaningful name as full_name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name || ' ' || last_name AS full_name
FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qKbLQDM9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4wu1aeuzakw2b8vl1a7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qKbLQDM9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4wu1aeuzakw2b8vl1a7i.png" alt="Table" width="199" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we will explore the use of "" in alias to give our result Full Name as Alias.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name || ' ' || last_name AS "full name"
FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JGJq5Pj5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xvg9viycnbtkcfq4hxtz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JGJq5Pj5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xvg9viycnbtkcfq4hxtz.png" alt="Table" width="205" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it for now!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>postgressql</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PostgreSQL Basics: Exploring "SELECT"</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sun, 02 Jul 2023 09:10:04 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-basics-exploring-select-19ad</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-basics-exploring-select-19ad</guid>
      <description>&lt;p&gt;In this tutorial we will be exploring the select statement for querying the database.&lt;/p&gt;

&lt;p&gt;It is one of the most complex statement in PostgreSQL because of many number of clauses it provide for writing flexible queries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT
   select_list(here you define needed attributes)
FROM
   table_name;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we separate column/attributes by &lt;code&gt;,&lt;/code&gt;. Incase we need all the available columns in table, instead of writing all columns name separated by &lt;code&gt;,&lt;/code&gt;, we use &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Select statement selects mentioned columns from the table mentioned in from statement.&lt;/p&gt;

&lt;p&gt;Note: From clause is not mandatory. if you do not need retrieve data from any table, you can just use Select statement.&lt;/p&gt;

&lt;p&gt;Also, all statements are case insensitive in PostgreSQL. Hence select is same as SELECT or Select.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluation flow:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bKvJCcCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/see54bihmfh4xzwbuxtu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bKvJCcCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/see54bihmfh4xzwbuxtu.png" alt="Flow of program" width="398" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As, you can see from clause is executed before select clause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Clauses of SELECT
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DISTINCT:&lt;/strong&gt; It is used to Select distinct rows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ORDER BY:&lt;/strong&gt; It is used to Sort rows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WHERE:&lt;/strong&gt; It is used to Filter rows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LIMIT or FETCH:&lt;/strong&gt; They are used to Select a subset of rows from a table.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GROUP BY:&lt;/strong&gt; It is used to Group rows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HAVING:&lt;/strong&gt; It is used to Filter groups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Join:&lt;/strong&gt; There are many types of joins like &lt;code&gt;INNER JOIN&lt;/code&gt;, &lt;code&gt;LEFT JOIN&lt;/code&gt;, &lt;code&gt;FULL OUTER JOIN&lt;/code&gt; and &lt;code&gt;CROSS JOIN&lt;/code&gt;. All of them are used to join tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set operations:&lt;/strong&gt; Different set operations can be performed using &lt;code&gt;UNION&lt;/code&gt;, &lt;code&gt;INTERSECT&lt;/code&gt;, and &lt;code&gt;EXCEPT&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Examples
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT first_name FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0QScHqUh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adr4t7wv320ilwiwsbal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0QScHqUh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adr4t7wv320ilwiwsbal.png" alt="Retrieved Table results" width="226" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT
   first_name,
   last_name,
   email
FROM
   customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SP6OKFxt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzmg7vpwku0f0agavflk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SP6OKFxt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzmg7vpwku0f0agavflk.png" alt="Retrieved Table results" width="661" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM customer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yY2dd8Xs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12wa2p2prb75ve7wmcpz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yY2dd8Xs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12wa2p2prb75ve7wmcpz.png" alt="Retrieved Table results" width="767" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it for today!&lt;br&gt;
Feel free to reach me out, if you got any confusion.&lt;br&gt;
Thanks for reading!&lt;/p&gt;

</description>
      <category>postgressql</category>
      <category>postgres</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>PostgreSQL Basics: How to load PostgreSQL database</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sat, 01 Jul 2023 17:14:16 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-basics-how-to-load-postgresql-database-1i0g</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-basics-how-to-load-postgresql-database-1i0g</guid>
      <description>&lt;p&gt;In this blog we will be learning how to load any PostgreSQL database&lt;br&gt;
into PostgreSQL database server.&lt;/p&gt;

&lt;p&gt;We will be keeping our blogs short and easy to read for making them simple. Hence, we will be targeting one thing at a time in our blog series.&lt;/p&gt;

&lt;p&gt;I am assuming, you have PostgreSQL installed on your system.&lt;/p&gt;

&lt;p&gt;First, we will launch our psql tool, using following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;psql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, Enter required credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
Password for user postgres:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then create data base using following statement&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;postgres=# CREATE DATABASE database_name;
CREATE DATABASE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then exit psql tool by typing &lt;code&gt;exit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;then, navigate to bin folder of your Postgres installation.&lt;/p&gt;

&lt;p&gt;after that write following command to load your data into the data you created(assuming we created database named database_name).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pg_restore -U postgres -d database_name C:\sampledb\database_file.tar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here &lt;code&gt;-U postgres&lt;/code&gt; identifies postgres user, it would be different if you are using different user.&lt;/p&gt;

&lt;p&gt;now, enter password for your user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Password:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hurray!!!&lt;br&gt;
We are done!!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PostgreSQL Basics: Understanding the Fundamentals of Postgres</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sun, 14 May 2023 19:43:42 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/postgresql-basics-understanding-the-fundamentals-of-postgres-319l</link>
      <guid>https://dev.to/hamza_ghouri/postgresql-basics-understanding-the-fundamentals-of-postgres-319l</guid>
      <description>&lt;p&gt;PostgreSQL is an open-source relational database management system that is used by many developers and businesses worldwide. It is known for its stability, reliability, and support for advanced features like transactions, subqueries, and triggers. In this blog post, we will cover the fundamentals of PostgreSQL to help you get started with this powerful database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is PostgreSQL?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL, also known as Postgres, is a free and open-source object-relational database management system. It was developed at the University of California, Berkeley in the 1980s as a successor to the Ingres database system. PostgreSQL is now maintained by a global community of developers and is released under the PostgreSQL License.&lt;/p&gt;

&lt;p&gt;PostgreSQL is highly extensible and supports a variety of programming languages, including SQL, Python, Java, C++, and more. It is designed to handle large amounts of data and is used by companies like Apple, Cisco, Fujitsu, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Concepts in PostgreSQL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Databases and Tables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL organizes data into databases and tables. A database is a collection of related data that is stored and managed together. A table is a collection of data organized in rows and columns. Each row represents a record in the table, and each column represents a field or attribute of the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL supports a variety of data types, including integers, floats, dates, times, booleans, and more. It also supports custom data types and allows you to define your own data types.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transactions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A transaction is a series of operations performed on a database that are treated as a single unit of work. Transactions ensure that all operations are completed successfully before they are committed to the database, and they can be rolled back if an error occurs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Queries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Queries are used to retrieve data from a database. PostgreSQL supports a variety of query types, including select, insert, update, delete, and more. Queries can be used to filter data, sort data, join tables, and aggregate data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions and Stored Procedures&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL supports functions and stored procedures, which are reusable pieces of code that can be called from within a query. Functions and stored procedures can be used to perform calculations, validate data, or execute complex logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started with PostgreSQL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To get started with PostgreSQL, you need to have it installed on your system.&lt;/p&gt;

&lt;p&gt;If you need guide to installation, check out following blog:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/hamza_ghouri/getting-started-with-apache-age-part-01-postgresql-installation-on-ubuntu-3cg6"&gt;Getting Started with APACHE AGE (Part 01): PostgreSQL installation On UBUNTU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have PostgreSQL installed, you can use the psql command-line tool to interact with the database.&lt;/p&gt;

&lt;p&gt;Here are some basic psql commands to get started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;psql&lt;/code&gt; – Launches the psql tool&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\l&lt;/code&gt; – Lists all databases&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\c &amp;lt;database&amp;gt;&lt;/code&gt; – Connects to a database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\dt&lt;/code&gt; – Lists all tables in the current database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SELECT * FROM &amp;lt;table&amp;gt;&lt;/code&gt; – Retrieves all data from a table&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL is a powerful and versatile database system that can handle a wide range of data types and operations. In this blog post, we covered the basic concepts of PostgreSQL, including databases, tables, data types, transactions, queries, functions, and stored procedures. With this knowledge, you can start exploring PostgreSQL and using it to manage and analyze your data.&lt;br&gt;
In next blog, we will explore PostgreSQL more!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>apacheage</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Git Basics: A Comprehensive Guide to Getting Started with Version Control</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sun, 14 May 2023 19:31:38 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/git-basics-a-comprehensive-guide-to-getting-started-with-version-control-1n87</link>
      <guid>https://dev.to/hamza_ghouri/git-basics-a-comprehensive-guide-to-getting-started-with-version-control-1n87</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git is a distributed version control system that allows multiple developers to work on the same codebase without overwriting each other's changes. It's a powerful tool that's essential for modern software development, and mastering Git is a must-have skill for any developer. In this blog, we'll cover the basics of Git and how to use it for version control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Git?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git is a distributed version control system that allows developers to collaborate on a codebase. It keeps track of changes made to files in a repository and makes it easy to review, revert, and merge changes. Git is widely used in open-source projects and is the de-facto standard for version control in the software development industry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git Basics:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To get started with Git, you need to understand a few basic concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Repository:&lt;/strong&gt; A repository is a collection of files that are tracked by Git. It's a directory where all the code, documentation, and other files are stored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Commit:&lt;/strong&gt; A commit is a snapshot of the repository at a specific point in time. When you commit changes, Git records the changes you made, along with a message describing the changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Branch:&lt;/strong&gt; A branch is a separate version of the repository that you can use to develop features or experiment with new ideas. You can switch between branches to work on different features or merge changes from one branch to another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Merge:&lt;/strong&gt; Merging is the process of combining changes from one branch to another. When you merge changes, Git attempts to combine the changes automatically, but you may need to resolve conflicts manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Pull Request:&lt;/strong&gt; A pull request is a way to submit changes from one branch to another. It's a request for someone to review and merge your changes into the main branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Git:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that you understand the basics of Git, let's see how to use Git for version control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Configure Git:&lt;/strong&gt; First of all, let Git know who you are. This is important for version control systems, as each Git commit uses this information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "write your username"
git config --global user.email "write your email"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Creating a Repository:&lt;/strong&gt; To create a repository, use the following command in the directory where you want to create the repository. This will initialize an empty repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once Git is initialized on a folder, it will monitor any changes made to the files within it. Git achieves this by creating a hidden folder in the same directory, which keeps track of any modifications made to the files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Adding Files:&lt;/strong&gt; After creating a repository, you can add files to it using the &lt;code&gt;git add&lt;/code&gt; command. This command adds files to the staging area, where Git tracks changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Committing Changes:&lt;/strong&gt; Once you've added files to the staging area, you can commit changes using the &lt;code&gt;git commit&lt;/code&gt; command. This command creates a snapshot of the repository at that point in time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Creating Branches:&lt;/strong&gt; To create a new branch, use the &lt;code&gt;git branch&lt;/code&gt; command followed by the name of the new branch. You can switch to the new branch using the &lt;code&gt;git checkout&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Merging Branches:&lt;/strong&gt; To merge changes from one branch to another, use the &lt;code&gt;git merge&lt;/code&gt; command. Git will attempt to merge the changes automatically, but you may need to resolve conflicts manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Pushing Changes:&lt;/strong&gt; To push changes to a remote repository, use the &lt;code&gt;git push&lt;/code&gt; command. This command sends changes to a remote repository, where other developers can access them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git is a powerful tool for version control and is essential for modern software development. In this blog, we covered the basics of Git and how to use it for version control. By mastering Git, you can collaborate with other developers on the same codebase and keep track of changes easily. Git is also a valuable tool to use in combination with Apache AGE, a powerful graph database that can help you manage and analyze complex data structures. By using Git and Apache AGE together, you can streamline your software development process and make better use of your data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; &lt;br&gt;
This article was created with the help of AI.&lt;/p&gt;

</description>
      <category>git</category>
      <category>apacheage</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Apache AGE vs. Apache Flink: Which one to choose for graph processing</title>
      <dc:creator>Hamza Mushtaque</dc:creator>
      <pubDate>Sun, 07 May 2023 20:45:07 +0000</pubDate>
      <link>https://dev.to/hamza_ghouri/apache-age-vs-apache-flink-which-one-to-choose-for-graph-processing-7dk</link>
      <guid>https://dev.to/hamza_ghouri/apache-age-vs-apache-flink-which-one-to-choose-for-graph-processing-7dk</guid>
      <description>&lt;p&gt;Apache AGE and Apache Flink are both powerful tools for processing and analyzing large-scale graphs in big data applications. Both tools have their own unique features and advantages, making them suitable for different use cases. In this blog, we will compare Apache AGE and Apache Flink and help you decide which one to choose for your graph processing needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I. Introduction&lt;/strong&gt;&lt;br&gt;
Graph processing is an essential component of big data analytics. It enables organizations to gain insights from complex relationships and patterns in their data. Apache AGE and Apache Flink are two popular tools for graph processing. Apache AGE is a graph database that runs as an extension of PostgreSQL. Apache Flink, on the other hand, is a distributed stream processing framework that can also be used for graph processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;II. Apache AGE and its features&lt;/strong&gt;&lt;br&gt;
Apache AGE is a graph database that is designed to store and process large-scale graphs efficiently. It is built as an extension of PostgreSQL, which makes it easy to integrate with existing applications. Apache AGE supports the Cypher query language, which is widely used for graph data analysis. Some of the key features of Apache AGE include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compatibility with PostgreSQL&lt;/li&gt;
&lt;li&gt;Support for the Cypher query language&lt;/li&gt;
&lt;li&gt;Built-in graph algorithms&lt;/li&gt;
&lt;li&gt;Scalability and performance&lt;/li&gt;
&lt;li&gt;ACID-compliant transactions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;III. Apache Flink and its features&lt;/strong&gt;&lt;br&gt;
Apache Flink is a distributed stream processing framework that can also be used for graph processing. It is designed to process large amounts of data in real-time and is known for its low latency and high throughput. Some of the key features of Apache Flink include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Distributed processing&lt;/li&gt;
&lt;li&gt;Low-latency and high-throughput&lt;/li&gt;
&lt;li&gt;Fault tolerance&lt;/li&gt;
&lt;li&gt;Support for batch and stream processing&lt;/li&gt;
&lt;li&gt;Easy integration with other tools and frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;IV. Comparison between Apache AGE and Apache Flink&lt;/strong&gt;&lt;br&gt;
When it comes to choosing between Apache AGE and Apache Flink for graph processing, there are several factors to consider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Performance and scalability:&lt;/strong&gt;&lt;br&gt;
Apache AGE is known for its performance and scalability. It can handle graphs with billions of vertices and edges and is designed to deliver fast query response times. Apache Flink, on the other hand, is also known for its performance and can handle large-scale graphs in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Ease of use and development:&lt;/strong&gt;&lt;br&gt;
Apache AGE is easy to use and requires no prior knowledge of PostgreSQL. It also supports the Cypher query language, which is easy to learn and use. Apache Flink, on the other hand, is a more complex tool that requires a certain level of expertise in distributed systems and stream processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Flexibility and compatibility with other tools and frameworks:&lt;/strong&gt;&lt;br&gt;
Apache AGE is built as an extension of PostgreSQL, which makes it easy to integrate with existing applications. It also supports several programming languages, including Java, Python, and R. Apache Flink is a more flexible tool that can be used with a wide range of programming languages and frameworks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V. Use cases and applications&lt;/strong&gt;&lt;br&gt;
Both Apache AGE and Apache Flink are widely used in various industries and applications. Apache AGE is often used in applications that require real-time processing of graph data, such as fraud detection, recommendation engines, and social network analysis. Apache Flink, on the other hand, is often used in applications that require low-latency processing of streaming data, such as real-time analytics, fraud detection, and anomaly detection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VI. Conclusion&lt;/strong&gt;&lt;br&gt;
Choosing between Apache AGE and Apache Flink for graph processing depends on your specific needs and use case. Apache AGE is an excellent choice if you need a graph database that can handle large-scale graphs efficiently and is easy to use. Apache Flink, on the other hand, is a more flexible tool that can be used for both batch and stream processing and offers low latency and high throughput.&lt;/p&gt;

&lt;p&gt;In conclusion, both Apache AGE and Apache Flink are powerful tools for graph processing&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>guide</category>
      <category>apacheflink</category>
    </item>
  </channel>
</rss>
