# Replace DB by metadata (object storage)

**URL:** <https://forum.storj.io/t/replace-db-by-metadata-object-storage/3202>\
**Category:** Ideas & Suggestions\
**Created:** [December 14, 2019, 11:22am UTC](https://forum.storj.io/t/replace-db-by-metadata-object-storage/3202 "2019-12-14T11:22:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eioz](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/eioz/32/62_2.png) [@Eioz](https://forum.storj.io/u/Eioz)\
**Post date:** [December 14, 2019, 11:22am UTC](https://forum.storj.io/t/replace-db-by-metadata-object-storage/3202/1 "2019-12-14T11:22:31Z")

</div>

Hello, I would like to suggest this to the community developers.

## ############## REPLACE DB BY METAS ##########

1. Architecture with SQL Lite DB  
I guess that DB can be corrupt in a software SPOF (Single point of failure) model (on 1 storage node)  
DB corruption will not ensure a SN to cummunicate with the network.  
Exemple : pieceinfo.db, this file can be corrupt because of a system crash and sync problem

 ![](https://cdn.pixabay.com/photo/2016/12/09/18/30/database-schema-1895779_960_720.png)

1. Architecture without DB  
Database is underlied with metadata resulting to a no-SPOF architecture  
Descriptors (metas) file XML/Json is uploaded with piece and contain link to the piece

ENCAPSULED USER FILE :

- CONTENT (unmodified)
- META#1 = PIECEINFO
- META#2 = PIECEEXPIRATION
- META#3 = PECESPACEDDUSED
- META#4 = PIECEMETA

ENCAPSULED SATELLITES INTERNAL DB FILE

- CONTENT = TXT
- META#1 = INTERNALDBFILE  
 → Parse and update TXT element with regular expressions and separator

![](https://www.researchgate.net/profile/Chiao_Fe_Shu/publication/220465180/figure/fig7/AS:667632747429890@1536187459188/A-fragment-of-object-track-meta-data-represented-in-XML.ppm)

In case of issue with DB :  
DB is corrupted and there is many elements to correct in the DB because of relations in the database ( SQLite is a relational database)

In case of issue with metadata :  
File is corrupted and can be updated again by another storage node in case of crash, maintening files consistences over the network.

Thanks.

I don’t know if research are performed for this subject actually.

Best regards.
