Say you wanted a database inside a huge distributed JSON file that scaled vertically.

So that get("users.jane33"), pulls Jane33’s profile.

Are there any specs for that? I’ve seen MongoDB, but no longer like its license.

I’m thinking a DHT with pointers, and raw data blobs. But would like to see what’s already working.

    • expr ( expr@programming.dev ) 
      link
      fedilink
      arrow-up
      3
      ·
      1 hour ago

      You do realize that a RDBMS is a system for managing flat files, right? They all store their contents in various files on disk.

      I am highly suspicious that you’ve actually encountered database corruption with an RDBMS. That’s incredibly unlikely as they are purposefully designed to be extremely fault tolerant (much more fault tolerant than whatever you would come up with yourself).

      What you are talking about is reinventing a bad RDBMS. JSON is a textual format for human consumption, not one that is at all fit for efficient data storage and access.

    • farcaller ( farcaller@fstab.sh ) 
      link
      fedilink
      arrow-up
      13
      ·
      8 hours ago

      duckdb can read raw json files, if that’s your cup of tea. Querying with SQL has nothing to do with the underlying storage format. If your storage is immutable, it can’t be corrupted by writes to begin with, and duckdb couldn’t care less. It can work even over http, with your static json served over S3 if that’s your cup of tea.

      I’d suggest you figure the data storage separate from querying and see what requrements you have for both.

      • ki4jgt ( ki4jgt@feddit.org ) OP
        link
        fedilink
        arrow-up
        1
        ·
        8 hours ago

        I’ve edited my comment. I’ve seen too many database corruptions with SQL. I prefer a memcached flat file database. I usually roll them by hand, but I’m getting older.

        • Azzu ( Azzu@leminal.space ) 
          link
          fedilink
          arrow-up
          16
          ·
          edit-2
          7 hours ago

          A database like PostgreSQL probably corrupts less often than plain files. And your statement doesn’t even make sense, as theoretically, you can also query plain files with SQL, SQL after all is just a query language, not a storage system.

          You’re probably trying to get away from a specific system that uses SQL, but getting away from SQL itself doesn’t make sense in that context.

          • ki4jgt ( ki4jgt@feddit.org ) OP
            link
            fedilink
            arrow-up
            1
            ·
            7 hours ago

            But the storage systems often reflect an entire underlying ideology on how data should be stored. I’ve seen so many DBs carrying SQL corrupt and require hours of work to fix, that I’m done with the entire concept.

            Then there’s the ideology that I shouldn’t have to learn an entirely separate language, just to query a database.

            My DBs tend to focus on distributed hashing algorithms. If the data becomes corrupted, it can be copied via the hash, from a different shard. It fixes so many problems. I’ll admit it’s a feeling, but I just don’t like using systems where I don’t understand the underlying architecture. And most SQLs make absolutely no sense to me, except attempting to make things compact (to save disk space, which is what causes most corruptions in the first place).

            One variable, completely unrelated to anything, corrupts everything, because SQL databases prefer compaction over flat file storage.

            • Azzu ( Azzu@leminal.space ) 
              link
              fedilink
              arrow-up
              16
              ·
              7 hours ago

              Most of what you said conceptually is just simply false. Your experiences are of course valid, though I think you’re drawing the wrong conclusions.

            • What are you even doing? I’ve been running db’s as part of apps my entire life, including being staff engineer for a team responsible for petabytes of data and databricks and I’ve never heard or had any of this happen.

              • ki4jgt ( ki4jgt@feddit.org ) OP
                link
                fedilink
                arrow-up
                1
                ·
                7 hours ago

                https://lmgtfy.com/?q=SQL+database+corruption+before%3A2018

                I’ve had so many corruptions from SQL related databases, with software that wasn’t even my own. My latest problem with it is the Briar Project. Try it out. Spend a month in one of the online forums, and your entire identity is lost due to an SQL database corruption. You lose your entire identity within the network.

                I don’t know where you’ve been, but if you haven’t experienced a database corruption with SQL, you’re either not that high up, or your company isn’t that large.

                • 123 ( 123@programming.dev ) 
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  15 minutes ago

                  Are you guys using SD cards as the backing storage or something? 14 years and ~3 DB vendor migrations and not a single object hash from our 400TB storage has ever failed.

                • 4am ( 4am@lemmy.zip ) 
                  link
                  fedilink
                  arrow-up
                  8
                  ·
                  4 hours ago

                  At my job I work with a 52TB database. We clone it, we manipulate it (test environments); it contains transactions, business rules configuration, caching, workload regulation, batch controls and caching data; it serves thousands of clients at once - users, web APIs, third-party software integrations. We don’t ever see “corruption”.

                  Sounds like you work with some sloppy coders. SQL databases don’t “just corrupt”, they are one of the most stable storage platforms ever devised. This is a skill issue; not sure if it’s yours but it’s certainly not inherent in the platform.