Introduction
In this blogpost I'll outline the concept of workspaces in Powerdesigner. A workspace is a container of models that you want to organize in a logical manner. Although, a workspace in Powerdesigner is a concept that is comparable with Visual studio solutions, there are some differences between the concepts of workspaces and visual studio solutions.Similarities between Powerdesigner and Visual Studio projects are that you can organize different files in a container, you can use folders and store files in a hierarchy of folders. It is possible to have multiple workspaces on a machine.
Now there is also the same concept of projects. In solution explorer of Visual Studio you can create projects as in Powerdesigner. Although, I haven't been investigate projects very thoroughly yet, projects seems very different in Powerdesigner than projects in Visual studio. In Visual Studio files are organized in (one or more) project(s) in a solution, but the concept of projects in Powerdesigner is a bit more different. Projects inPowerdesigner are supposed to show relationships between models and what the dependencies are.
Start with a workspace
Let's start looking at the concept of workspaces. When Powerdesigner is started a workspace is already there (in contrast with Visual Studio).
When the workspace file is saved, a .sws file is created with the a name that you gave.
Rename a workspace
Now saving the file with another name than the standard "workspace" does not change the name in Powerdesigner. You have to rename that too.And when you have done this, the workspace in Powerdesigner is renamed to different name.
So starting Powerdesigner and saving a Workspace at a proper place and renaming the workspace with a same name is advisable. This way there is less confusion.
Add a data model to a workspace
A next step is adding a data model to the workspace. That is possible with the menu option New > Physical Data Model (for instance).Now a Physical Data Model is added to the Workspace. Note that there are two levels in the Wokspace added. A Physical Model and a Physical Diagram. I'll show some more examples later.
Add a folder to a workspace
Yet another option to organize models in a workspace is the usage of folders. You can use the option New > Folder.Folders are logical organized in your workspace file and not physical. If you want to organize your model in a physical folder structure you can simply create them in the window folder and save your models there.
Organize models in folders
Models can be organized in models and now you can simply drag models to the folder and drop it there. The model (and diagram) is now present in the folder.And organize models in a physical folder on your file system.
Adding more models and diagrams
It's also possible to organize models and diagrams in different ways in a workspace. You can add diagrams to a model and you can add separate models and diagrams. Below an example of adding another diagram to a existing model.And off course you can add a new model/diagrams to a workspace.
If you insert different types of workspace objects to the workspace you can have something like this.
Save your workspace
You can save the workspace to disk and it can be confusing saving the models to the disk and using logical and physical folder all together. In my opinion, use only logical folders in your workspace because aligning physical and logical folders can be very difficult and confusing.How is the sws file organized?
I've added a screenshot of the workspace file (.sws) and this organized as a XML file. Notice that not all elements of the workspace are mentioned in the file. Only one model and one diagram is stored.
Final thoughts
This blogpost was about discovering the basic options of organizing a workspace in Powerdesigner. Using workspaces have some similarities and dissimilarities with Visual Studio projects.
Hennie