6
nosoup4u
110d

I'm pretty familiar with SQL. It used to scare me, but now, years on, I'm super comfortable with it, and I don't really get why anyone would need anything else, generally speaking. Having said that, just tried to play with mongodb for a minute, and holy shit, that is some weird, weird stuff. I read all of the marketing fluff on the site, but I still am at a loss. Is it just that people don't want to be bothered to learn SQL syntax or use an ORM, or make a REST API, so they went off and created a weird JSON thing?

Not trying to be a douchebag, not trying to criticize. I honestly do not get it. Why does this exist?

Comments
  • 3
    SQL doesn’t scare me but I hate it because it’s annoying.
    Here is the reason why:
    SQL is a language for RELATIONAL databases.
    When you want to model something, you first need to normalize it to be able to store it, and then when you query the data with some annoying JOIN crap (which is only there because it’s relational) and want to use it in some programming language, you need to bring it back from relational to hierarchical again, either via a PITA ORM or manually.

    With nosql databases such as mongodb you model your data exactly like it is in your head and you query it easily and naturally without any complex sql with joins, directly into your hierarchical structure of objects in the programming language.
  • 2
    @Lensflare fair enough I guess. Maybe I'll give it another shot this weekend.
  • 3
    @Lensflare
    While i dont think you are directly wrong... you're overlooking some things.

    What you said about relational vs nosql is correct... but you're missing 2 big reasons that mongodb got supported/used enough to be a recognised system.

    1. Morons that ignorantly follow trends, especially if they are new and/or seen as a radical variant... unfortunately these people keep propagating.

    2. MongoDB supports auto sharding.
    This is amplified by humanity being more and more intellectually lazy and unwilling to learn the root basics before commiting to systems.

    Personally, i really dislike MongoDB... but ive also been professionally building data architectures for nearly 2 decades, can easily write in methods for sharding, architecture restructuring and highly customised (including from scratch) data management processes in oracle systems (or even already have these things built).

    MongoDB and i dont mix well.

    Also in 3/3 convos, MongoDB users dont realise you can manually shard data.
  • 2
    @Lensflare rational is how it is in my head. Everything is relational. The SQL syntax is more comfortable than that weird js syntax. That's just abuse && workaround. What's next, write webapps in it?

    I wouldn't mind to ditch orm. People that never worked with sql become nervous when I say that. The fear is real. My fear is their fear. Maintaining database yourself just requires some discipline
  • 1
    @Lensflare
    To be clear, i just dont like mongoDB and sql systems are still needed in many cases and much more widely used, therefore better for compatibility. Mongodb and nosql definitely can have it's place and be a valid choice. I guess i view MongoDB in a similar way as you view js.
  • 2
    @retoor
    Discipline?
    Is that how normal humans see dbs?

    DBs and big custom algorithmic data architectures are my happy place. A year ago i spent Christmas alone, somewhat drunk,writing dbs and network scripts after formatting ~16Tbs of storage in WinRe diskpart. It was awesome!

    I have a shiny new 10tb LFF drive still in the box on top a fresh server next to a pile of ram to install on that server. Getting to set that up is my prize for doing the annoying administrative business owner crap i need to do and finishing some annoying af python code.

    It takes me discipline to not maintain dbs.
  • 1
    @retoor sounds like you are just more used to sql.
  • 1
    @Lensflare sounds you're more used to nonsql ;)
  • 1
    @retoor no, I‘m more used to sql, actually 😅
  • 0
    they are two completely different things that serve different purposes.

    SQL databases avoid redundancies and make efficient use of space while also making searches fast, but not everything fits in a table.

    If you're working with something that doesn't follow that grid pattern, it gets really hard to create a structure that fits your data and you'll need something more flexible.
Add Comment