yinwang1.substack.com/p/database
2 corrections found
因为RDBMS表行宽度固定,无法存储数组等可变长度数据。
This is incorrect: mainstream RDBMSs support variable-length columns, and some also support array types directly. Fixed-length rows are only one storage option, not a defining property of RDBMS tables.
Full reasoning
The claim says RDBMS rows are fixed-width and therefore cannot store arrays or other variable-length data. That is not true.
- MySQL's own documentation says its fixed-length row format is used only when a table has no variable-length columns such as
VARCHAR,VARBINARY,BLOB, orTEXT. InnoDB also documents storage for long variable-length columns. - PostgreSQL explicitly documents that table columns can be defined as variable-length multidimensional arrays.
So while some storage layouts may use fixed-length records in some cases, it is false to describe this as an inherent limitation of RDBMS tables in general.
3 sources
- MySQL 8.4 Reference Manual: Static (Fixed-Length) Table Characteristics
Static format ... is used when the table contains no variable-length columns (VARCHAR, VARBINARY, BLOB, or TEXT). Each row is stored using a fixed number of bytes.
- MySQL 8.0 Reference Manual: InnoDB Row Formats
When a table is created with ROW_FORMAT=DYNAMIC, InnoDB can store long variable-length column values (for VARCHAR, VARBINARY, and BLOB and TEXT types) fully off-page.
- PostgreSQL 11 Documentation: Arrays
PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays.
考虑到 Prolog 和 Datalog 比 SQL 早出现(1972、1977 年与 1986 年),我认为 SQL 是倒退的一步。
The date comparison is wrong. SQL did not first appear in 1986; IBM had already published SEQUEL/SQL in 1974, and SQL became commercially available in 1979. 1986 was the year ANSI standardized SQL.
Full reasoning
This sentence compares the introduction dates of Prolog, Datalog, and SQL, but it gives 1986 as SQL's appearance date. That is inaccurate.
- IBM Research lists the paper "Sequel: A structured english query language" as a 1974 publication, showing that SQL's predecessor SEQUEL was already publicly described in the mid-1970s.
- Oracle's official history of SQL says SEQUEL was developed by IBM and that the first commercially available implementation of SQL appeared in 1979.
- IBM's overview of SQL likewise says SQL was developed in the 1970s, became commercially available in 1979, and was only later standardized by ANSI in 1986.
So 1986 is the standardization date, not the date SQL first appeared. That matters here because the article uses the wrong date to argue that SQL came after Prolog and Datalog.
3 sources
- IBM Research: Sequel: A struciured english query language
SIGFIDET 1974 ... Date 01 May 1974 ... 'SEQUEL' ... can be used for accessing data in an integrated relational data base.
- Oracle Database SQL Reference: History of SQL
The language, Structured English Query Language (SEQUEL) was developed by IBM ... In 1979, Relational Software, Inc. (now Oracle) introduced the first commercially available implementation of SQL.
- IBM: What Is Structured Query Language (SQL)?
In the 1970s, IBM scientists Donald Chamberlin and Raymond Boyce developed and introduced SQL ... It became commercially available in 1979 ... SQL was standardized by the American National Standards Institute (ANSI) in 1986.