<?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>Forem: ERICK MIRANDA G</title>
    <description>The latest articles on Forem by ERICK MIRANDA G (@erick_mirandag_aea76fba9).</description>
    <link>https://forem.com/erick_mirandag_aea76fba9</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%2F3858547%2F05e19223-663b-40d6-a8c0-deb01ac13059.png</url>
      <title>Forem: ERICK MIRANDA G</title>
      <link>https://forem.com/erick_mirandag_aea76fba9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/erick_mirandag_aea76fba9"/>
    <language>en</language>
    <item>
      <title>Where should I handle inserting data into multiple related tables: frontend or backend?</title>
      <dc:creator>ERICK MIRANDA G</dc:creator>
      <pubDate>Fri, 03 Apr 2026 02:06:24 +0000</pubDate>
      <link>https://forem.com/erick_mirandag_aea76fba9/where-should-i-handle-inserting-data-into-multiple-related-tables-frontend-or-backend-2cp5</link>
      <guid>https://forem.com/erick_mirandag_aea76fba9/where-should-i-handle-inserting-data-into-multiple-related-tables-frontend-or-backend-2cp5</guid>
      <description>&lt;p&gt;My current structure is:&lt;/p&gt;

&lt;p&gt;Table&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Order&lt;/li&gt;
&lt;li&gt;Product &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the UI, the user creates a new order and dynamically adds multiple products to it within the same interface. When the user finishes, there is only one submit button that sends all the information.&lt;/p&gt;

&lt;p&gt;For example, should the frontend send multiple requests (one for the order and others for products), or should it send one request containing everything and let the backend manage database operations?&lt;/p&gt;

&lt;p&gt;Additionally, the products are not reused. Each product is unique and is created at the moment the user submits the order. In other words, products do not exist beforehand in a catalog; they are generated dynamically as part of the order creation process.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>database</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
