Skip to content

i-s-compat-table/i.s.compat.table

Repository files navigation

I.S.Compat.Table

Information Schema Compatibility Table(s)

Compares the information_schema of some of the major databases that implement the information_schema standard.

About information_schema

information_schema is an ANSI-standard set of read-only views that provide information about all of the tables, views, columns, and procedures in a database. Specifically, the specification for the information_schema views are published in ISO/IEC 9075. This standard has several versions.

These facts implies several crucial points:

  1. The information_schema views are an amazing, standard way to discover metadata about a given database!
  2. Different versions of the same database and different databases might implement different versions of the standard for information_schema
  3. Since the standard is published by ISO reading it costs a nontrivial amount of money. Thus, volunteer developers might choose to do something nice for themselves rather than shelling out so that they can implement the latest standards.

Naturally, most databases that implement information_schema a subset of the standard's views, add extra database-specific views, and stuff otherwise-standard views with database-specific columns. This makes information_schema a highly-nonstandard standard. Thinking of information_schema as a convention might be more accurate.


(╯°□°)╯︵ ┻━┻


Motivation

I'd like to use information_schema more. Before I do that, however, I'd like to know what views and columns are in the standard or better yet, what views and columns are actually in each database's information_schema.

Inspirations

Methodology

I scrape at the public documentation where the documentation licenses allow. I also run databases without restrictive EULAs and observe those databases' information_schema tables directly.

I prioritize the most popular databases that implement an information_schema according to 2022 Stack Overflow Developer Survey

database name % of respondents use documentation scraped information_schema queried directly
mysql 47% NO YES
postgres 44% YES YES
mssql 27% YES NO
mariadb 18% YES YES
cockroachdb YES TODO
tidb YES TODO

If note a missing database that implements information_schema or evidence of incorrect information, please create a pull request with a fix! See ./CONTRIBUTING.md for more details.