this post was submitted on 22 Jun 2024
816 points (98.7% liked)

Programmer Humor

32501 readers
470 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 11 points 5 months ago (2 children)

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

[–] [email protected] 11 points 5 months ago (2 children)

I am interested in your json porn.

[–] [email protected] 15 points 5 months ago* (last edited 5 months ago) (1 children)
{
  "act1": {
    "position": "reverse cowgirl"
    "etc...": {}
  }
}

Not sure what you expected

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

[–] [email protected] 5 points 4 months ago

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

[–] [email protected] 2 points 4 months ago (1 children)

It's so straight. I prefer yaml porn

[–] [email protected] 2 points 4 months ago

For real. Numbers are strings? Yeah, okay.

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

[–] [email protected] 0 points 4 months ago (2 children)

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.

[–] [email protected] 2 points 4 months ago

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!

[–] [email protected] 2 points 4 months ago (1 children)

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

[–] [email protected] 3 points 4 months ago

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