Articles:
The Schema Designer in Ligantic allows users to effortlessly create and customise data structures, empowering them to tailor their solutions to their unique needs.
A Schema is the design or blueprint of the data structure. It defines the shape, format, and rules for the data that will be stored and managed. The Schema outlines the different types of data, their relationships, and the constraints or validations that should be applied.
Think of a Schema like the blueprint for a house. The blueprint specifies the number of rooms, their sizes, the layout, the materials to be used, and the overall structure of the house. The blueprint is the design, not the actual house itself.
An Entity is a specific instance or occurrence of the data defined by the Schema. It represents a unique record or object that contains the actual data values, adhering to the structure and rules set by the Schema.
Continuing the house analogy, an Entity would be the actual physical house built based on the blueprint (Schema). Each house built is a unique Entity, with its own set of rooms, dimensions, and other details, all following the guidelines set by the original blueprint. For another example, let's consider creating a simple Ligantic Schema for storing information about people:
- Person - Name (text) - Age (number) - Email (text)
- Person 1: - Name: "John Doe" - Age: 35 - Email: "john.doe@example.com" - Person 2: - Name: "Jane Smith" - Age: 28 - Email: "jane.smith@example.com"
In this case, the Schema defines the structure of the "Person" data, including the fields (Name, Age, Email) and their data types. The Entities, on the other hand, are the specific instances of people, each with their own unique values for the defined fields. The Schema provides the blueprint, while the Entities represent the actual data records that adhere to that blueprint.
The Schema Designer gives you full control over the structure and shape of your data. You can define fields, data types, and relationships to create the perfect data shape for your solution.
Schemas allow you to design the structure and shape of your data. With the schema designer, you have control over the type and display of data in your solution.
Every schema you create will automatically create an item on the left-hand menu of your Space. The name of the schema will be pluralised to represent the collection of data. For example, if you create a "Blog" Schema then you will see a "Blogs" menu item appear once you save the Schema.
The Ligantic Platform automatically generates a unique ID for all new entities in a Schema.
You can customise the display name of your schema using a template. You can place the name of a property between double curly braces to programmatically update the Display Name. This Display Name is then used in all instances when referencing the entity.
The default Display Name Template is {{id}}.
If you had a text property on a Schema called "Name" you might want to change the Display Name Template to {{name}} so that the Display Name shows more meaningful content:
This would then change the display:
Schemas can use of the following types of fields or inputs:
Each of these schema types has related display configurations, such as a single-line text box, a multi-line textarea, or a dropdown select menu.
1. Name: This is an input field where you can enter a name for the new schema.
2. Type: This is a dropdown menu that allows you to select the type of schema you want to create.
3. Details: This section provides additional details about the schema, including an optional description and the ability to toggle whether to show it on the table view.
4. Properties: This section allows you to add properties to the schema. Each property can be of the same types as the schema itself (Text, Number, Date, etc.), and you can configure the display settings for each property.
5. Display Name Template: This is an input field where you can enter a template for the display name of the schema. You can use property names enclosed in double curly braces to dynamically update the display name.
6. Add Property: This button allows you to add a new property to the schema. You can add as many properties as needed, and you can reorder them using the drag-and-drop handle.
7. Create Schema: This button allows you to save and add the new schema to your Ligantic solution.