Home › Resources & tools › Schemas are everywhere

Schemas are everywhere

Broadly speaking, schemas describe how data is organized in data structures.

Relational schemas

Relational schemas describe how data is organized in relational databases. These schemas are often captured as DDL (data definition language) statements.

Here is an example of a relational schema expressed using DDL commands:

CREATE TABLE books
( book_id INT NOT NULL PRIMARY KEY,
  title VARCHAR(100),
  author VARCHAR(100),
 );

GraphQL schemas

GraphQL schemas describe the shape of the data provided by GraphQL service.

Here is an example of a GraphQL schema:

type Book {
  title: String!
  author: String!
}

JSON schemas

JSON schemas describe the shapes of JSON documents. This then enables the annotation and validation of JSON documents.

Below is an example of a JSON schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/book.schema.json",
  "title": "Book",
  "description": "A book from the product catalog",
  "type": "object",
  "properties": {
    "title": {
      "description": "The title of the book",
      "type": "string"
    },
    "author": {
      "description": "The author of the book",
      "type": "string"
    }
  },
  "required": [
    "title",
    "author"
  ]
}

XML schemas

Similar to JSON schemas, XML schemas describe the shapes of XML documents.

Below is an example of an XML schema:

<?xml version="1.0"?>  
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">  
  
<xs:element name="book">  
  <xs:complexType>  
    <xs:sequence>  
      <xs:element name="title" type="xs:string"/>  
      <xs:element name="author" type="xs:string"/>  
    </xs:sequence>  
  </xs:complexType>  
</xs:element>  
  
</xs:schema>

OpenAPI

OpenAPI documents describe entire APIs and utilise JSON Schema to describe the data structures.

Apache Avro

Below is an example of an Avro schema:

{
   "namespace": "example.avro",
   "type": "record",
   "name": "Book",
   "fields": [
      {"name": "title", "type": "string"},
      {"name": "author", "type": "string"}
   ] 
 }

Protocol buffers

Below is an example of a protocol buffers message:

message Book {
  string title = 1;
  string author = 2;
}

See also

Bestseller
English Pronunciation Dictionary
$29.99

A guide to English pronunciation. Features broad phonemic transcriptions indicated using IPA.

Old English Alphabet Poster, English-Labeled
$17.99

The Old English alphabet chart.

Caffeine Molecule Poster, Ball-and-Stick Model, English-Labeled
$19.99

A poster featuring the ball-and-stick model of the caffeine molecule.

небосклон Morphemic Analysis Poster
$14.99

A poster featuring the morphemic analysis of the Russian word небосклон.

"Hello, World!" Code Snippet Poster, Go Programming Language
$14.99

A poster featuring the "Hello, World!" program in Go programming language.

The list of schema registries

An overview of the technologies used to discover and manage event or message schemas.

One schema, one API: Inside the world of Data Commons

Data Commons brings thousands of public datasets together into one data graph to give data analysts and researchers a jump-start on analysing open data.

Countries of the world in Arabic

The list of names of countries and regions in the Arabic language.

Document understanding: Modern techniques and real-world applications

How document understanding helps bring order to unstructured data.

SQL Formatter

Beautify SQL code.

All prices listed are in United States Dollars (USD). Visual representations of products are intended for illustrative purposes. Actual products may exhibit variations in color, texture, or other characteristics inherent to the manufacturing process. The products' design and underlying technology are protected by applicable intellectual property laws. Unauthorized reproduction or distribution is prohibited.