Skip to main content

Schema Basics

A Fluree schema consists of collections and predicates.

Collections#

Collections are similar to a relational ledger's tables.

Collections organize changes about a type of subject, i.e. customers, invoices, employees. If you have a new subject type, you'd create a new collection to hold it.

Predicates#

Predicates are similar to a relational ledger's columns. For example, for the collection customer, predicates could be: customer/firstName, customer/lastName, etc.

Note that there are a number of built-in collections that are automatically created with every new Fluree instance.

Deciding on Collections#

In this section, we are going to create a schema for a comment board application where users talk about their favorite artists.

This comment board will allow people to list information about themselves, create new chat messages, and comment on existing chats.