[prev] 18 [next]

From Symbolic to Internal

How do we determine ...
  • information about a database, given its name
  • information about a table, given its name
DBMSs use catalog data in special tables

E.g. for PostgreSQL

pg_database(oid, datname, datdba, datacl[], ...)
pg_namespace(oid, nspname, nspowner, nspacl[], ...)
pg_class(oid, relname, relnamespace, ..., relkind,
         reltuples, relnatts, relhaspkey, relacl[] ...)
pg_attribute(oid, attrelid, attname, atttypid, attnum, ...)
pg_type(oid, typname, typnamespace, typowner, typlen, ...)