As far as I can tell, the word “schema” is used in two different ways:
- The schema is the structure of the database, including the tables and how they are related
- The schema is a sort of namespace allowing you to create virtual collections of database objects
There is an article at https://dataedo.com/kb/data-glossary/what-is-database-schema which highlights the different meanings, but doesn’t appear to explain why they use the same name.
Are the different uses of the word in fact related in some subtle but very interesting way, so that one meaning naturally leads to the other?