Creating Simple Data Elements, Structured Data Elements, and Data Structure Definitions

When modeling data for a project, you can create simple data elements, structured data elements, and data structure definitions that you can reuse throughout your model. Also, you can define values for data elements, called enumerations, that are available for selection in a run-time environment.

When creating simple data elements, structured data elements, and data structure definitions, see the following topics:

About Simple and Structured Data Elements

Simple data elements are reusable data types that contain no child dependencies. A simple data element has no structure, and is associated—directly or indirectly—to a primitive type (int, boolean, char, and so forth).

Structured data elements are reusable, complex data types that include embedded data types. Structured data elements contain simple data elements and other structured data elements.

For example, you might create a structured data element called building that contains the floor, room, aisle, rack, and shelf child elements. Structured data elements can also contain other structured data elements. For example, a structured data element called person might contain the child elements firstName, lastName, and the child structured data element address.

Related Topics

Creating Simple Data Elements

Creating Structured Data Elements

About Data Structure Definitions

Data structure definitions are structured data elements that you can use to create generic model definitions that are instantiated in the run-time environment.

Data structured definitions can be defined as abstract or final. A data structure definition that is defined as abstract cannot be instantiated; it is only intended to be extended by other entities. For example, an abstract data structure definition called vehicle can be extended by non-abstract definitions called car and motorcycle.

A data structure definition defined as final cannot be extended by other data structure definitions. For example, if the data structure definition car is defined as final it cannot be extended by other data structures. If it is not defined as final, the car data structure can be extended, for example, by the coupe data structure and by the convertible data structure.

You create data structure definitions in Model projects. After you create a data structure definition, open the entity in the Data Structure Definition editor to define its attributes, details, behaviors, and so on. You can define a key for each data structure definition, which uniquely identifies each instance of the data structure definition. See "About OSM Data in Model Projects" for more information.

Related Topics

Creating Data Structure Definitions

Creating Data Structure Definitions from Existing Data Elements

Data Structure Definition Editor

Creating Simple Data Elements

Simple data elements are simple data types. A simple data element cannot contain any child elements.

To create simple data elements:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the Dictionary tab.

  3. In the Dictionary view, right-click and select Add Simple Schema Element.

    The Create Data Schema Element dialog box appears.

  4. In the Entity field, select the schema entity into which the new element will be saved.

  5. In the Type field, do one of the following:

    • Click Select to select an existing simple data element as the base type for the new element. If you do not see any existing data elements in the resulting window, deselect the Filter Project Dependencies check box. The new element becomes a subtype of the element you select here, and inherits the base type attributes. See "Leveraging Existing Data Information" and "Deriving from Base Type Elements" for more information about extending existing elements.

    • Click Clear to remove the association of the base type element and to use a primitive type as the base type.

  6. In the Primitive Type field, select a data type for the new element.

    If the new element inherits from a base type element, the primitive type of the base type element displays in this field. Base type and subtype elements must both be defined by the same primitive type.

  7. In the Name field, enter the name for the data element.

    Design Studio uses the value defined in the Type field (if specified) as the default value in the Name field. Oracle recommends that you use the default value.

  8. In the Display Name field, enter the name for the new element that appears in Design Studio editors and in the run-time environments.

    Design Studio supports multiple languages for this field. The field adjacent to Display Name displays your list of languages. You can define a display name for any language you select from the list.

    If your preferences are set up to work in one language only, the system displays only the [default] option. See "Defining Language Preferences" for more information.

  9. In the Multiplicity field, define the minimum and maximum number of times the data element can appear in an instance document.

    See "Details Tab or Attributes Tab" for more information about defining values for this field.

  10. (Optional) Select Abstract to indicate that the data element is intended to be inherited and not referenced.

    If abstract data elements are referenced, a warning marker will appear in the Problems view.

  11. In the Length field, specify the minimum and maximum lengths for primitive types that support length restriction.

    See "Details Tab or Attributes Tab" for more information about defining values for this field.

  12. In the Default field, assign a default value for simple data elements.

    The default value must be of the same type as the data element. For example, if the data element is a string, the default value must be a string.

  13. Click OK.

    The new simple element appears in the Dictionary view.

Related Topics

About Simple and Structured Data Elements

Data Schema Editor

Creating Structured Data Elements

Structured data elements are reusable, complex data types that include embedded data types. Structured data elements contain simple data elements and other structured data elements.

To create structured data elements:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the Dictionary tab.

  3. Right-click in the Dictionary view and select Add Structured Schema Element.

    The Create Data Schema Structure dialog box appears.

  4. In the Entity field, select the schema entity into which the new data element will be saved.

  5. In the Type field, do one of the following:

    • Click Select to select an existing structured data element as the base type for the new element. The new element becomes a subtype of the element you select here, and inherits the base type attributes. See "Leveraging Existing Data Information" and "Deriving from Base Type Elements" for more information about extending existing elements.

    • Click Clear to remove the association of the base type and to use Structure as the base type.

  6. In the Name field, enter the name for the data element.

    Design Studio uses the value defined in the Type field (if specified) as the default value in the Name field. Oracle recommends that you use the default value.

  7. In the Display Name field, enter the name for the new data element that appears in Design Studio editors and in the run-time environments.

    Design Studio supports multiple languages for this field. The field adjacent to Display Name displays your list of languages. You can define a display name for any language you select from the list.

    If your preferences are set up to work in one language only, the system displays only the [default] option. See "Defining Language Preferences" for more information.

  8. In the Multiplicity field, define the minimum and maximum number of times the data element can appear in an instance document.

    See "Details Tab or Attributes Tab" for more information about defining values for this field.

  9. (Optional) Select Abstract to indicate that the data element is intended to be inherited and not referenced.

    If abstract data elements are referenced, a warning marker will appear in the Problems view.

  10. Click OK.

    The new structured element appears in the Dictionary view.

Related Topics

About Simple and Structured Data Elements

Data Schema Editor

Creating Data Structure Definitions

Data structure definitions are structured data elements that you can use to create generic model definitions that are instantiated in the run-time environment.

To create a data structure definition:

  1. From the Studio menu, select Show Design Perspective.

  2. In the Studio Projects view, right-click a model project, click New, and then select Data Structure Definition.

    The Data Structure Definition dialog box appears.

  3. (Optional) Click the Extends field Select button.

    In the Matching items area, select a data structure definition that you want the new data structure definition to extend, or click New to create a new data structure definition that you want this data structure definition to extend.

  4. In the Name field, enter a name for the data structure definition.

    The name must be unique among data structure definition entities.

  5. (Optional) Select a location for the data structure definition.

    By default, Design Studio saves the data structure definition entity to the root level of the project folder. You can enter a folder name in the Folder field or select a location different from the default if you want to create additional subfolders. To select a different location:

    1. Click the Folder field Browse button.

    2. Navigate to the directory in which to save the entity.

    3. Click OK.

  6. Click Finish.

    The new data structure definition entity appears under the model project in the Studio view.

Related Topics

About Data Structure Definitions

Data Structure Definition Editor

Creating Data Structure Definitions from Existing Data Elements

Creating Data Element Enumerations

You can define values for data elements that are available for selection in a run-time environment. For example, you can define a set of values for data elements that appear as drop down lists in the run-time environment.

To create data element enumerations:

  1. From the Studio menu, select Show Design Perspective.

  2. In the Studio Projects view, double-click any Data Schema entity.

    The entity appears in the Data Schema editor.

  3. In the Data Element tree, select a data element.

    The data element subtabs appear in the Element area.

  4. Click the Enumerations tab.

  5. Click Add.

    Design Studio creates a new row in the Included table and uses placeholder text for the Code and Description values.

  6. Click the placeholder text in the Code or Description column.

    The placeholder text becomes editable.

  7. Edit the placeholder text.

  8. (Optional) To make the enumeration the default value in the run-time environment, click inside the Default column and select Yes.

  9. (Optional) To specify the language in which to display the selected enumeration value, enter the name in the Language field.

    If your preferences are set up to work in one language only, the system displays only the [default] option. See "Defining Language Preferences" for more information.

Related Topics

Enumerations Tab