<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Database on JOURNAL.ROBBI.MY</title><link>https://journal.robbi.my/tags/database/</link><description>Recent content in Database on JOURNAL.ROBBI.MY</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 30 Jun 2026 03:01:59 +0000</lastBuildDate><atom:link href="https://journal.robbi.my/tags/database/index.xml" rel="self" type="application/rss+xml"/><item><title>Stop Saying Django Can’t Do Microservices—You’re Just Doing It Wrong</title><link>https://journal.robbi.my/indieweb/250712045545/</link><pubDate>Sat, 12 Jul 2025 04:55:45 +0800</pubDate><guid>https://journal.robbi.my/indieweb/250712045545/</guid><description>&lt;p&gt;Mirror:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://archive.ph/T8IER#selection-873.17-873.26"&gt;archive.today&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web.archive.org/web/2/https://medium.com/@Am_Issath/stop-saying-django-cant-do-microservices-you-re-just-doing-it-wrong-3af40b1af32d"&gt;wayback machine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>[PART 2] Spring Boot - Multiple datasource (database) with JDBC and JPA</title><link>https://journal.robbi.my/posts/241102093844/</link><pubDate>Sat, 02 Nov 2024 09:38:44 +0800</pubDate><guid>https://journal.robbi.my/posts/241102093844/</guid><description>&lt;p&gt;We start with &lt;code&gt;postgreSQL&lt;/code&gt; because this our primary database connection and we do all CRUD stuff from here. We need 2 class, which use for connection and configuration of datasource.&lt;/p&gt;
&lt;h3 id="datasourceconfigurationpostgresql"&gt;DatasourceConfigurationPostgreSQL&lt;/h3&gt;
&lt;div class="code-block"&gt;
 &lt;div class="code-header font-mono"&gt;
 &lt;span class="code-lang"&gt;java&lt;/span&gt;
 &lt;div class="code-window-controls"&gt;
 &lt;button class="code-copy" onclick="copyCode(this)" title="Copy to clipboard"&gt;📋 Copy&lt;/button&gt;
 &lt;span class="ctrl-min"&gt;&lt;/span&gt;
 &lt;span class="ctrl-max"&gt;&lt;/span&gt;
 &lt;span class="ctrl-close"&gt;&lt;/span&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="code-content"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;package&lt;/span&gt; com.robbi.demo.config.postgresql;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; javax.sql.DataSource;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; org.slf4j.Logger;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; org.springframework.boot.context.properties.ConfigurationProperties;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; org.springframework.context.annotation.Bean;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; org.springframework.context.annotation.Configuration;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; org.springframework.context.annotation.Primary;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; com.robbi.demo.utils.LoggerFactoryUtil;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;@Configuration
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;public&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;class&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;DatasourceConfigurationPostgreSQL&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#8be9fd;font-style:italic"&gt;private&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;static&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;final&lt;/span&gt; Logger LOG &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; LoggerFactoryUtil.&lt;span style="color:#50fa7b"&gt;getLogger&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; @Bean
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; @ConfigurationProperties(&lt;span style="color:#f1fa8c"&gt;&amp;#34;spring.datasource.postgresql&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;public&lt;/span&gt; DataSourceProperties &lt;span style="color:#50fa7b"&gt;dataSourcePropertiesPostgreSQL&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		LOG.&lt;span style="color:#50fa7b"&gt;info&lt;/span&gt;(&lt;span style="color:#f1fa8c"&gt;&amp;#34;spring.datasource.postgresql&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;return&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;new&lt;/span&gt; DataSourceProperties();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; @Bean
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; @Primary
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;public&lt;/span&gt; DataSource &lt;span style="color:#50fa7b"&gt;dataSourcePostgreSQL&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		LOG.&lt;span style="color:#50fa7b"&gt;info&lt;/span&gt;(&lt;span style="color:#f1fa8c"&gt;&amp;#34;Initializing PostgreSQL DataSource: {}&amp;#34;&lt;/span&gt;, dataSourcePropertiesPostgreSQL().&lt;span style="color:#50fa7b"&gt;getUrl&lt;/span&gt;());
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	 &lt;span style="color:#ff79c6"&gt;return&lt;/span&gt; dataSourcePropertiesPostgreSQL()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	 .&lt;span style="color:#50fa7b"&gt;initializeDataSourceBuilder&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	 .&lt;span style="color:#50fa7b"&gt;build&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Take note on anotation &lt;code&gt;@ConfigurationProperties&lt;/code&gt; and &lt;code&gt;@Primary&lt;/code&gt; that I applied here.&lt;/p&gt;</description></item><item><title>[PART 1] Spring Boot - Multiple datasource (database) with JDBC and JPA</title><link>https://journal.robbi.my/posts/240929095904/</link><pubDate>Sun, 29 Sep 2024 09:59:04 +0800</pubDate><guid>https://journal.robbi.my/posts/240929095904/</guid><description>&lt;p&gt;Assalamualaikum and hello! Spring Boot&amp;rsquo;s streamlined development process makes it a popular choice for many developers.
However, configuring it for multiple databases can present challenges.
While there are various tutorials available, I&amp;rsquo;ve encountered issues with their completeness and clarity.
In this tutorial, I&amp;rsquo;ll provide a detailed solution to this problem.&lt;/p&gt;
&lt;h2 id="database"&gt;Database&lt;/h2&gt;
&lt;p&gt;We require a connection to two databases: an existing MSSQL database and a new PostgreSQL database.
The PostgreSQL database will be used for all standard CRUD operations (create, read, update, delete).
The MSSQL database will be accessed in a read-only manner to retrieve specific data without making any modifications to its structure or content.&lt;/p&gt;</description></item><item><title>Learn Microservices with Spring Boot 3 : A Practical Approach Using Event-Driven Architecture, Cloud-Native Patterns, and Containerization</title><link>https://journal.robbi.my/reading/240316101119/</link><pubDate>Sat, 16 Mar 2024 10:11:19 +0800</pubDate><guid>https://journal.robbi.my/reading/240316101119/</guid><description>&lt;p&gt;&lt;img src="https://journal.robbi.my/reading/240316101119/9781484297568-us.jpg" alt=""
 class="mx-auto block cursor-zoom-in"
 data-zoomable
 loading="lazy" /&gt;
&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Title&lt;/th&gt;
 &lt;th&gt;Author&lt;/th&gt;
 &lt;th&gt;Status&lt;/th&gt;
 &lt;th&gt;Rating&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;9781484297568 - Learn Microservices with Spring Boot 3 : A Practical Approach Using Event-Driven Architecture, Cloud-Native Patterns, and Containerization&lt;/td&gt;
 &lt;td&gt;Moisés Macero García, Tarun Telang&lt;/td&gt;
 &lt;td&gt;Finished&lt;/td&gt;
 &lt;td&gt;3.5/5&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;</description></item><item><title>23 11 29 0631_eclipse Birt Report</title><link>https://journal.robbi.my/indieweb/231129063142/</link><pubDate>Wed, 29 Nov 2023 06:31:42 +0800</pubDate><guid>https://journal.robbi.my/indieweb/231129063142/</guid><description>&lt;p&gt;Mirror:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://web.archive.org/web/20231128223821/https://www.vogella.com/tutorials/EclipseBIRT/article.html"&gt;Wayback Machine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://archive.today/2023.11.28-223751/https://www.vogella.com/tutorials/EclipseBIRT/article.html"&gt;Archive Today&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>One To Many - Many To One (JPA and Hibernate)</title><link>https://journal.robbi.my/posts/210607120000/</link><pubDate>Mon, 07 Jun 2021 00:00:00 +0000</pubDate><guid>https://journal.robbi.my/posts/210607120000/</guid><description>&lt;nav id="TableOfContents"&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#intro"&gt;Intro&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#database-design"&gt;Database design&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#unidirectional-implementation"&gt;Unidirectional implementation&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#model"&gt;Model&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#table---customer"&gt;Table - Customer&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#table---cart"&gt;Table - Cart&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#details-and-explaination"&gt;Details and explaination&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#bidirectional-implementation"&gt;Bidirectional implementation&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#model-1"&gt;Model&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#table---customer-1"&gt;Table - Customer&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#table---order"&gt;Table - Order&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#details-and-explaination-1"&gt;Details and explaination&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#side-note"&gt;Side note&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;/nav&gt;

&lt;h2 id="intro"&gt;Intro&lt;/h2&gt;
&lt;p&gt;Nowadays, programming evolve and growth rapidly from time to time but most of problem and issue that we want to solve have same design concept in many ways.&lt;/p&gt;
&lt;p&gt;Today, I want to wrote something about relational database system. The topic today are about &lt;code&gt;one-to-many&lt;/code&gt; / &lt;code&gt;many-to-one&lt;/code&gt; association relationship. It about a links of multiple tables based on a FK (Foreign Key) column which that the child table record references back to the PK (Primary Key) of the parent table row data. I also will touch &lt;code&gt;unidirectional&lt;/code&gt; and &lt;code&gt;bidirectional&lt;/code&gt; propagation.&lt;/p&gt;</description></item></channel></rss>