Matrices in SQL
Arrays are not the same thing as matrices. An array is a data structure whose elements are accessed by a numeric value called an index. A matrix is an array with mathematical operations defined on it. A matrix can be one, two, three, or more dimensional structures. The most common mathematical convention has been to use the letters i, j, and k for the indexes.
SQL had neither arrays nor matrices because the only data structure in the Relational Model is a table. Arrays violate the rules of First Normal Form (1NF) required for a relational database, which say that all columns are scalars.
This was unfortunately changed in SQL:2003 with the addition of collection types. You can now declare a column to be an array of one of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access