<?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: Tito Osadebey</title>
    <description>The latest articles on DEV Community by Tito Osadebey (@titoausten).</description>
    <link>https://dev.to/titoausten</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%2F872531%2Fa2380371-7eae-4cf3-8511-43f30802c231.jpg</url>
      <title>DEV Community: Tito Osadebey</title>
      <link>https://dev.to/titoausten</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/titoausten"/>
    <language>en</language>
    <item>
      <title>Ultimate Guide to Open Source Contribution (Part 2)</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Sat, 29 Jul 2023 11:40:53 +0000</pubDate>
      <link>https://dev.to/titoausten/ultimate-guide-to-open-source-contribution-part-2-57d7</link>
      <guid>https://dev.to/titoausten/ultimate-guide-to-open-source-contribution-part-2-57d7</guid>
      <description>&lt;p&gt;In the &lt;a href="https://dev.to/titoausten/ultimate-guide-to-open-source-contribution-part-1-54c9"&gt;previous article&lt;/a&gt;, we presented a basic template to Open Source contributions and as stated also, we would be delving into how we can use that template to contribute to Apache &lt;strong&gt;AGE&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For a practical approach, we are looking at how the &lt;code&gt;cos()&lt;/code&gt; function was implemented in AGE.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Before creating a function in AGE, it should  supported by Neo4j Cypher and/or PostgreSQL else there should be a very valid reason.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Firstly, we check similar functions to see the structure to follow accordingly and then implement in &lt;strong&gt;age--1.3.0.sql&lt;/strong&gt; and &lt;strong&gt;src/backend/utils/adt/agtype.c&lt;/strong&gt; files.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;age--1.3.0.sql&lt;/strong&gt;, the function is declared:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE FUNCTION ag_catalog.age_cos(variadic "any")
RETURNS agtype
LANGUAGE c
IMMUTABLE
PARALLEL SAFE
AS 'MODULE_PATHNAME';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the function is created or added in &lt;strong&gt;agtype.c&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;PG_FUNCTION_INFO_V1(age_cos);

Datum age_cos(PG_FUNCTION_ARGS)
{
    int nargs;
    Datum *args;
    bool *nulls;
    Oid *types;
    agtype_value agtv_result;
    float8 angle;
    float8 result;
    bool is_null = true;

    /* extract argument values */
    nargs = extract_variadic_args(fcinfo, 0, true, &amp;amp;args, &amp;amp;types, &amp;amp;nulls);

    /* check number of args */
    if (nargs != 1)
        ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                        errmsg("cos() invalid number of arguments")));

    /* check for a null input */
    if (nargs &amp;lt; 0 || nulls[0])
        PG_RETURN_NULL();

    /*
     * cos() supports integer, float, and numeric or the agtype integer, float,
     * and numeric for the angle
     */

    angle = get_float_compatible_arg(args[0], types[0], "cos", &amp;amp;is_null);

    /* check for a agtype null input */
    if (is_null)
        PG_RETURN_NULL();

    /* We need the numeric input as a float8 so that we can pass it off to PG */
    result = DatumGetFloat8(DirectFunctionCall1(dcos,
                                                Float8GetDatum(angle)));

    /* build the result */
    agtv_result.type = AGTV_FLOAT;
    agtv_result.val.float_value = result;

    PG_RETURN_POINTER(agtype_value_to_agtype(&amp;amp;agtv_result));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After creating a function, you should also write tests for that function to ensure it works efficiently. These tests are added to files in the &lt;strong&gt;regress/&lt;/strong&gt; directory in the repository depending on the function added. In the case of &lt;code&gt;cos()&lt;/code&gt; function, the files we are interested in are &lt;strong&gt;regress/expected/expr.out&lt;/strong&gt; and &lt;strong&gt;regress/sql/expr.sql&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These files are used to test the functions and compare the output of different files. If the output or result from &lt;strong&gt;expr.sql&lt;/strong&gt; is different from that in &lt;strong&gt;expr.out&lt;/strong&gt; then the tests will fail. Hence, ensure the tests pass before making a pull request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
This is just a basic guide to contributing to an open source project like AGE. The steps stated in the &lt;a href="https://dev.to/titoausten/ultimate-guide-to-open-source-contribution-part-1-54c9"&gt;first article&lt;/a&gt; can be implemented in any project. Remember, the most important part of contribution is &lt;strong&gt;testing&lt;/strong&gt;, this ensures you don't push a code that causes "hiroshima" to the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;Apache AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;Apache AGE project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>apacheage</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Ultimate Guide to Open Source Contribution (Part 1)</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Tue, 18 Jul 2023 09:15:04 +0000</pubDate>
      <link>https://dev.to/titoausten/ultimate-guide-to-open-source-contribution-part-1-54c9</link>
      <guid>https://dev.to/titoausten/ultimate-guide-to-open-source-contribution-part-1-54c9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;
Contributing to Open Source projects is one of the best platforms to gain experience in the software engineering space. It also makes a prospective employer see how diligent an applicant is as an aspiring or experienced Software Engineer and makes the applicant standout in the recruitment stages of a job opportunity.
&lt;/p&gt;

&lt;p&gt;
In this article, we would be looking at how to contribute to Apache AGE by creating a function. Unlike adding or editing a README, this gives you an edge.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to Contribution&lt;/strong&gt;&lt;br&gt;
Creating a function in Open source projects like AGE is quite daunting for a newbie and that's why I suggest you follow the steps below for an easy process.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Check for Functions not implemented that would be a great addition - This particular step is the foundation for any contribution. You sure do not want to add a function that already exists because that makes you seem lazy and a copy, so do a deep research of the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Look at similar functions and the syntax - This will give you and idea on how to implement your supposed function.&lt;br&gt;
For example, if there's a function in the project that returns the max of 2 numbers and there's no min function present, then the syntax of the max function should be a reference for the min() function you are to create. This step also is important for contributing to other Open Source projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write code in associated files - Still citing the max() function for the min() function to be created, You should also take note of the files in which the max() function was implemented and follow suit for the min() function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test the function - This is the most important step because you don't want to push an erroneous code to an open source codebase (it's a red flag). Test the code on your local system and ensure it works properly. If the function gives an error, debug and test again till it gives no errors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make a PR - This is equivalent to submitting a solution and expecting feedback for the solution. Do not feel bad if your PR does not get merged as there might be many reasons such as:&lt;br&gt;
a. The solution might not in the current scope of projects.&lt;br&gt;
b. It might not be according to their contribution standards. Hence, you should always align your PRs accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Optional&lt;/strong&gt;: Add more cases to the function. If the max() function takes only int values, you can add more functionalities in the min() function to consider float values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
This is an ideal template to start contributing to Open Source projects. In the next blog post, we would make practical examples on how to contribute to Apache AGE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;Apache AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;Apache AGE project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>apacheage</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Getting Started with Apache AGE: A Comprehensive Guide (Part 3)</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Wed, 10 May 2023 12:35:01 +0000</pubDate>
      <link>https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-3-2d89</link>
      <guid>https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-3-2d89</guid>
      <description>&lt;p&gt;In this article, we would be looking at &lt;strong&gt;AGE Viewer&lt;/strong&gt;. AGE Viewer is a web-based tool that is used to visualize the relationships between nodes, edges and the output of cypher queries in AGE. It can handle large and complex graph data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing AGE Viewer&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;npm&lt;/code&gt; is required to install AGE Viewer. You can install through the terminal with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm install 14.16.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, go into the directory where you downloaded AGE and download AGE Viewer there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/apache/age-viewer.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Launching AGE Viewer&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;cd age-viewer
npm run setup
npm run start 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should open &lt;code&gt;AGE Viewer&lt;/code&gt; in a browser on your PC and you should see some empty boxes requiring details to connect to a database. Ensure you type in the right details. In my case, it will be:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0ud2em5ed3wfq3j2auj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0ud2em5ed3wfq3j2auj.png" alt="Image description" width="800" height="535"&gt;&lt;/a&gt;&lt;br&gt;
If connected successfully, you should see something similar to the image below with your details, the nodes and edges.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpsufsv63ol93y02r18d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpsufsv63ol93y02r18d.png" alt="Image description" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visualizing Queries&lt;/strong&gt;&lt;br&gt;
We can visualize queries now that we have AGE Viewer set up. Let’s see all the nodes present in this 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('test', $$ MATCH (v) RETURN v $$) as (v agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31crknbdsvp9q5dbpura.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31crknbdsvp9q5dbpura.png" alt="Image description" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also visualize the relationship between nodes that have similar tribes:&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('test', $$ MATCH (v)-[r:IS]-(v2) RETURN v, r, v2 $$) AS (v agtype, r agtype, v2 agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t68h39bjhlhojvope1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t68h39bjhlhojvope1e.png" alt="Image description" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Visualizing data is very important for efficient data extraction, analysis and event prediction. AGE Viewer helps ease this process with its awesome functionalities. In this post, we just scratched the surface on what is an ideal tool for data visualization in graph database systems which would be a great asset for data scientists, analysts and everyone working with data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
For more information on Apache AGE, visit:&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;AGE GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age-viewer"&gt;AGE Viewer&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>database</category>
      <category>graphdatabase</category>
    </item>
    <item>
      <title>Getting Started with Apache AGE: A Comprehensive Guide (Part 2)</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Thu, 27 Apr 2023 22:06:03 +0000</pubDate>
      <link>https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-2-3f8</link>
      <guid>https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-2-3f8</guid>
      <description>&lt;p&gt;In the &lt;a href="https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-1-39nj"&gt;previous part of this series&lt;/a&gt;, we looked at the introduction to Apache AGE as a graph analysis tool and followed up with steps to installing and setting it up. In continuation, we’ll be creating a graph, and querying it using Cypher queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a graph in AGE&lt;/strong&gt;&lt;br&gt;
Following up with the steps in part 1, we can create a graph by running the statement:&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('test');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check if the graph was created successfully, run the statement that shows a table of graphs created in the database:&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 ag_graph;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the graph is created, we need to add nodes and/or edges (otherwise called relationships) to the graph using cypher queries. For a brief introduction to graphs and its analysis, click &lt;a href="https://dev.to/titoausten/the-graph-analytics-revolution-understanding-the-dynamic-tool-driving-modern-technology-5ff9"&gt;here&lt;/a&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 cypher('test',  $$ CREATE (n:Person {name: "Tito", bornin: "Warri", tribe: "Igbo"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Tobe", bornin: "Warri", tribe: "Igbo"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Tuoyo", bornin: "Warri", tribe: "Itsekiri"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Austen", bornin: "Windsor"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "David", bornin: "Benin", tribe: "Bini"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Ikechukwu", bornin: "Benin", tribe: "Igbo"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Mariela", bornin: "Mexico City"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Ayomide", bornin: "Benin", tribe: "Yoruba"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Person {name: "Dotun", bornin: "Windsor", tribe: "Yoruba"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;9 nodes were created with the statements above. These nodes have a label &lt;code&gt;Person&lt;/code&gt; and varying properties for each node such as &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;bornin&lt;/code&gt; and &lt;code&gt;tribe&lt;/code&gt;.&lt;br&gt;
Furthermore, we can add more nodes with label &lt;code&gt;City&lt;/code&gt; to the graph to make it robust.&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('test',  $$ CREATE (n:City {name: "Warri"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:City {name: "Benin"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:City {name: "Windsor"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:City {name: "Mexico City"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also add nodes with label &lt;code&gt;Tribe&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 * FROM cypher('test',  $$ CREATE (n:Tribe {name: "Igbo"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Tribe {name: "Bini"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Tribe {name: "Yoruba"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ CREATE (n:Tribe {name: "Itsekiri"}) $$) AS (a agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let’s create some edges (relationships) between the nodes.&lt;br&gt;
Create an edge between nodes with label &lt;code&gt;Person&lt;/code&gt; and &lt;code&gt;City&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 * FROM cypher('test',  $$ MATCH (a:Person), (b:City) WHERE a.bornIn = b.name CREATE (a)-[r:BORN_IN]-&amp;gt;(b) RETURN r $$) AS (r agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an edge between nodes with label &lt;code&gt;Person&lt;/code&gt; and &lt;code&gt;Tribe&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 * FROM cypher('test',  $$ MATCH (a:Person), (b:Tribe) WHERE a.tribe = b.name CREATE (a)-[r:IS]-&amp;gt;(b) RETURN r $$) AS (r agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Querying the graph&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To find out persons born in certain cities, we can query the graph with the statement:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ MATCH (a:Person)-[r]- (b:Tribe) WHERE a.tribe = b.name RETURN a, r, b $$) AS (a agtype, r agtype, b agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This will return all &lt;code&gt;Person&lt;/code&gt; nodes whose property &lt;code&gt;tribe&lt;/code&gt; matches the &lt;code&gt;name&lt;/code&gt; in &lt;code&gt;Tribe&lt;/code&gt; nodes.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM cypher('test',  $$ MATCH (a:Person)-[r]- (b:City) WHERE a.bornIn = b.name RETURN a, r, b $$) AS (a agtype, r agtype, b agtype);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This returns all &lt;code&gt;Person&lt;/code&gt; nodes whose property &lt;code&gt;bornIn&lt;/code&gt; matches the &lt;code&gt;name&lt;/code&gt; in &lt;code&gt;City&lt;/code&gt; nodes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
In this post, we created a graph using AGE, added nodes and edges to the graph and executed cypher queries to extract important data from the graph. This is just a simple illustration of how AGE can be effectively utilized for data acquisition and extraction in a network. Next up, we would be looking at how to visualize graphs and the results from queries using &lt;strong&gt;AGE Viewer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For more information on Apache AGE, visit:&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;AGE GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>database</category>
    </item>
    <item>
      <title>The Graph Analytics Revolution: Understanding the Dynamic Tool Driving Modern Technology</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Wed, 12 Apr 2023 13:39:46 +0000</pubDate>
      <link>https://dev.to/titoausten/the-graph-analytics-revolution-understanding-the-dynamic-tool-driving-modern-technology-5ff9</link>
      <guid>https://dev.to/titoausten/the-graph-analytics-revolution-understanding-the-dynamic-tool-driving-modern-technology-5ff9</guid>
      <description>&lt;p&gt;
Discovering how graphs function and their relevance in different fields requires an examination of graph analytics. Graphs are essential tools with countless practical applications such as social network analysis, cybersecurity concerns, and predictive analytics. This piece aims to reveal the intricacies behind this dynamic tool while highlighting its importance amid latest technological advancements.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Graph?&lt;/strong&gt;&lt;br&gt;
A Graph is a mathematical structure that is used to model various types of relationships in different systems. In simple terms, it is a collection of nodes or vertices connected by edges.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjxtj4skbzdwo0u3nwl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjxtj4skbzdwo0u3nwl7.png" alt="Graph Sample" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
The nodes or vertices (representing the entities) are connected by edges (representing relationships between those entities). Nodes can be people, groups, places, organisations, products, bank accounts, or devices. While examples of edges between nodes, include friendships, network connections, hyperlinks, roads, routes, wires, phone calls, emails, tweets, “likes,” or payments.&lt;/p&gt;

&lt;p&gt;Edges can have a one-way direction arrow to represent a relationship from one node to another, for example, if David “purchased” an item from Teke and Amos "reacted" to Lucky's Instagram post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiud7epfse85bt24620xz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiud7epfse85bt24620xz.png" alt="Graph with Two nodes, David and Teke, and an edge, purchase" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3sb98jqysv0qxrtzl17q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3sb98jqysv0qxrtzl17q.png" alt="Graph with Two nodes, Amos and Lucky, and an edge, like" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
However, edges can also be non-directional, like Marcos and Tito being connections on LinkedIn and Janet Jackson being a sibling to Michael Jackson.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57x3gnwfmjcqz6b1jm0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57x3gnwfmjcqz6b1jm0i.png" alt="Simple Graph image" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcsczzvpfhejh8yteg6d3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcsczzvpfhejh8yteg6d3.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Why Graphs?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;
Graph analytics can be used to determine the strength and direction of relationships between objects in a graph, such as analyzing relationships in social networks, cyber threat detection, and identifying the people most likely to buy a product based on shared preferences.
&lt;/p&gt;

&lt;p&gt;Graph analytics has been very effective in achieving the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detect financial crimes such as money laundering&lt;/li&gt;
&lt;li&gt;Identify fraudulent transactions and activities&lt;/li&gt;
&lt;li&gt;Perform influencer analysis in social network communities&lt;/li&gt;
&lt;li&gt;Do recommendation analysis from customers ratings or purchases&lt;/li&gt;
&lt;li&gt;Identify weaknesses in power grids, water grids, and transportation networks&lt;/li&gt;
&lt;li&gt;Optimize routes in the airlines, retail, and manufacturing industries&lt;/li&gt;
&lt;li&gt;Understanding how influence works so marketers can target the people who are most likely to create word-of-mouth awareness for their products&lt;/li&gt;
&lt;li&gt;Helping political campaigns and political scientists better understand the factors that contribute to information virality and the dissemination of fake news.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The application of graph analytics is ever-present and has proved powerful in a variety of fields, including cyber threat detection and social networks. Graph analysis enables us to represent multi-dimensional structures with ease while also simplifying the interpretation process thereof. This provides an array of insights that can be applied using Apache AGE by data scientists or business analysts among others, given their potential to inform better decision-making processes.&lt;/p&gt;

&lt;p&gt;For more information on Apache AGE, visit:&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;AGE GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>database</category>
    </item>
    <item>
      <title>Getting Started with Apache AGE: A Comprehensive Guide (Part 1)</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Wed, 05 Apr 2023 08:23:53 +0000</pubDate>
      <link>https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-1-39nj</link>
      <guid>https://dev.to/titoausten/getting-started-with-apache-age-a-comprehensive-guide-part-1-39nj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;
In this guide, we will walk through everything you need to know to get started with Apache AGE. Whether you’re an experienced graph database user or you’re just starting out, this guide will provide you with a detailed process to working with Apache AGE.
In this first part, we’ll cover the introduction and installation of Apache AGE. By the end of this tutorial, you should have a deep understanding of Apache AGE and have it installed.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Apache AGE?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgnngkn75bnwuil76ix7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgnngkn75bnwuil76ix7.png" alt="AGE Logo" width="512" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Apache AGE is an open-source graph database management system that provides a powerful and scalable solution for storing, managing and analyzing large-scale graph data. It is built as an extension of PostgreSQL and supports complex graph queries and provides fast query response times, making it an excellent choice over traditional relational database management systems.
With Apache AGE, users can gain deeper insights into data and make more informed decisions. Apache AGE is a tool you won’t want to overlook as a developer, data scientist or graph expert.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting up and Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apache AGE is built as an extension to PostgreSQl. Hence, you should have either PostgreSQL 11 or 12 installed on your device (AGE is only compatible with these versions as of the time of this post).&lt;br&gt;
For a step-by-step guide to install the required version, click &lt;a href="https://dev.to/titoausten/easy-guide-to-install-postgresql-from-source-code-on-windows-2k60"&gt;here&lt;/a&gt;.&lt;br&gt;
With PostgreSQL installed, follow the steps below to install AGE:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Clone the AGE repository in the same directory where you installed PostgreSQL.&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/apache/age.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;2. Move into the repository and change the branch to the latest version which is v1.1.0.&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd age
git checkout release/PG12/1.1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;3. Make &lt;code&gt;PG_CONFIG&lt;/code&gt; an environment variable and install.&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PG_CONFIG=/usr/local/pgsql-12/bin/pg_config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Or&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo make PG_CONFIG=/usr/local/pgsql-12/bin/pg_config install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;After installation, we initialize a database cluster to set up AGE on PostgreSQL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;initdb age_test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we start a server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pg_ctl -D age_test -l logfile start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;createdb age_testdb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start up PostgreSQL, create the extension, load the extension and set the &lt;code&gt;search_path&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;psql age_testdb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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;After initializing a DB, the AGE extension has to be loaded to start using it. This can be set in the &lt;code&gt;postgresql.conf&lt;/code&gt; located in the DB directory which will make AGE load automatically and also set the &lt;code&gt;search_path&lt;/code&gt;.&lt;br&gt;
To view installed extensions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\dx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
If age is listed, then it has been successfully installed.
&lt;/p&gt;

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

&lt;p&gt;
Setting up Apache AGE is just the first step in unlocking the power of graph data analytics. With Apache AGE, we can create complex graphs, store, manage, and query large-scale graph data with ease. As we move forward in this guide, we will explore the advanced features of Apache AGE and how to use this powerful system efficiently. In the next part, we would look at creating and analyzing graphs.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;Apache AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;Apache AGE project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>graphdatabase</category>
      <category>database</category>
    </item>
    <item>
      <title>Understanding The Process and Memory Architecture of PostgreSQL</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Tue, 21 Mar 2023 09:58:28 +0000</pubDate>
      <link>https://dev.to/titoausten/understanding-the-process-and-memory-architecture-of-postgresql-5hhp</link>
      <guid>https://dev.to/titoausten/understanding-the-process-and-memory-architecture-of-postgresql-5hhp</guid>
      <description>&lt;p&gt;In my &lt;a href="https://dev.to/titoausten/easy-guide-to-install-postgresql-from-source-code-on-windows-2k60"&gt;last article&lt;/a&gt;, I covered the steps to install PostgreSQL easily and stated that I would also share steps to install AGE. However, I think it is important to share what happens in the background while running PostgreSQL before installing AGE. This post covers the summary of the process and memory architecture of PostgreSQL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROCESS ARCHITECTURE&lt;/strong&gt;&lt;br&gt;
A PostgreSQL server is a series of various processes cooperatively managing a database cluster (recall that to initialize a cluster, &lt;code&gt;initdb cluster_name&lt;/code&gt; is executed).&lt;br&gt;
The server contains the following processes which will be explained in detail:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Postgres server process&lt;/li&gt;
&lt;li&gt;Backend process&lt;/li&gt;
&lt;li&gt;Background process&lt;/li&gt;
&lt;li&gt;Replication associated process&lt;/li&gt;
&lt;li&gt;Background worker process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only the first three types are covered here with more emphasis on the first two. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Postgres Server Process&lt;/strong&gt; (earlier called the ‘postmaster’) is the parent process related to the management of the database cluster. It is started by executing &lt;code&gt;pg_ctl -D dbname -l logfile start&lt;/code&gt;. It starts various processes except the backend process after allocating a shared memory area in memory. It waits for requests from clients to connect and starts the backend process when receiving that request. The server’s default port is 5432 and this is the only port it listens to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend Processes&lt;/strong&gt; (known as ‘postgres’) is started by the postgres server process which was earlier mentioned. This process handles all queries by a connected client. It only operates on one database; the client has to specify the database when connecting to a server like so &lt;code&gt;pg_ctl -D dbname -l logfile start&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background Processes&lt;/strong&gt; - this process is made up of some functions that are quite complicated and depends on specific features. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;MEMORY ARCHITECTURE&lt;/strong&gt; &lt;br&gt;
This can be classified into two categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local memory area&lt;/li&gt;
&lt;li&gt;Shared memory area&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local Memory Area&lt;/strong&gt; - this is allocated by each backend process for processing queries and is divided into sub-areas with fixed or varying sizes.
The major sub-areas are &lt;code&gt;work_mem&lt;/code&gt;, &lt;code&gt;maintenance_work_mem&lt;/code&gt;, and &lt;code&gt;temp_buffers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared Memory Area&lt;/strong&gt; is automatically allocated when the PostgreSQL server starts. Unlike the local memory area with fixed and varying sizes for sub-areas, the sizes for sub-areas of the shared memory area are fixed.
The major sub-areas are &lt;code&gt;shared buffer pool&lt;/code&gt;, &lt;code&gt;WAL (Write Ahead Logging) buffer&lt;/code&gt;, and &lt;code&gt;commit log&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;CONCLUSION&lt;/strong&gt;&lt;br&gt;
Understanding the working processes of the software platform that one is utilizing is highly essential, as it facilitates debugging and efficient utilization. To delve deeper into the architecture of PostgreSQL, please refer to the resources section below for information on the Internals of PostgreSQL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RESOURCES&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.interdb.jp/pg/pgsql02.html"&gt;The internals of PostgreSQL&lt;/a&gt;&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;Apache AGE website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;Apache AGE project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>database</category>
    </item>
    <item>
      <title>Easy Guide to Install PostgreSQL from Source code on Windows</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Thu, 16 Mar 2023 09:44:57 +0000</pubDate>
      <link>https://dev.to/titoausten/easy-guide-to-install-postgresql-from-source-code-on-windows-2k60</link>
      <guid>https://dev.to/titoausten/easy-guide-to-install-postgresql-from-source-code-on-windows-2k60</guid>
      <description>&lt;p&gt;As promised in my earlier post, I stated that I would be sharing a lot about my internship experience, AGE project and how to effectively utilize it. Firstly, this post covers the installation of PostgreSQL which is the foundation on which AGE is built and to be used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT IS POSTGRESQL?&lt;/strong&gt;&lt;br&gt;
PostgreSQL is a very powerful open-source relational database management system (RDBMS) known for its robustness, reliability, and extensibility. It supports a wide range of SQL features and data types and provides advanced functionality such as support for geographical information systems, full-text search, and JSON data. It also supports transaction processing, multi-version concurrency control, and can be run on a variety of operating systems, including Windows, Linux, and macOS.&lt;br&gt;
These characteristics has made it a popular choice for a wide range of applications, from small-scale projects to large enterprise systems. For more information, click &lt;a href="https://postgresql.org"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INSTALLATION&lt;/strong&gt; &lt;br&gt;
Apache AGE cannot be installed on Windows yet but it is still possible to use it by installing Windows Subsystem for Linux (WSL). PostgreSQL can be installed on Windows but for this setup, it is advisable to install both PostgreSQL and AGE through WSL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Installing WSL&lt;/strong&gt;&lt;br&gt;
Open the command prompt and enter the following commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl –install
wsl –update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install the Linux system. After the installation of WSL, you can make use of it in the command prompt by entering the command.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Upon running for the first time, a username and password will be requested.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Installing PostgreSQL&lt;/strong&gt;&lt;br&gt;
You should install either versions 11 or 12 of PostgreSQL as they are the versions currently compatible with Apache AGE. To successfully install PostgreSQL, some dependencies are very important and should be within the system.&lt;br&gt;
Install the dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install git libreadline-dev zlib1g-dev bison flex build-essential
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a directory to clone the PostgreSQL repository.&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
git clone https://git.postgresql.org/git/postgresql.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Move into the cloned repository and change the branch to any of the compatible versions (version 12 in this case).&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
git checkout REL_12_STABLE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compile the code by passing the directory where resulting binaries from the compilation will be installed. The compilation process would take some time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./configure –prefix=/usr/local/pgsql-12 
make
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When compilation is completed, add permissions to the binaries directory and then install PostgreSQL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mkdir /usr/local/pgsql-12
sudo chown [user] /usr/local/pgsql-12
make install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the path to the PostgreSQL’s bin and data directories to environment variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PATH=/usr/local/pgsql-12/bin/:$PATH
export PGDATA=/usr/local/pgsql-12/bin/data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PostgreSQL is successfully installed. To make use of it, a cluster has to be initialized first using the 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;initdb 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above command initializes a default cluster. To initialize another cluster, you would have to add the name after the command, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;initdb test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After initializing a cluster, start the server and create a database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pg_ctl -D test –l logfile start
createdb test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To execute the above, you must have moved into the bin directory where PostgreSQL was installed.&lt;/p&gt;

&lt;p&gt;Start PostgreSQL with the 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;psql test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To exit PostgreSQL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stop the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pg_ctl -D test –l logfile stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To learn more about the installation of PostgreSQL 12, you can click &lt;a href="https://postgresql.org/docs/12/installation.html"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CONCLUSION&lt;/strong&gt;&lt;br&gt;
So that’s how to successfully install the compatible version of PostgreSQL for Apache AGE. If you have challenges or questions relating to the installation process, you can reach out to me.&lt;br&gt;
In the next post, I will show you easy steps on how to install AGE. I had some challenges doing that and I would not want anyone else to face that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contribute to Apache AGE&lt;/strong&gt;&lt;br&gt;
Website: &lt;a href="https://age.apache.org"&gt;https://age.apache.org&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/apache/age"&gt;https://github.com/apache/age&lt;/a&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>apacheage</category>
      <category>database</category>
    </item>
    <item>
      <title>Week 1 as a Software Engineering Intern</title>
      <dc:creator>Tito Osadebey</dc:creator>
      <pubDate>Thu, 09 Mar 2023 10:39:23 +0000</pubDate>
      <link>https://dev.to/titoausten/week-1-as-a-software-engineering-intern-2217</link>
      <guid>https://dev.to/titoausten/week-1-as-a-software-engineering-intern-2217</guid>
      <description>&lt;p&gt;This is going to be a lengthy journey filled with tales, so I implore you to stay with me and follow along.&lt;/p&gt;

&lt;p&gt;Back in December 2022, I was in the process of job hunting when I stumbled upon an internship opportunity at &lt;strong&gt;Bitnine Global Inc.&lt;/strong&gt;. Despite facing location challenges throughout my job search, I persevered and applied for the position, thanks to having the requisite skills.&lt;/p&gt;

&lt;p&gt;After a while, I received an email notifying me of a coding test for the position I applied for and I was quite anxious on what to expect and how to revise for this test. However, I refused to let fear consume me and completed the test, quite challenging but I loved it.&lt;/p&gt;

&lt;p&gt;Some weeks later, I received another email congratulating me on my successful completion of the coding test and inviting me to the next stage, which was an interview. I was understandably nervous, but I reached out to some already serving interns for advice, which proved to be invaluable and ultimately helped me secure the position.&lt;/p&gt;

&lt;p&gt;Upon starting the internship, I received a link to the onboarding process, which was impressive. My Operations Manager has been incredibly supportive, and I truly appreciate that about him. However, when I was assigned to the &lt;strong&gt;AGE&lt;/strong&gt; project, I knew it would be a an awesome experience and I was up for it and ready to embrace the opportunity.&lt;/p&gt;

&lt;p&gt;After the meeting, I spent a significant amount of time installing the required dependencies and software, conducting research, watching videos, and reading. The information was overwhelming, but I enjoyed being very active.&lt;/p&gt;

&lt;p&gt;When I successfully completed the installation, I tried some &lt;br&gt;
examples out and I was amazed by the beauty of &lt;strong&gt;Apache AGE&lt;/strong&gt; and &lt;strong&gt;AGE VIEWER&lt;/strong&gt;. The software provided an incredible way to study, query, relate with, and visualize data. I'm still poring over the documentation, taking my time to fully understand everything about the project because I believe it will revolutionize how data is utilized. I'm excited to see how it will be implemented in the AI and Robotics space.&lt;/p&gt;

&lt;p&gt;That's all for week one though, I'll be posting regularly about this experience and tips on how to utilize Apache AGE. Don't forget to follow me.&lt;/p&gt;

&lt;p&gt;For more information about the project, visit:&lt;br&gt;
&lt;a href="https://age.apache.org"&gt;Apache AGE&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/apache/age"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>postgres</category>
      <category>career</category>
    </item>
  </channel>
</rss>
