why are databases needed when a hash map has O(1) access and O(1) insertion and you can write queries as hand-optimized C

why are databases needed when a hash map has O(1) access and O(1) insertion and you can write queries as hand-optimized C

  1. 2 weeks ago
    Anonymous

    retard

  2. 2 weeks ago
    Anonymous

    How do hashmaps enforce constraints, and provide ACID transactions to multiple connections?

  3. 2 weeks ago
    Anonymous

    Neet

  4. 2 weeks ago
    Anonymous

    Try working on non-toy projects.
    Also nagasaki

    • 2 weeks ago
      Anonymous

      I maintain an React app and the database is a persistent immutable map

  5. 2 weeks ago
    Anonymous

    Did you try to store 1TB of data in your hashmap? Or ever use an index or any kind of join?

    • 2 weeks ago
      Anonymous

      People who NEED a 1 TB hashmap don't come to this place. There might be people where who use 1 TB hashmaps, but that is because they do something wrong.

      • 2 weeks ago
        Anonymous

        We make shaky measurers, they shake and we log the shakiness. It fills takes space to keep all those shakes

  6. 2 weeks ago
    Anonymous

    No matter how much modern girls thot it up, the simple schoolgirl outfit with cute panties look will always be the hottest

    Also OP, how do you intend to efficiently query data

  7. 2 weeks ago
    Anonymous

    What does the O in O(__) mean anon?
    Is it best case, average case or worst case?
    Can there be situations where O(n^n) is faster than O(1)?

    • 2 weeks ago
      Anonymous

      In the case of hashmaps it would be "expected". Best case is never interesting. Worst case is interesting, but not as interesting as average, unless you're dealing with real-time constraints.

      • 2 weeks ago
        Anonymous

        >best case is never interesting
        if an algorithms best-case meets my input data for one reason or another, then the best case is always the case. Best case is interesting in special circumstances. This isn't speculation, I've had this happen.

  8. 2 weeks ago
    Anonymous

    Databases support more operations, like range queries, that hash maps can't perform efficiently.

  9. 2 weeks ago
    Anonymous

    >why are databases needed when a hash map...
    Gonna stop you right there. Is a hash map persistent? No it fucking isn't. It's a data structure. Ah, you might say, but what if we made a persistent hash map? That's called a key value store. It's a type of database. You absolute fucknut. Also, hash maps aren't strictly O(1) access and insertion. They're O(1) amortized. Sometimes you end up with a bunch of keys that have the same hash value. Then you're either not getting O(1) access or you have to rehash. And rehashing is a NOT FUCKING O(1) insertion operation. So you're fucking wrong on hash tables being the perfect for everything data structure. They're good for a lot of things, which is why a lot of databases use them, but they're also not the only data structures being used by a lot of databases.

    • 2 weeks ago
      Anonymous

      why are you malding?

      • 2 weeks ago
        Anonymous

        Why are you wrong?

    • 2 weeks ago
      Anonymous

      >Sometimes you end up with a bunch of keys that have the same hash value
      skill issue, use a better hash function

  10. 2 weeks ago
    Anonymous

    Why do you need a web browser when you have curl and your brain to figure out what the java script does

  11. 2 weeks ago
    Anonymous

    I can see their panties hehehehehe

  12. 2 weeks ago
    Anonymous

    instead of being mean to you, i'll simply say that most databases handle many concurrent connections and scale across multiple nodes.

    now of course, redis can also do this while also all being entirely in memory with relatively decent consistency guarantees too. but you are more than welcome to write your own multithreaded scalable c application with several thousands of dollars of RAM 🙂

  13. 2 weeks ago
    Anonymous

    now do it at scale

  14. 2 weeks ago
    Anonymous

    ah, gotta love sophomores and their know-it-all spirit after their first data structures course.

  15. 2 weeks ago
    Anonymous

    Nice view

  16. 2 weeks ago
    Anonymous

    Yup, that's a SNIFF from me.

Your email address will not be published. Required fields are marked *