• @lysdexic
    link
    English
    5
    edit-2
    10 months ago

    You don’t have guarantee nobody touched your file, we should database that keep structure information instead.

    What is your definition of file and database? For example, do you think SQLite is a database, and a SQLite database file counts as a file? Do you think that editing SQLite or PostgreSQL with a third party client counts as touching a file?

    • @[email protected]
      link
      fedilink
      110 months ago

      A database carry the schema, structure, that allow you to validate that you are still having the structure you want.
      SQLite is both a file and a database, but what I’m saying is that people shouldn’t mess with the file, but the database interface instead.

      I have nothing against third party clients, the important thing is keeping the structure.
      API users shouldn’t have to reparse themselves the data, or worse, guess the structure of the file.

      The facts a DB use the Filesystem behind the scenes, is an implementation details the user shouldn’t be much concerned about, some DB can do without Filesystems.

      • @lysdexic
        link
        English
        010 months ago

        A database carry the schema, structure, that allow you to validate that you are still having the structure you want.

        So do all file formats.

        SQLite is both a file and a database, but what I’m saying is that people shouldn’t mess with the file, but the database interface instead.

        The same holds for all file formats: don’t go around licking random bits in a file, use a client instead.

        I have nothing against third party clients, the important thing is keeping the structure.

        That’s what file format clients are for, and anyone can even roll out their own if they want it.

        The facts a DB use the Filesystem behind the scenes, is an implementation details the user shouldn’t be much concerned about, some DB can do without Filesystems.

        That’s really besides the point. The point is that it doesn’t make sense to frame using databases over files as using a higher level client over persisted data.

        • @[email protected]
          link
          fedilink
          110 months ago

          So do all file formats.

          I don’t think you understand what I’m saying.
          json, XML files for examples doesn’t have schemas by defaults. Schema exists but are totally optional, and are most of the times never there.

          The same holds for all file formats: don’t go around licking random bits in a file, use a client instead

          Most of the time the file was written by something not implemented to be used by third party.

          That’s really besides the point.

          As far as I’m aware, I’m the one making the point here.