Skip to main content

Table Management Overview

In Rocket, each database hosts multiple tables, where each table defining the structure of data and specifying operations to be executed. For example, in a blogging platform, tables such as 'Users' and 'Posts' are typical. The 'Users' table stores user information, while the 'Posts' table manages blog post data.

Within each table, various attributes (similar to columns in relational databases) can be defined, where each attribute defines the data type of the data, the needed operations on the data, and some other behaviors for the data.

For instance, in the 'Users' table, attributes like 'id', 'name', and 'bio' may exist. The 'id' attribute, for instance, can be designated as unique, indexable, editable, and deletable, enabling it to uniquely identify data, serve as an index for retrieval, deletion, and modification. Similarly, attributes like 'name' can be marked as searchable and sortable.

Rocket leverages these attributes and attribute configurations to automatically generate RESTful APIs and documentation.

Table Operations

In Rocket, several operations can be performed on Tables. Here is list of all operations on Table:

  • Creating Tables: Refer to the Creating Tables documentation for detailed instructions.
  • Editing Tables: Access guidance on Editing Tables to modify table configurations effectively.
  • Deleting Tables: Follow the outlined instructions in Deleting Tables to remove tables from the database.
  • Adding Attributes: Detailed instructions for adding attributes can be found in the Adding Attributes documentation.
  • Editing Attributes: Learn about editing table attributes through the guidance provided in Editing Attributes.
  • Deleting Attributes: Remove table attributes using the instructions outlined in Deleting Attributes.

Field Rules

The following table outlines the field rules for configuring tables:

FieldDescriptionData TypeMinimum LengthMaximum LengthValid OptionsDefault ValueIs OptionalExtra Details
NameTable Namestring225--NoNeeded to be a valid entity name
DescriptionTable Descriptionlarge-text2255--No-
Attribute.Basic Details.NameAttribute Namestring225--No
  • Needed to be a valid entity name.
  • attribute.name cannot have duplicate values.
Attribute.Basic Details.DescriptionAttribute Descriptionlarge-text2255--No-
Attribute.Data Type.Data TypeAttribute Data Typestring--'string', 'number', 'boolean', 'large-text', 'array', 'enum', 'date', 'date-time'stringNo-
Attribute.Data Type.Enum ValuesEnum Values for Enum Data Typestring[]225--YesMinimum 1 enum value, maximum 5 enum values. Mandatory when data type is 'enum'
Attribute.Data Type.OptionalOptional Field Indicatorboolean--true, falsefalseNo-
Attribute.Indexing.UniqueUnique Field Indicatorboolean--true, falsefalseNo-
Attribute.Indexing.IndexableIndexable Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.SearchableSearchable Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.SortableSortable Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.Less ThanLess Than Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.Less Than EqualLess Than Equal Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.Greater ThanGreater Than Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.Greater Than EqualGreater Than Equal Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.EqualEqual Field Indicatorboolean--true, falsefalseNo-
Attribute.Get Operations.One OfOne Of Field Indicatorboolean--true, falsefalseNo-
Attribute.Write Operations.EditableEditable Field Indicatorboolean--true, falsefalseNo-
Attribute.Write Operations.DeletableDeletable Field Indicatorboolean--true, falsefalseNo-
Attribute.Aggregation.MeanMean Field Indicatorboolean--true, falsefalseNo-
Attribute.Aggregation.MaximumMaximum Field Indicatorboolean--true, falsefalseNo-
Attribute.Aggregation.MinimumMinimum Field Indicatorboolean--true, falsefalseNo-
Attribute.Aggregation.CountCount Field Indicatorboolean--true, falsefalseNo-
Attribute.Aggregation.SumSum Field Indicatorboolean--true, falsefalseNo-
Attribute.Aggregation.FrequencyFrequency Field Indicatorboolean--true, falsefalseNo-

These field rules provide comprehensive guidelines for configuring tables and attributes within Rocket. For further information on attributes, refer to Understanding Attributes.