You are viewing a single thread.
View all comments
8 points

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

permalink
report
reply
10 points

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

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
4 points

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

permalink
report
parent
reply
4 points
*

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.

permalink
report
parent
reply
3 points

If it works then it works.

permalink
report
parent
reply
2 points

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

permalink
report
parent
reply
1 point

then you can happily switch to mongoDB

permalink
report
parent
reply

Memes

!memes@lemmy.ml

Create post

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.

Community stats

  • 8.5K

    Monthly active users

  • 13K

    Posts

  • 288K

    Comments