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?


1 Answer 1


I think only the developer who first implemented a concrete object they called a schema, from many moons ago, could give you an official answer on why they chose the word schema here. But I could speculate their reasoning being that a schema (the object) is a collection of related entities (usually) that make up the structure of a subject matter. That subject matter could potentially be its own database, if one chose to architect it that way, and without schemas it would have to be. Otherwise there would be intermingling of unrelated entities within the same database.

One may think of a schema abstractly when going by your first definition, but I think they wanted to implement a concrete object to serve the purpose of organizing the database when there's multiple structures that aren't necessarily directly related.

  • 1
    I think the decision precedes Microsoft. Schema and the CREATE SCHEMA statement appear in the SLQ 2003 standard, and were implemented in PostgreSQL in 2002. Microsoft add theirs in SQL Server 2005.
    – Manngo
    Nov 5, 2021 at 2:19
  • @Mango Fair point. Sorry when you said "SQL Schema" for some reason my brain thought you were referring to SQL Server.
    – J.D.
    Nov 5, 2021 at 2:30
  • 1
    Oracle's dialect of SQL had the CREATE SCHEMA statement at least as far back as version 7 (1995). Nov 5, 2021 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.