<?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: Goitsemodimo Phaks</title>
    <description>The latest articles on DEV Community by Goitsemodimo Phaks (@goitsemodimo_phaks_04f738).</description>
    <link>https://dev.to/goitsemodimo_phaks_04f738</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3989752%2F2a40b2e5-1515-4dff-bcb2-f7744daff142.png</url>
      <title>DEV Community: Goitsemodimo Phaks</title>
      <link>https://dev.to/goitsemodimo_phaks_04f738</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/goitsemodimo_phaks_04f738"/>
    <language>en</language>
    <item>
      <title>The PostgreSQL mental model that finally clicked for me</title>
      <dc:creator>Goitsemodimo Phaks</dc:creator>
      <pubDate>Fri, 19 Jun 2026 17:37:44 +0000</pubDate>
      <link>https://dev.to/goitsemodimo_phaks_04f738/the-postgresql-mental-model-that-finally-clicked-for-me-3kle</link>
      <guid>https://dev.to/goitsemodimo_phaks_04f738/the-postgresql-mental-model-that-finally-clicked-for-me-3kle</guid>
      <description>&lt;h2&gt;
  
  
  What i was learning
&lt;/h2&gt;

&lt;p&gt;Today i started learning &lt;strong&gt;PostgreSQL&lt;/strong&gt; , the objective was to create a mental model to build a strong foundation and potentially a smooth learning curve for &lt;strong&gt;PostgreSQL&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What confused me
&lt;/h2&gt;

&lt;p&gt;Coming from SQLite, confusion was inevitable.The initial assumption was that PostgreSQL would be smooth, that perhaps all i needed to do was change the app configuration from SQLite to PostgreSQL and everything else would remain untouched.&lt;/p&gt;

&lt;p&gt;To my surprise, the reality was a complete contradiction . I had to adopt an entirely different mental model.Unlike SQLite, PostgreSQL is not a file , its a database service.&lt;br&gt;
I had to research deeper , I needed to understand why PostgreSQL's service label was crucial.&lt;/p&gt;

&lt;p&gt;Grounded on this curiosity, intuition started to kick in and here is what i learned:&lt;/p&gt;

&lt;h2&gt;
  
  
  What clicked
&lt;/h2&gt;

&lt;p&gt;I had to simplify everything and focus on one key word "Service".&lt;br&gt;
A service in the context of PostgreSQL highlighted an interesting difference between the two (PostgreSQL and SQLite).&lt;br&gt;
SQLite is simply a file inside the application(in my case a flask application).It is &lt;strong&gt;inside&lt;/strong&gt; the application , everything that is concerned with the database is inside that file.&lt;/p&gt;

&lt;p&gt;PostgreSQL is a data-service , it is independent of the application and it is initiated with "sudo systemctl start postgresql" in linux. The command initiates PostgreSQL and it continues to run in the background from then , hence the root of its independence from the application.PostgreSQL is self managed, it manages permissions, roles etc .&lt;br&gt;
It does everything SQLite does and more.&lt;br&gt;
What i found fascinating was Role Based Access Control(RBAC).PostgreSQL recognizes roles rather than users. A role is attached with permissions, that means the permissions an application has on the database depends on the role and permission connected to the application. PostgreSQL's equivalent of linux's sudo is postgres, its a database inside Postgesql and it has access to all permissions.Building secure applications stems from this knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  my takeaway
&lt;/h2&gt;

&lt;p&gt;The mental shift was no easy task but the reward was appealing.Linking a database to web security made the  complexity of PostgreSQL click.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>learning</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
