1509
You have 1 wish... (sh.itjust.works)
submitted 11 months ago by borth@sh.itjust.works to c/memes@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Asudox@lemmy.world 8 points 11 months ago

Kind of related question: Is it okay for me to use JSON as a small DB? I just store basic blog page data there.

[-] nierot@lemm.ee 10 points 11 months ago

I mean it will work, but for a blog I'd store the pages in markdown files, to make it easier to edit. For context, look into how Hugo works

[-] Asudox@lemmy.world 3 points 11 months ago

I thought of that as well. I might switch to that. It will make the organization better anyways.

[-] slacktoid@lemmy.ml 4 points 11 months ago

TinyDB literally does this. in general its more of does this work for my use case and am i aware of its limitations.

[-] kono_throwaway_da@sh.itjust.works 4 points 11 months ago* (last edited 11 months ago)

A few circumstances to consider...

If it's just your own little tool and you don't intend to share it with others: do whatever you want. SQL or NoSQL or JSON, it doesn't matter. Use your own judgement.

In my experience tho most homegrown JSON-based "databases" tend to load all data into the memory, simply because they are very simplistic (serialize everything into JSON and write to disk, deserialize everything into a struct). If your dataset is too big for that, just go straight for a full-fledged database.

[-] JackbyDev@programming.dev 3 points 11 months ago

If it works then it works.

[-] crmsnbleyd@sopuli.xyz 2 points 11 months ago

yep, though IO might bottleneck you at some point, and then you can happily switch to mongoDB

[-] droans@lemmy.world 1 points 11 months ago

then you can happily switch to mongoDB

this post was submitted on 13 Sep 2023
1509 points (98.9% liked)

Memes

44808 readers
2927 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS