<p>db-sync is insert only. You need to be able to see what the state was at any particular point in time. If it modified rows that wouldn't allow you to do so.</p>

CC BY-SA 4.0
2022-03-12T17:19:03.227Z
Got it. But for my purposes (analysis) lt seems like can merge the tables without messing up the data. Cool.
Reddspark
CC BY-SA 4.0
2022-03-11T16:08:15.673Z
2022-03-11T16:08:15.673Z
Samuel Leathers
<p>If I've understood the dbsync schema properly then the <code>tx_in</code> table is completely unnecessary. The two fields (<code>tx_in_id</code> &amp; <code>redeemer_id</code>) should just be brought into the <code>tx_out</code> table and left null when a UTXO has not yet been consumed. This would be far more intuitive, or am I missing something?</p>

<cardano-db-sync>
Is it me or is the tx_in table completely unnecessary in dbSync?
# Is it me or is the tx_in table completely unnecessary in dbSync?

(Asked by: username_0 on 2022-03-11)

If I've understood the dbsync schema properly then the `tx_in` table is completely unnecessary. The two fields (`tx_in_id` & `redeemer_id`) should just be brought into the `tx_out` table and left null when a UTXO has not yet been consumed. This would be far more intuitive, or am I missing something?

**Tags:** cardano-db-sync

---

## 1 answers

### Answer by username_1 on 2022-03-11. Score: 1

db-sync is insert only. You need to be able to see what the state was at any particular point in time. If it modified rows that wouldn't allow you to do so.

> **Comments:**
> **username_0**: Got it. But for my purposes (analysis) lt seems like can merge the tables without messing up the data. Cool.  

---

