• @[email protected]
    link
    fedilink
    81 year 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.

    • @[email protected]
      link
      fedilink
      101 year 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

    • @[email protected]
      link
      fedilink
      4
      edit-2
      1 year 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.

    • @[email protected]
      link
      fedilink
      English
      41 year ago

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

    • JackbyDev
      link
      English
      31 year ago

      If it works then it works.

    • Drew
      link
      fedilink
      21 year ago

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