mdTranslator

Architecture

Internal Object


entity:

The entity object provides the definition and schema for a discrete data object within the data resource. The data object may be a table, dataset, or single sheet of a spreadsheet.

    def newEntity
        intObj = {
            entityId: nil,
            entityName: nil,
            entityCode: nil,
            entityAlias: [],
            entityDefinition: nil,
            primaryKey: [],
            indexes: [],
            attributes: [],
            foreignKeys: []
        }
    end

entityId: string (required) - a user provided unique ID for this entity. The ID will be used to locate this entity in the entity array

entityName: string (required) - the name commonly used to identify this entity

entityCode: string - the code name used to identify this entity in a database schema or application software. For spreadsheets this would likely be the sheet name. This items may not be applicable to datasets represented as a file.

entityAlias: array - an array of quoted strings providing alternate names used to identify this entity

entityDefinition: string (required) - a brief definition for the entity

primaryKey: array - an array of quoted entityAttribute attribute code names that together compose the primary key set for the entity

indexes: array - an array of entityIndex objects describing alternate indexes for the entity

attributes: array - an array of entityAttribute objects defining the attributes for the entity

foreignKeys: array - an array of entityForeignKey objects describing attributes whose values are restricted to values found in the domain of an attribute belonging to another table or dataset