Brightspot CMS Developer Guide

SQL databases


Dari supports MySQL, PostgreSQL, and Oracle, all of which are implemented using the same underlying table structure and indexing strategy. Dari’s SQL database schema is implemented using multiple tables (see below). The primary table, Record, stores the raw information about the objects that are saved. Objects are serialized to JSON format when they are saved and stored in the data column of the Record table. Several other tables are used to implement field indexes.

Dari creates unique IDs for every object by generating a UUID. The id and typeId fields in the Record table store these UUIDs in the most appropriate datatype for the underlying database. For MySQL and Oracle, this is binary(16). On PostgreSQL, the native UUID is used.

Because SQL databases generally provide fast primary key lookups, Brightspot projects typically use an SQL implementation as the primary database. However, SQL database performance is limited for text matching and compound-predicate queries. Therefore, Brightspot projects generally supplement the SQL implementation with the Solr database, which Dari uses for full-text searches.

See also:


Dari implements indexing using four primary index tables: RecordString, RecordNumber, RecordUuid, and RecordLocation.

When fields of an object are indexed, the field’s value along with its object ID are stored in the appropriate index table.


The following table lists the tables that Dari creates in SQL-based databases. An integer in the table name indicates a version, which may be different in your database.

TableDescription
RecordPrimary storage table. All objects are stored in this table as serialized JSON blobs.
RecordLocation3Stores spatial indexes. Supported on MySQL and PostgreSQL only.
RecordNumber3Stores number and time stamp indexes.
RecordRegion2Stores indexes for localized data.
RecordSearchTracks indexed fields and methods.
RecordString4Stores string and enumeration indexes.
RecordUpdateTracks when objects were last updated.
RecordUuid3Stores relationship indexes.
SymbolStores symbols such as index names. It is referenced by the other index tables.

Previous Topic
Databases
Next Topic
Solr database
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Modules
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Shopify
Apple News