Dataset Viewer
Auto-converted to Parquet Duplicate
version
int64
created
int64
file
string
sha256
string
count
int64
embedding_model
null
1
1,781,035,603
barcode-v1.sqlite
922534be8c34c4e86cc05a11239ca27f612fe94af779d95f2b6d379bf5cc53da
78,721
null

SlowestLooser barcode database

A versioned barcode → nutrition lookup table consumed by the SlowestLooser iOS app. Ships as a single SQLite file per release, with a JSON manifest carrying the integer version + SHA-256.

The app polls manifest.json at launch and on user-tap from Settings → Barcode-Datenbank. When manifest.version is greater than the installed version (App Group UserDefaults), the artifact is downloaded, SHA-256-verified, and atomically swapped into Application Support/BarcodeDB/barcode.sqlite. No app update, no App Store review.

Files

File Purpose
manifest.json { version, created, file, sha256, count, embedding_model } — the version pointer
barcode-vN.sqlite The actual database (schema below)

Schema

food(    id TEXT PRIMARY KEY,
         label TEXT NOT NULL, brand TEXT,
         kcal REAL, protein REAL, carbs REAL, fat REAL, serving_size REAL );
barcode( code TEXT PRIMARY KEY, food_id TEXT NOT NULL );
CREATE INDEX idx_barcode_food ON barcode(food_id);

food_fts USING fts5( label, brand, content='food', content_rowid='rowid',
                     tokenize='trigram remove_diacritics 1' );
  • food — one row per product. Nutrition values are typed REAL (no string parsing at lookup time).
  • barcode — many-to-one: a product can have several regional EANs / UPCs, all pointing at the same food_id. Codes are canonicalized to EAN-13 at build time (9–13-digit codes left-padded; EAN-8 left as-is).
  • food_fts — trigram FTS5 over (label, brand) with diacritic folding. Enables substring + German-compound recall ("apfel""Apfelsaft", "schoko""Vollmilchschokolade", "musli""Müsli").

Versioning

The integer in manifest.version is monotonic and bumped on every rebuild. Clients compare it against the locally installed version; the SHA-256 in the manifest is verified against the downloaded SQLite before swap. A mismatched download leaves the existing DB untouched.

License + Attribution

This dataset is a derivative work of Open Food Facts and is released under the Open Database License (ODbL) v1.0 — the same license as the source data.

What ODbL requires of you (the reuser)

  1. Attribution: Credit Open Food Facts when you reuse this dataset (or works derived from it). Example notice: "Includes product data from Open Food Facts, used under the Open Database License v1.0."
  2. Share-Alike: If you publish a database derived from this one, that derivative must also be under the ODbL.
  3. Keep Open: If you distribute the database (or a derivative) with technical protection measures, you must also provide a version without them.

The full license text is at https://opendatacommons.org/licenses/odbl/1-0/.

Source attribution

Build pipeline (for maintainers)

cd support/vectordb
python3 build_barcode_db.py \
    --input data/processed/nutrition_merged.jsonl \
    --outdir dist \
    --version N            # monotonic, bump every rebuild

# then publish:
hf upload --repo-type dataset Juhuu/slowestlooser-barcodes \
    dist/barcode-vN.sqlite barcode-vN.sqlite
hf upload --repo-type dataset Juhuu/slowestlooser-barcodes \
    dist/manifest.json manifest.json

Full handbook: support/vectordb/BARCODE_DB.md. Architectural rationale: ADR 009.

Downloads last month
71