Creating and Editing Attributes

From ER/Studio Data Architect
Jump to: navigation, search

Go Up to Creating and Editing Attributes and Columns

There are two types of attributes:

  • Identifiers: Helps to identify an entity instance because it is all or part of the entity's primary key.
  • Descriptor: A non-key attribute. Following the rules of normalization, if an attribute is not part of the primary key, then its only purpose is to describe each entity instance.

Attribute definitions together with relationships can determine or enforce business rules. You can define a particular set of valid values for any attribute of any entity. For example, you can define a valid range of salaries for a subset of employees for an attribute called Salary. This set of values is known as a domain. For more information, see Ensuring Consistent Domain Definitions Using User Datatypes.

If you define your entities carefully, then defining attributes should be relatively straightforward. When you first add attributes to an entity, be sure to name your attributes appropriately. Attributes can be native to an entity or inherited via an identifying or non-identifying relationship. To promote consistency, ER/Studio Data Architect only lets you edit the properties of an entity's native attributes. To change the properties of a foreign key of a child entity, you must edit the attribute in the parent entity. For information on attribute naming rules and conventions, see Best Practices.

  1. In the Data Model Explorer, expand the Logical Main Model, right-click the Entities node, and then select the entity to which you want to add attributes.
  2. On the Attributes tab of the Entity Editor, click Add.
  3. Define the attribute as required and then click OK.

Main page

  • Domain Name: Lists all defined domains. You can bind any available domains to the attribute. To change the domain name, you must first select Override Bound Data on the Datatype tab.
  • Create Domain: Lets you create a new domain that is automatically added to the Data Dictionary. Enter a new Domain Name and then select Create Domain. When you click OK to save the changes, the new domain is created in the Data Dictionary.
  • Default Attribute Name: The column name is by default the attribute name. If you want a different column name, type a new one in the box. ER/Studio Data Architect uses this name when generating the physical model.
  • Logical Rolename: This option is only available when there is an overlapping foreign key in a logical model and the Synchronize Column Rolename with Logical Rolename option is not selected. Use this when the name of the child attribute differs from the parent attribute. In the logical model, ER/Studio Data Architect distinguishes between the logical rolename and the column rolename. ER/Studio Data Architect uses the column rolename when generating the physical model.
  • Hide Key Attribute: If selected, hides the key in the child entity. Commonly used to support partial migration of PK columns when you do not want to migrate primary key columns into child tables. ER/Studio Data Architect will not generate a foreign key because most database systems require that FKs have the same number of columns as the child. By selecting this option, you will 'remove' the column from the child table so that it won't show up in any child tables further down the FK chain, DDL generations or comparisons to the database. It will display as unavailable when editing the child table, but you can make it available again later.
  • Logical Only: If selected, the entity will not be implemented as a table when generating a physical model, and will be ignored when comparing the logical model with a physical model.
  • Synchronize Column Rolename with Logical Rolename Available when the attribute selected is a foreign key. This option affects name modification in the entity or table editor, on-screen name editing, and name modification in the Data Model Explorer. Lets you change the role names of foreign attributes or columns to the same names as other attributes or columns in the same entity or table. Duplicates will be unified when the user ends the edit session.
  • Add to Primary Key?: When chosen, adds the selected attribute to the Primary Key, which is used to index the entity enabling faster data retrieval.
  • Edit Foreign Key Datatype: When selected for a child object, you can edit the Datatype values of the foreign key. When this option is selected, changes made to this relationship in the parent are not propagated to the child until you deselect this option. This preserves the foreign key overrides.

Datatype tab

  • Override Bound Data: Overrides datatypes on an attribute basis (for supported types: SQL Server, Sybase, IBM DB2 for LUW, and IBM DB2 for z/OS). Used to handle any exceptions while maintaining the binding to the same domain. For example, there is a VARCHAR domain on two separate DBMS platforms. The character domain's primary use can be on Oracle. You specified it as VARCHAR (which will be VARCHAR2 in Oracle). Using this option, you can have a DB2 model where it is implemented it as CHAR. You can customize the domain's implementation to accommodate the specific platform, without losing the bindings between DB2 columns and the domain.
  • Identity Properties: For numeric datatypes for which nulls are not allowed and for whose datatype supports identity properties, you can specify identity properties by selecting the Identity Column option and then specifying a seed and increment value. The seed and increment values are used to automatically generate sequential numbers for each row in the table beginning with the Seed value and incrementing by the amount specified by Increment. The default seed and increment values are one but can be changed.

Default tab

If a default value has not already been bound to the entity attribute (Data Dictionary > Defaults > Edit Default Definition > Binding Information), you can type a Declarative Default or select Override Bound Data and then choose another value from the Default Binding list. The declarative default will appear in the SQL produced when you select Generate Database from the physical model. If a default value attribute has been previously bound to the entity, you can override the default by selecting another default from the Default Binding list. For more information, see Working with the Data Dictionary. If the attribute selected is a primary key of the entity, you have the option to select the option to Propagate Default to Child Keys.

Rule/Constraint tab

Lets you select a rule binding from the Data Dictionary or manually type in a rule binding. The exact text in the declarative box gets inserted into the physical model DDL. Add, modify, or delete a constraint. Check constraints are used to ensure the validity of data in a database and to provide data integrity. For more information, see Enforcing Data Integrity Using Check Constraints. If the information is grayed out (read-only) it is because a domain is being used and the definition, datatype, rule, constraint or default is inherited from the domain.

Definition tab

Enter or edit a definition for the attribute. If the target database supports it, ER/Studio Data Architect adds this definition as an attribute comment when generating SQL code.

Notes tab

The notes added here are included as part of the HTML report when you generate a report for the model. You can format the notes using standard HTML tags.

Where Used tab

Shows which logical and physical models and submodels implement the attribute. Also shows the denormalization mapping history of the table. From the Where Used tab you can edit mappings and user-defined mappings. For more information, see Associate Similar Objects Using User-Defined Mappings.

User-Defined Mappings tab

Shows any existing user-defined mappings (UDM) for this attribute. UDMs tie data together that can be conceptually related but not necessarily with concrete transactional relationships. UDMs are not used when comparing data models or when generating SQL. Use the Notes tab to describe the relationship between entities that is created using user-defined mappings. For more information, see Associate Similar Objects Using User-Defined Mappings.

Reference Values tab

For information, see Defining Valid Attribute Data Using Reference Values.

Naming Standards tab

Controls User and Object Permissions to modify the attribute. When a Naming Standards Template is bound to an object, then that template is used instead of the Naming Standards Template selected in the Naming Standards Utility or the Generate Physical Model utility. This allows you to apply different naming standards to different objects when portions of a model require different versions of a standard. For example, some objects already exist in the database and you do not want to apply a newer naming standard to them. The Freeze Names option when selected prevents any naming standards applied from changing the name of the attribute selected.For more information, see Enforcing Naming Standards Using Naming Standards Templates.

Compare Options tab

Lets you select which, if any, properties of the attribute to ignore when comparing this attribute to another using the Compare and Merge Utility. For more information, see Using the Compare and Merge Utility.

Data Lineage tab

Maps the rules from source to target entities and attributes in the model. At the attribute level, you can add transformation logic for source/target attribute mapping. You can map multiple source/targets to one attribute in the physical model. For more information, see Documenting Column/Attribute ETL and Data Lineage Workflow.

Security Information tab

Displays the current security information as defined in the Data Dictionary. You can add or edit security reporting information in by double-clicking the field you want to change. To set the model-wide default value for a property, go to the Data Dictionary tab and expand the Data Security Information Node. For more information, see Enforcing Security Using Data Security Types and Properties.

Attachment Bindings tab

Bind an external piece of information, or attachment to the attribute. You can also remove an attachment from an object, override an attachment binding's default value, or change the position of a bound attachment. To override the value of the attachment you have moved to the Selected Attachments grid, double-click the Value field of the target attachment. ER/Studio Data Architect opens the Value Override Editor or a list depending on the attachment datatype. Attachments are created in the Attachments folder of the Data Dictionary and must be applied to the attribute before they will display on this tab. For more information, see Attaching External Documents to the Data Model.

Data Movement Rules tab

Displays the data movement rules that have be assigned to the attribute. Allows you to override the default rules assigned to the table/entity in the Data Movement Rules editor of the Data Dictionary. Here you can apply or remove data movement rules. The Data Movement rule could be something like 'Data for this table is updated after 30 days.' For more information, see Relating Source and Target Tables and Columns.


  • Choosing the correct datatype is a critical data integrity and storage consideration. Select a datatype that is efficient for its intended use but properly accommodates the data it stores. Your choice of database platform dictates your choice of column datatypes because each has its own set of datatypes. For example, some databases have binary datatypes; others do not. Some provide support for blobs and text, but many do not. Finally, only a few databases support user-defined datatypes. ER/Studio Data Architect can convert datatypes between different databases; however, some conversions can only be approximations.
  • Another important consideration in specifying datatypes is determining the appropriate width, precision and scale, as applicable. You want to store data efficiently, but not at the expense of completeness, accuracy or precision.
  • For information on datatype mapping, see Customizing Datatype Mappings. If you want to enforce datatypes across common columns, use Data Dictionary Domains. For more information, see Reusing Attribute Definitions Using Domains.
  • When determining attribute and column names, make sure you consider the naming rules of the target database. Some key considerations are name length, avoiding the use of reserved words, and prohibited characters. Most databases restrict name lengths to 30 or 18 characters. All have reserved key words that cannot be used in names unless surrounded by quotes. Certain characters, such as a space, *, +, and % are also prohibited from being used in names.
  • You can specify naming rules, the default datatype and whether NULL values are permitted for the attributes created with the default datatype on the Logical tab of the Options Editor by choosing Tools > Options > Logical.
  • You can specify the order in which the attributes appear on the Display tab of the Options Editor by choosing Tools > Options > Display.
  • You can specify the level of synchronization between the attribute and column names, choose Tools > Options > Name Handling.
  • The status bar at the bottom right of the application window displays the number of entities in the selected model.

See Also