Database is organized collection of data, so a disk full of porn in different formats from json to mp4 can be a database, as long as it’s organized in some way

I am interested in your json porn.

@hemko@lemmy.dbzer0.com
link
fedilink
English
15
edit-2
4M
{
  "act1": {
    "position": "reverse cowgirl"
    "etc...": {}
  }
}

Not sure what you expected

Edit: also found this https://json-porn.com/

Oh God, don’t watch the etc porn! You’ll never be able to unsee it…

It’s so straight. I prefer yaml porn

For real. Numbers are strings? Yeah, okay.

YAML is better. UCL porn though. 🥵 Things are getting niche when UCL shows up.

Victor
link
fedilink
04M

as long as it’s organized in some way

Right? Organized, structured, same thing, or? A database can’t have no structure, right? I don’t even know how one would create such a database.

At a certain level all data is a pair (some name, blob of bytes). You can concatenate sequences of those pairs into a tar archive and call that a database. To access “the last object” you’d have to seek over the “first” objects. So you can build another set of (some name, blob of bytes) that serves as an index into the first set. You’ll first have to do at least one full pass over that first set, and you’ll need to make space on the books to account for twice as many sets, AND you’ll still have to do some seeking over the “first objects” in the indexing collection, but it all keeps recall times very short!

What do you mean by “no structure”? Afaik mongodb does not enforce a schema in a collection by default

Victor
link
fedilink
34M

Ah yes, mongo and document databases, forgot about those. Yeah those could be a pain to get data from if there’s no structure. 😅

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog