Suggest an editImprove this articleRefine the answer for “What is a "schema" in SQL?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A **schema** in SQL is a **logical space (container)** that holds database objects: tables, views, functions, triggers, and so on; it helps **organize the database's structure** and **separate data by meaning or by user**, e.g. `CREATE SCHEMA accounting; CREATE TABLE accounting.invoices (...)`. **Key point:** the advantages of schemas are order (objects don't get mixed into one pile), security (you can grant access to individual schemas instead of the whole database), and convenience (schemas work like "folders" inside a database).Shown above the full answer for quick recall.Answer (EN)ImageA **schema** in SQL is a **logical space (container)** that holds database objects: tables, views, functions, triggers, and so on. It helps **organize the database's structure** and **separate data by meaning or by user**. ### Example ```sql CREATE SCHEMA accounting; CREATE TABLE accounting.invoices ( id INT, amount DECIMAL ); ``` Here the `invoices` table lives inside the `accounting` schema. ### The advantages of schemas 1. Order, objects don't get mixed into one pile. 2. Security, you can grant access to individual schemas instead of the whole database. 3. Convenience, schemas work like "folders" inside a database. So a **schema is like a folder for tables and other objects**, helping keep the database in order.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.