Introduction to Relational Databases in SQL
Timo Grossenbacher
Data Journalist
professors
, universities
, companies
companies
for the bank "Credit Suisse"professor
can work at multiple universities
and companies
, a company
can employ multiple professors
You'll need: Basic understanding of SQL, as taught in Introduction to SQL.
SELECT table_schema, table_name
FROM information_schema.tables;
table_schema | table_name
-------------------+------------------------------
pg_catalog | pg_statistic
pg_catalog | pg_type
pg_catalog | pg_policy
pg_catalog | pg_authid
pg_catalog | pg_shadow
public | university_professors
pg_catalog | pg_settings
...
SELECT table_name, column_name, data_type
FROM information_schema.columns
WHERE table_name = 'pg_config';
table_name | column_name | data_type
-----------+-------------+-----------
pg_config | name | text
pg_config | setting | text
Introduction to Relational Databases in SQL