samedi 7 mars 2015

SQLITE: Single table with 20 columns vs 20 key-value tables

I'm developing system that manages objects consisting of components. What would the best way to store them in SQLITE database from performance point of view? if there are 20 component types each component is a blob 1-10Kb size. Typically each object consists of 4-6 different components.


I can see two options:



  1. Implement it as one table with key and 20 blob columns

  2. Use 20 tables with key and single blob column


The only queries I will make to database are: get component data by id, write data and remove data.


Aucun commentaire:

Enregistrer un commentaire