Skip to main content

Table Management Overview

Tables serve as the foundation of your Rocket database, providing structure and organization to your data. This documentation offers comprehensive guidance on efficient table management practices.

In Rocket, each database comprises multiple tables, each 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 (akin to columns in relational databases) can be defined, each supporting specific operations. 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 and deletion, and allow for modification. Similarly, attributes like 'name' can be marked as searchable and sortable, facilitating efficient data retrieval and organization.

Rocket leverages these attribute configurations to automatically generate RESTful APIs, streamlining data interaction processes.

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--No-
DescriptionTable Descriptionlarge-text2255--No-
Attribute.NameAttribute Namestring225--No
  • attribute.name cannot have duplicate values.
  • attribute.name cannot be 'search'.
  • attribute.name can only contains alpha-numeric characters.
  • attribute.name cannot start with any digits.
Attribute.DescriptionAttribute Descriptionlarge-text2255--No-
Attribute.Data TypeAttribute Data Typestring--'string', 'number', 'boolean', 'large-text', 'array', 'enum', 'date', 'date-time'stringNo-
Attribute.Enum ValuesEnum Values for Enum Data Typestring[]225--YesMinimum 1 enum value, maximum 5 enum values. Mandatory when data type is 'enum'
Attribute.OptionalOptional Field Indicatorboolean--true, falsefalseNo-
Attribute.UniqueUnique Field Indicatorboolean--true, falsefalseNo-
Attribute.IndexableIndexable Field Indicatorboolean--true, falsefalseNo-
Attribute.SearchableSearchable Field Indicatorboolean--true, falsefalseNo-
Attribute.SortableSortable Field Indicatorboolean--true, falsefalseNo-
Attribute.EditableEditable Field Indicatorboolean--true, falsefalseNo-
Attribute.DeletableDeletable 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.