Toad World® Forums

Delete Problem?


#1

In version 3.0.8.193, I noticed that I had a few extra attributes for an entity. Upon further investigation I discovered that these attributes were the result of relationships that I thought I had deleted. Further, I discovered that the model contained a number of entities that I thought I had deleted. These relationships and entities were not visible in the diagram.

I suppose it’s a feature that I can have things that are in the model, but not visible on a diagram. However, if I can add things to the model via the diagram, I ought to be able to delete them through the diagram as well and I cannot find a way to do that. Perhaps, the delete key should trigger a dialog that asks whether you want to delete the item from the diagram or the model or perhaps the context menu that pops up when you right click on an item should include a Delete From Model entry or perhaps both.

Rodney


#2

If you highlight an entity on the model and press the delete key, it’s removed from the workspace. You can see what is not included on a workspace by right clicking the workspace and selecting “Comlete from Model…” on the drop down menu. To completely remove an entity from a model select “Model | Entities…”. Selecting an entity in the dialog will activate the delete button.

There are probably other ways to perform these operations as well. Those are the ones that I know off the top of my head.


#3

Hi,

Yes, this is how it works in TDM 3.
Here’s a brief summary on this issue.

In Toad Data Modeler 3, there are two deletion options (see the Objects menu):

  • Remove from Workspace (Delete) - Removes an object shortcut from Workspace.

  • Delete Object (SHIFT+Del) - Deletes an object with all its shortcuts from model.

Deleting from Workspace
Options:

  1. Select an object (shortcut of object) in WS and press Delete (also Objects menu
    | Remove from WS).

  2. In Model Explorer, select a shortcut of an object in the Shortcuts folder | right-click
    | Delete Item.

Deleting from Model
Options:

  1. Select an object (shortcut of object) in WS and press SHIFT + Delete (also Objects menu | Delete Object).

  2. From the Model menu, select an object type (Entities, Relationships). Select an object you like to delete in the opened dialog (e.g. entity in the Entities dialog) and click Delete.

  3. In Model Explorer, select an object (e.g. particular entity) | right-click | Delete Item.

Feel free to use the delete options you prefer.

Regards,

Vladka


#4

I expect that most models will consist of a single workspace and that it will be a common mistake to use the Delete key when attempting to delete an object from the model. However, I see how it works now. Thanks for the clafification.

Rodney


#5

I expect that most models will consist of a single workspace

I believe, once you get the hang of it, you’ll find a use for multiple workspaces even in simple models. When you are dealing with a model that contains dozens or even hundreds of entities you’ll see where it greatly simplifies the visualization of the model to only include the entites of interest. I’ve attached an example.
multi_ws.doc (109 KB)


#6

Yea, I don’t dispute the usefulness of the ability to have multiple workspaces. However, I still feel that the most common use case will be a single workspace and that having the delete key not really delete an object from the model complicates that use case in favor of the less-frequently-used (but not necessarily rare) use cases. Just my opinion.

Rodney


#7

Hi Rodney,

we needed to find a way how to remove objects not from model, but from workspace only. We’ve decided to use the combination of Delete and SHIFT+Delete keys.

Imagine that Windows Recycle Bin is a “container” for removed files. And your model is a “container” for items removed from WS. If you delete a file in windows, it will be available in the Recycle Bin. If you press SHIFT+Delete, the file will be deleted permanently. We used the same combination of keys. Pressing Delete key just removes an object from WS (it is still available in the Model “container”) and pressing SHIFT+Delete removes an object permanently from a model.

We know it’s not exactly the same thing, but you can find there some similarity.

BTW: There are numerous reasons why we need the ability to remove an object from a WS. Examples:
Many users wants the ability to “hide” some objects or parts of model or don’t display them at all. Instead of hiding objects they can simply remove them from their workspace using the Delete key. (and add them back easily - right click the WS and select Complete from Model).

Moreover, TDM3 allows you to display e.g. entity more than once (it’s a helpful feature when you work with large database structures). Let’s say we have entity CUSTOMER that is displayed 5 times in our ERD. How to reduce the number of shortcuts? Using the Delete key.

I know, we could use simple Delete for deleting an object from a model and e.g. CTRL+Delete for removing an object from WS. But we believe that people might more likely understand the “SHIFT+Delete = real delete” case. I hope it makes sense.

Of course, we are ready to change the keys, that’s why I’d like to ask other readers of this post for their feedback.

Regards,

Vaclav


#8

I know, we could use simple Delete for deleting an object from a model and e.g. CTRL+Delete for removing an object from WS. But we believe that people might more likely understand the “SHIFT+Delete = real delete” case. I hope it makes sense.

Of course, we are ready to change the keys, that’s why I’d like to ask other readers of this post for their feedback.

As far as this user is concerned, I absolutely, positively, unequivocally, under any circumstance known, unknown, or contrived do NOT want the ‘Delete’ key to delete an object from the model. ‘Delete’ should remove an entity from a WS and SHIFT+Delete (or CTRL+Delete) can remove it from the model IF it has a confirmation. I hope I’ve stated my position on this without being rude.

This behavior is consistent with other ER modeling tools that I’ve used in the past. In order to completely remove something from the model, there should be multiple keystrokes or menu selections followed by a confirmation, because once it’s gone it’s gone. When you get toward an end state where a model contains the implementation for your business logic and documentation that goes into the implementation, you don’t want anything to disappear by a single inadvertent keystroke Then it becomes .


#9

Well, inadvertent keystrokes can go either way. The Undo feature helps address that. Version control systems also can help deal with mistakes that are detected until after they’ve been saved. It’s also common to have confirmation windows pop up with check boxes to stop such windows from annoying those who don’t want them. I can check that box and you can leave it unchecked. :slight_smile:

Regardless of how that falls out, a way to distinguish those objects in the model that are not in any workspace from those that are could be useful especially if it’s easy to end up with a bunch of trash that one expected to have been deleted. A feature to delete all objects that are not in a workspace could be useful in that case too (though not activated by anything as easy as pressing delete).

Rodney


#10

I still feel that the most common use case will be a single workspace

We’ll just have to agree to disagree. I’ve never been able to keep a model on a single workspace. There isn’t enough room to mange all of my entities

having the delete key not really delete an object from the model complicates that use case in favor of the less-frequently-used use cases

Again, I almost NEVER delete an object from a model. It would only be in a rare case where the object cannot be salvaged or it is indeed unneccesary that I would I completely remove an object from the model.


#11

I am using CS2 for some years now, and from my experience the DELETE in CS2 was a terrible mistake. And in combination with no UNDo support I remember some days that I spent rebuilding a lot of lost relationships.

I made a mistake by using delete for removing something from workspace and it actualy deleted whole thing from all models. I discovered it only days later when I finished working on that particula submodel.

After tha I had to crosscheck model versions and rebuild lost relationships, comments, etc.

I think the common knowledge is tha with delete you remove something from your point of view. And that is either view or model as a whole (if no submodel is present).

What’s better ? Having to delete something with additional help of SHIFT or rebuilding lost work ?