Copying Objects

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

Go Up to Common Tasks

You can create copies of objects such as entities, tables, users, roles, shapes, functions, procedures, and schemas within the data model or between different data models.To copy and paste between different data models, you must have both models open in ER/Studio Data Architect. To resolve any referential integrity issues that arise from copying and pasting diagram objects, ER/Studio Data Architect applies several basic rules when copying:

  • Relationships: ER/Studio Data Architect only copies relationships that are within the set of model objects chosen. In other words, any relationships connected to entities outside of the selected set will not be duplicated. One important effect of this rule is that copied entities lose inherited foreign keys if you do not also include their parent entities.
  • Entity Types: Because ER/Studio Data Architect can drop relationships due to the rule above, ER/Studio Data Architect determines whether entities are independent or dependent based on their status within the selected set.
  • Unique Names: To preserve unique names, ER/Studio Data Architect compares the names of objects being pasted with the names of objects already located in the target mode. If there are duplicates, ER/Studio Data Architect serializes object names as "ObjectNameN," where N is a sequential number attached to the base name.

This section describes the following ways to copy objects:

Copying an Object in the Data Model Window

  1. On the Main toolbar, click the selection tool.
  2. In either the Data Model Explorer or the Data Model Window, click the object to copy and then press CTRL+C.

A copy of the object is created with the same attributes as the original. The name of the new object will be the name of the original object appended by 1, such as Entity1. If you create another copy of the object, the new object would be named Entity2. The copied object can be pasted into another model or submodel in the same file or in another open diagram.

Copying Multiple Objects

  1. On the Main toolbar, click the selection tool.
  2. To select objects that are close in proximity to each other, in the Data Model Window, click and drag the mouse to draw a lasso around the objects and then release the mouse button. In this way, you can also select the relationships associated with the selected objects.

To select objects that are not close to each other, in either the Data Model Explorer or the Data Model Window, press and hold CTRL while clicking each object.

To select all entities or tables in a model or submodel, in the Data Model Explorer, click the model or submodel, expand the object, and then press CTRL+A.

A copy of the object is created with the same attributes as the original. The name of the new object will be the name of the original object appended by 1, such as Entity1. If you create another copy of the object, the new object would be named Entity2.

Copying an Attribute

  1. On the Main toolbar, click the attribute selection tool.
  2. In the Data Model Window, select the attribute to copy, press CTRL+C, click the target entity, and then press CTRL+V.
  3. You can select multiple objects by right-clicking in the Data Model Window and then dragging the mouse to draw a lasso around the diagram objects and then releasing the mouse button. You can also select multiple objects by pressing and holding CTRL while selecting each object individually.

A copy of the object is created with the same attributes as the original. The name of the new object will be the name of the original object appended by 1, such as Entity1. If you create another copy of the object, the new object would be named Entity2.

Copying an Object from the Data Model Explorer to the Data Model Window

  1. On the Main toolbar, click the selection tool.
  2. In the Data Model Explorer, click the object you want to copy and drag it to the Data Model Window.
  3. You can select multiple objects by pressing and holding CTRL while selecting each object individually.

A copy of the object is created with the same attributes as the original. The name of the new object will be the name of the original object appended by 1, such as Entity1. If you create another copy of the object, the new object would be named Entity2.

Notepad blue icon 2.pngNote: You can select multiple objects by pressing and holding CTRL while selecting each object individually.

Copying Objects Between Models and Submodels

The following table describes the possible copy operations within the Data Model Explorer.

Data Model Objects

Copy Data Model Object From... to...

Logical to Physical

Physical to Logical

Main logical or submodel to logical submodel

Main physical or submodel to physical Submodel

Attributes

no

n/a

yes

n/a

Columns

n/a

no

n/a

yes

Entities

yes

yes

yes

n/a

Functions

n/a

no

n/a

yes

Procedures

n/a

no

n/a

yes

Roles

yes

no

yes

no

Schemas

n/a

no

n/a

yes

Tables

n/a

yes

yes

Users

no

no

yes

yes

Views

yes

yes

no

no

You can copy objects such as attributes, columns, entities, views, users, roles, and shapes from a logical model to a physical model and between models and submodels. You can copy functions, procedures, and schemas from one physical model to another and from one physical submodel to another physical submodel.

  1. On the Main toolbar, click the Select tool.
  2. In the Data Model Explorer, click the object to copy and drag it to the target node.
  3. You can select multiple objects of the same type by pressing and holding CTRL while selecting each object individually.

PTR MoveHand.gif The cursor changes to this symbol when the mouse is positioned over a valid target for pasting an attribute or column to another entity or table respectively.

Ptr NotAllowed.gif The cursor changes to this symbol when the mouse is positioned over an invalid target for pasting an object.

TOOL DROP.gif.The cursor changes to this symbol when the mouse is positioned over a valid target for pasting an entity, table, or view to a submodel within the same model or to a different model in the Data Model Explorer.

See Also