<?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: Zainab-Saad</title>
    <description>The latest articles on DEV Community by Zainab-Saad (@zainabsaad).</description>
    <link>https://dev.to/zainabsaad</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%2F1020451%2Ff6efdc31-4bd6-463c-8067-63cd31632156.png</url>
      <title>DEV Community: Zainab-Saad</title>
      <link>https://dev.to/zainabsaad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zainabsaad"/>
    <language>en</language>
    <item>
      <title>Why use Apache AGE?</title>
      <dc:creator>Zainab-Saad</dc:creator>
      <pubDate>Sun, 19 Mar 2023 18:25:23 +0000</pubDate>
      <link>https://dev.to/zainabsaad/why-use-apache-age-4ep0</link>
      <guid>https://dev.to/zainabsaad/why-use-apache-age-4ep0</guid>
      <description>&lt;p&gt;Apache AGE is an extension currently based on powerful and robust relational database postreSQL. AGE can handle complex graph queries in an optimized manner while supporting rdbms features such as stored procedures, triggers, constraints, multi-version concurrency control, ACID transactions etc.  &lt;/p&gt;

&lt;p&gt;The extension allows hybrid querying between SQL and cypher queries.&lt;/p&gt;

&lt;p&gt;AGE's implementation is based on openCypher - &lt;em&gt;a graph query language originally used for querying graph database such as Neo4j&lt;/em&gt;. The biggest advantage of using AGE is that users do not need to migrate data from the relational database in order to use the graph analytics and visualization. &lt;/p&gt;

&lt;p&gt;Moreover, AGE has the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility - users can query multiple graphs at the same time&lt;/li&gt;
&lt;li&gt;Fast Graph Processing - the relationships between the nodes/entities of the graph can be processed efficiently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Applications&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time fraud detection in financial services&lt;/li&gt;
&lt;li&gt;Traceability and master data management in manufacturing&lt;/li&gt;
&lt;li&gt;Criminal and tax fraud investigation&lt;/li&gt;
&lt;li&gt;Recommendation Systems&lt;/li&gt;
&lt;li&gt;Social Network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/apache/age"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/zainabsaad/install-postgresql-and-age-from-source-code-5dk7"&gt;Installation Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why use graph database?</title>
      <dc:creator>Zainab-Saad</dc:creator>
      <pubDate>Sun, 19 Mar 2023 17:53:32 +0000</pubDate>
      <link>https://dev.to/zainabsaad/why-use-graph-database-26b</link>
      <guid>https://dev.to/zainabsaad/why-use-graph-database-26b</guid>
      <description>&lt;p&gt;Graph database uses nodes/vertices to store entities and edges to store relationships between these entities. Most of the value of graph databases are derived from these relationships. These relationships represent complex interconnected relations between the nodes. &lt;/p&gt;

&lt;p&gt;Examples of graph databases include Neo4j. Examples of relational databases are postgreSQL, MySQL, Oracle etc.&lt;/p&gt;

&lt;p&gt;We use graph databases because it provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;&lt;br&gt;
Graph databases are &lt;em&gt;schema-free&lt;/em&gt; and thus any change in the properties (attributes) of a node or edge does not require the entire schema to be altered. This is quite unlike relational databases such as postgreSQL where if one record has a different set of attributes, you need to change the entire schema of the relation/table. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agility&lt;/strong&gt;&lt;br&gt;
Graph databases being time-efficient are a great choice in agile development where there is a need for efficient data storage and management under a time constraint.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Size vs Complexity Relation&lt;/strong&gt;&lt;br&gt;
There is a &lt;em&gt;size vs complexity relation between the graph and relational database&lt;/em&gt;. It is a fact that the graph databases perform the best when the complexity of relationships between the entities is to be scaled whereas relational databases perform best when size of the database needs to be scaled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://neo4j.com/"&gt;Neo4j&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postgresql.org/docs/"&gt;postgreSQL&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>neo4j</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Install Apache AGE Viewer</title>
      <dc:creator>Zainab-Saad</dc:creator>
      <pubDate>Wed, 15 Mar 2023 08:26:05 +0000</pubDate>
      <link>https://dev.to/zainabsaad/install-apache-age-viewer-f83</link>
      <guid>https://dev.to/zainabsaad/install-apache-age-viewer-f83</guid>
      <description>&lt;h2&gt;
  
  
  What is Apache AGE Viewer
&lt;/h2&gt;

&lt;p&gt;Apache AGE Viewer is a web user interface for the visualization of graphs created in AGE - A multi-model database that supports graph database on top of the already existing relational database while also supporting JSON and key-value data.&lt;/p&gt;

&lt;p&gt;AGE Viewer has the following prospects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provides data visualization&lt;/li&gt;
&lt;li&gt;Supports complex graph queries&lt;/li&gt;
&lt;li&gt;Helps users discover the relationships among strongly connected entities in the graph &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;You should have the following installed on your system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;postgreSQL &lt;/li&gt;
&lt;li&gt;Apache AGE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are on linux, follow the &lt;a href="https://dev.to/zainabsaad/install-postgresql-and-age-from-source-code-5dk7"&gt;guide&lt;/a&gt; on &lt;em&gt;How to install postgreSQL and Apache AGE from source code&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing AGE Viewer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; Go to the directory postgres_age&lt;br&gt;
&lt;code&gt;cd postgres_age&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; Install node.js and npm. It is recommened to install using node version manager. &lt;em&gt;nvm manages different versions of node on your system and thus prevents any clashes between the different projects using different node version&lt;/em&gt;. Install nvm following the guide &lt;a href="https://www.freecodecamp.org/news/node-version-manager-nvm-install-guide/"&gt;here&lt;/a&gt;&lt;br&gt;
You can check if nvm is installed correctly using &lt;code&gt;nvm --version&lt;/code&gt;&lt;br&gt;
Check if the specified version of node is installed using &lt;code&gt;node --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; Clone the AGE Viewer GitHub repository&lt;br&gt;
&lt;code&gt;git clone https://github.com/apache/age-viewer.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt; Start the database server for the database cluster named &lt;em&gt;pg_age&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd postgres/postgresql-11.18
bin/pg_ctl -D pg_age -l logfile start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt; Go to directory age-viewer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ../../
cd age-viewer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt; Setup AGE Viewer development server on local system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run setup
npm run start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This takes you to AGE Viewer running on localhost&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7&lt;/strong&gt; Configure Viewer with the database you want to connect. Provide the details as here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Connect URL : 127.0.0.1
Connect Port: 5432
Database Name: practicedb
Username: your_username_on_linux
Password: your_system_password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Start querying the database
&lt;/h2&gt;

&lt;p&gt;Make sure you have the database server running. Example queries:&lt;/p&gt;

&lt;p&gt;Create graph&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT create_graph('country');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create vertices with the label City and property name&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 cypher('country', $$
CREATE (a: City {name: "A"}),
(b: City {name : "B"}),
(c : City {name : "C"}),
(d: City {name : "D"}),
(e : City {name : "E"})
$$) AS (result agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View all the cities(verices)&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 cypher('country', $$
MATCH (u : City)
RETURN u
$$) AS (result agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It shows the 5 vertices created as&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YMuds06E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysfhelgmeknu5faek4cv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YMuds06E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysfhelgmeknu5faek4cv.png" alt="Vertices" width="504" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create edges between nodes as&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 cypher('country', $$
MATCH (a: City {name: "A"}), (b: City {name : "B"})
CREATE (a)-[e1: CONNECTED {time : 2}]-&amp;gt;(b)
$$) AS (result agtype);

SELECT * FROM cypher('country', $$
MATCH (b: City {name: "B"}), (c: City {name : "C"})
CREATE (b)-[e1: CONNECTED {time : 1}]-&amp;gt;(c)
$$) AS (result agtype);

SELECT * FROM cypher('country', $$
MATCH (a: City {name: "A"}), (d: City {name : "D"})
CREATE (a)-[e1: CONNECTED {time : 4}]-&amp;gt;(d)
$$) AS (result agtype);

SELECT * FROM cypher('country', $$
MATCH (d: City {name: "D"}), (e: City {name : "E"})
CREATE (d)-[e1: CONNECTED {time : 3}]-&amp;gt;(e)
$$) AS (result agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View the graph&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 cypher('country', $$
MATCH(u : City)-[e : CONNECTED]-&amp;gt;(v : City)
RETURN u, e, v
$$) AS (u agtype, e agtype, v agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MrZrDtbR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkxzpehdd7gcmpoj22ei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MrZrDtbR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkxzpehdd7gcmpoj22ei.png" alt="Graph" width="507" height="633"&gt;&lt;/a&gt;&lt;br&gt;
Try something interesting here&lt;br&gt;
You can notice that there is a variable length edge from A to C and A to D i.e; A is indirectly connected to C and E&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 cypher('country', $$
MATCH(a : City {name : "A"})-[e : CONNECTED* ]-&amp;gt;(x : City)
RETURN a, e, x
$$) AS (a agtype, e agtype, x agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjRYoWs5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpxfcsyucog8iw934y97.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjRYoWs5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpxfcsyucog8iw934y97.png" alt="Variable length edge" width="480" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://age.apache.org/age-manual/master/clauses/create.html#"&gt;Create CLAUSE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://age.apache.org/age-manual/master/clauses/create.html#"&gt;MATCH CLAUSE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://age.apache.org/age-manual/master/clauses/return.html"&gt;RETURN CLAUSE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/apache/age"&gt;AGE GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>postgres</category>
      <category>apacheage</category>
      <category>apache</category>
      <category>age</category>
    </item>
    <item>
      <title>Install PostgreSQL and AGE from Source Code</title>
      <dc:creator>Zainab-Saad</dc:creator>
      <pubDate>Sun, 12 Feb 2023 08:16:10 +0000</pubDate>
      <link>https://dev.to/zainabsaad/install-postgresql-and-age-from-source-code-5dk7</link>
      <guid>https://dev.to/zainabsaad/install-postgresql-and-age-from-source-code-5dk7</guid>
      <description>&lt;h2&gt;
  
  
  What is Apache AGE
&lt;/h2&gt;

&lt;p&gt;AGE is an acronym for &lt;em&gt;A Graph Extension&lt;/em&gt; - an extension built on the top of already existing object relational database management system (ORDBMS)PostgreSQL. AGE is a multi-model database which means that it supports the following &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;graph database and cypher queries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;relational database and SQL queries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Key value database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SQL and/or cypher Hybrid Querying&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article we will look into the following&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Installation of PostgreSQL 11.18 from source code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Installation of AGE from source code&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This article uses the commands for Linux Operating System. You should have Linux installed either on the virtual machine or dual boot alongside Windows/MacOS&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For Windows users: &lt;a href="https://www.youtube.com/watch?v=ddk8VX8Hm-I&amp;amp;list=PLGp3huJbWNDjgwP7s99Q-9_w1vxpjNHXG"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For MacOS users: &lt;a href="https://www.youtube.com/watch?v=0-qMwpDh0CA"&gt;here&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should also have git installed on your system. To check if git is installed, type into terminal&lt;br&gt;
&lt;code&gt;git --version&lt;/code&gt;&lt;br&gt;
If it returns the version of git, you are good to go else see the installation guide on &lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Git Doc&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing postgres
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; Make a directory and a subdirectory where you will install postgres&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir postgres_age
cd postgres_age
mkdir postgres
cd postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; Install the Linux libraries before the actual installation. The commands may vary for different OS. Check this &lt;a href="https://age.apache.org/age-manual/master/intro/setup.html#pre-installation"&gt;link&lt;/a&gt; out if you are not Ubuntu.&lt;br&gt;
&lt;code&gt;sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; Install the development files for postres from &lt;code&gt;postgresql-server-dev-xx&lt;/code&gt; package. This command will vary according to the version of Linux. Check out the compatible command for your version &lt;a href="https://packages.ubuntu.com/search?keywords=postgresql-server-dev"&gt;here&lt;/a&gt;. Note: &lt;em&gt;Install postgres 11 or 12 as these are the versions AGE is compatible with&lt;/em&gt;. I am on Jammy(22.04 LTS), so I use the following command&lt;br&gt;
&lt;code&gt;sudo apt install postgresql-server-dev-all&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt; Download the tar file to install postgres which will extract to the directory /postgres_age/postgres&lt;br&gt;
&lt;code&gt;wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz &amp;amp;&amp;amp; tar -xvf postgresql-11.18.tar.gz &amp;amp;&amp;amp; rm -f postgresql-11.18.tar.gz&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt; Installing psql. While running ./configure, enable debugging flag. To read more on the flags, read &lt;a href="https://www.postgresql.org/docs/current/install-procedure.html"&gt;Doc&lt;/a&gt;. &lt;code&gt;pwd&lt;/code&gt; will install postgres in the current directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd postgresql-11.18
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"
make install
cd ../../
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing AGE
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt; Clone the AGE GitHub Repository&lt;br&gt;
&lt;code&gt;git clone https://github.com/apache/age.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7&lt;/strong&gt; Installing and configuring AGE with psql&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd age
sudo make PG_CONFIG=/home/zainab/postgres_age/postgres/postgresql-11.18/bin/pg_config install
make PG_CONFIG=/home/zainab/postgres_age/postgres/postgresql-11.18/bin/pg_config installcheck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see that all the tests have passed as shown in the image below, then AGE is installed successfully&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EEFBoxTl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3k8d6bxextlheglab2rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EEFBoxTl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3k8d6bxextlheglab2rc.png" alt="If you see that all the tests have passed as shown in the image, then AGE is installed successfully" width="673" height="730"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Database Initialization
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 8&lt;/strong&gt; Initialize a database cluster. You can think of database cluster as &lt;em&gt;The collection of databases which will be managed by single instance of running server.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ..
cd postgres/postgresql-11.18
bin/initdb pg_age
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 9&lt;/strong&gt; Start server&lt;br&gt;
&lt;code&gt;bin/pg_ctl -D pg_age -l logfile start&lt;/code&gt;&lt;br&gt;
Now create a database named practicedb&lt;br&gt;
&lt;code&gt;bin/createdb practicedb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 10&lt;/strong&gt; Launch the postgres command line client psql&lt;br&gt;
&lt;code&gt;bin/psql practicedb&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Create and Load AGE
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 11&lt;/strong&gt; Create and Load AGE extension in order to start using it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 12&lt;/strong&gt; Start querying using cypher commands&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT create_graph('people');
SELECT * FROM cypher('people', $$ CREATE (n: Person {name : "Zainab", bornIn : "Pakistan"}) $$ ) AS (a agtype);
SELECT * FROM cypher ('people', $$ CREATE (n : Person {name : "John", bornIn : "US"}) $$ ) AS (a agtype);
SELECT * FROM cypher('people', $$ MATCH (v) RETURN v $$) as (v agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is shown below&lt;/p&gt;

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

&lt;p&gt;To get more information about Apache AGE, explore the &lt;a href="https://age.apache.org/"&gt;website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/apache/age"&gt;AGE GitHub repository&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.postgresql.org/docs/current/install-procedure.html"&gt;PostgreSQL Doc&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://age.apache.org/age-manual/master/intro/setup.html#installing-from-source-code"&gt;AGE Doc&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find any ambiguity or incorrect statement, let me know in comment section&lt;/p&gt;

&lt;p&gt;Happy learning!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>age</category>
      <category>apache</category>
    </item>
  </channel>
</rss>
