← Back to context

Comment by hyperpape

2 months ago

It literally does not describe a file, and does not literally describe the data layout of anything on disk (though with enough knowledge, you may be able to infer facts about probable layouts).

> does not literally describe the data layout of anything on disk

Huh? Depends on the DMBS, but each InnoDB table is a file.

And the schema determines the file structure.

  • Schema is an abstraction over the file structure. Different RDBMSes will use different file layouts for a given schema. The same RDBMS may even have different engines that use different file layouts, or may change file layout between major versions.

    "Determines" is too weak: it must be "is". If "schema is file layout" is true, then sure, a schema is a file layout. But if it is merely "schema determines file layout", then no, a schema is not a file layout.

    • Abstractions are notoriously leaky in DBMSes. First off, they don't even use the same SQL spec. Give me a schema that uses anything Postgres-specific, and I can tell you what the bytes on disk look like for a given row or index.

      I think it's a moot point anyway because the language is broader than just files in the filesystem sense, which is basically what the court said too.

  • > but each InnoDB table is a file.

    A table isn't a schema, it is a component of a schema, and most databases don't use InnoDB.