Skip to main content

Export and Import DB Entities

DB entities can be imported/exported via a predefined Excel (.xlsx) template. These features facilitate seamless entity migration across different applications, enabling easy entity configuration, modification, and backup.

Exporting DB Entities​

The Export feature allows users to download existing DB entities into an Excel (.xlsx) file. This file serves as a backup, can be modified, and can be re-imported after changes.

Steps to Export DB Entities​

  1. Right-click on "DB Entities" in the Entity Explorer.
  2. Select "Export" from the context menu.
  3. A file explorer window appears, allowing users to choose the save location.
  4. Enter a file name and click Save.
  5. The entities file is generated and saved in XLSX format.
  6. A confirmation message "Exported Successfully" appears.

Export DB Entities

Importing DB Entities​

The Import feature allows users to upload multiple DB entities from a predefined Excel template.

Steps to Import DB Entities​

  1. Right-click on "DB Entities" in the Entity Explorer.
  2. Select "Import" from the context menu.
  3. A file explorer window appears. Browse and select the XLSX file containing the entity data.
  4. The system performs validation checks on the file:
    • Ensures mandatory fields are filled.
    • Checks for duplicate entity names.
    • Verifies correct data types.
  5. If the validation passes, the entities are imported successfully.
  6. A confirmation message "Entities Imported Successfully" appears.

Import DB Entities

Import Excel Sheet Structure​

The Import Excel sheet consists of multiple sheets, primarily:

1. DB Entities Sheet​

This sheet defines the DB entities that will be imported.

Column NameDescription
NameThe entity's name (e.g., Employee, Product).
PluralNamePlural form of the entity name.
SuffixAn optional suffix for the entity.
NamespaceThe namespace under which the entity is defined.

2. Attributes Sheet​

This sheet defines attributes (columns) for each entity.

Column NameDescription
EntityNameThe name of the entity to which the attribute belongs.
NameAttribute name (e.g., FirstName, Email).
DatatypeData type (e.g., int, string, decimal).
LengthMaximum allowed length for string attributes.
RelationshipDefines relationships with other entities.
ReferenceEntityThe related entity for foreign key relationships.
ReferenceAttributeThe attribute in the referenced entity.
IsPrimaryKeyIndicates if this attribute is the primary key (TRUE/FALSE).
IsUniqueSpecifies if the attribute has a unique constraint.
IsMandatoryMarks if the attribute is required (TRUE/FALSE).
IsIdentifierIdentifies whether this field is a business identifier.
AutoIncrementDefines whether the value auto-increments.
IdentitySeedValueStarting value for identity columns.
DecimalPrecisionPrecision for decimal attributes.
DecimalScaleScale for decimal attributes.
CascadeDeleteSpecifies if deleting this entity cascades to related records.
DateOptionDefines date-related options (if applicable).
DefaultValueThe default value for this attribute.
ExampleOptionAn example for data entry.
ExampleExample values for reference.
DescriptionAttribute description.
EncryptionKeyIndicates if the attribute is encrypted.

Download Import Template​

The DB Entities Import Template is an Excel file that allows users to define DB entities and their attributes before importing them.

Steps to Download the Import Template​

  1. Right-click on "DB Entities" in the Entity Explorer.
  2. Select "Download Import Template" from the context menu.
  3. A file explorer window will appear, prompting you to save the template.
  4. Provide a file name and ensure the format is .XLSX (Excel format).
  5. Click Save to store the template on your local system.

Once downloaded, you can manually enter entity details in the provided Excel workbook before importing it back into the system.

Download Import Template

Understanding the Template Structure​

The Excel template consists of multiple sheets, but the most critical ones are:

  1. DB Entities Sheet – Defines the DB entities (tables).
  2. Attributes Sheet – Defines attributes (columns) for each entity.

Each sheet has predefined columns, ensuring the correct format for import.

DB Entities Sheet​

This sheet contains metadata for defining DB entities (tables).

Column NameDescription
NameThe name of the entity (table).
PluralNamePlural form of the entity name.
SuffixAny suffix for naming conventions.
DescriptionA brief explanation of the entity's purpose.
NamespaceThe namespace where the entity belongs.

Attributes Sheet​

This sheet contains attribute-level (column-level) details for each entity.

Column NameDescription
EntityNameThe name of the entity (must match an entity in the "DB Entities" sheet).
NameThe name of the attribute (column).
DatatypeThe data type (String, Integer, DateTime, etc.).
LengthMaximum character length (if applicable).
RelationshipDefines relationships with other entities (e.g., Foreign Key).
ReferenceEntityThe related entity for foreign key relationships.
ReferenceAttributeThe related attribute in the referenced entity.
IsPrimaryKeyMarks this attribute as a primary key (TRUE/FALSE).
IsUniqueSpecifies if the attribute must have unique values (TRUE/FALSE).
IsMandatorySpecifies if the attribute is required (TRUE/FALSE).
IsIdentifierMarks the attribute as an identifier for uniqueness.
AutoIncrementDefines if the value auto-increments (for primary keys).
IdentitySeedValueThe starting value for an auto-incremented field.
DecimalPrecisionTotal number of digits for decimal values.
DecimalScaleNumber of decimal places for decimals.
CascadeDeleteEnables cascade delete (TRUE/FALSE).
DateOptionSpecifies date format options (if applicable).
DefaultValueThe default value assigned to the attribute.
ExampleOptionProvides an example format.
ExampleSample data for this attribute.
DescriptionA short description of the attribute.
EncryptionKeySpecifies if encryption is applied to the attribute.

Steps to Manually Edit the Template Before Importing​

  1. Open the downloaded Excel file (DBEntities.xlsx).
  2. Navigate to the DB Entities sheet and enter the required entity details.
  3. Go to the Attributes sheet and enter attributes for each entity.
  4. Ensure:
    • The EntityName in the Attributes sheet matches an entity in the DB Entities sheet.
    • Data types and relationships are correctly assigned.
  5. Save the file once all required entities and attributes are added.