Can anyone help me understand what is the Schema, the namespace and consequently the Schema namespace ?
"Schema", generically, refers to the structure of the database. In Salesforce terms, that means the set of objects you have, the fields on those objects, and the relationships between them. You'll see this usage, for example, in the Schema Builder tool in Setup.
Apex provides a
Schema class, which includes top-level methods to get Describe API information about the schema (and associated metadata, like available tabs). The
Schema class is in the
Apex also has a
Schema namespace. The
Schema namespace hosts a variety of classes that are used by the Describe API, like
DescribeFieldResult. It's also the namespace for static references into Describe metadata, like
Adding on top of what David has already answered.
Schema is just pictorial representation of relationship between the database created.
In Salesforce, it's a representation of Objects related to each other using relationships as defined when you see it pictorially from Schema Builder
A namespace is a one to 15-character alphanumeric identifier that distinguishes your package and its contents from packages of other developers. A namespace is assigned to a package at the time that it’s created, and can’t be changed.
Salesforce has namespaces defined across the platform to group contents as those are offered. E.g.,
Apex classes and interfaces are grouped by the namespaces they’re contained in. For example, the Database class is in the System namespace.
The Schema namespace provides classes and methods for schema metadata information.
Based on the above reference of the namespace as utilized in Apex Language Reference, Schema Namespace is a package where it consists of all the classes grouped together which specifically operate on Schema metadata related operations.