Section 1: Creating a Data Model
In this section, we will be learning how to create a data model from scratch using ER/Studio Data Architect.
Launch ER/Studio Data Architect
Click on the New Data Model icon
Choose Draw a new data model and Relational as the preferred choice.
Click OK to complete.
You will now be presented with a blank canvas as shown below.
Now Click on the Entity icon as shown below. The blue circled indicates the Entity icon
We will place two entities onto the canvas. We will create two entities, Dept and Emp and build a relationship between the two.
Your model should resemble the same as shown below.
Section 2: Editing the entities
Double click on Entity1 and launch the Entity Editor
Under Entity Name: Dept, the table name will automatically change.
To add an attribute just click on the Add button.
Add the following columns with datatypes as shown in the image below.
- DeptID Char(10) not null, Add to Primary Key
- Dname Char(10)
- Loc Char(10)
Click on OK to close the Entity Editor
We will now edit Entity2 and call it Emp and we will add the following columns.
Empno Char(10) Not NULL, Add to Primary Key
Ename Char(25) NULL,
DeptID Char(10) Not NULL -> once we have created this entity we shall make them related.
Your Entity should resemble as shown below.
Section 3: Creating the relationship
In this final section, we shall put the pieces together that comprises of a relationship between two entities.
Click on the Identifying Relationship icon circled in blue, as shown in the image below.
Click on the Dept Entity where it points to DeptID and move your cursor to the Emp Entity and point it to the DeptID. You will now get a screen like this as shown below.
The above section explains that you are trying to connect a duplicate value. Choose Replace existing Attribute with Propagating Attribute.
Click on OK to commit the changes.
You should now see the finished model as shown in the image below.
Finally, Congratulations! You have successfully created your first Logical Data Model in ER/Studio Data Architect.
In the next article in the series, we shall learn how to convert the above Logical Data Model to a Physical Data Model and push the changes to an actual Database.
Please feel free to reach out to me for any questions or visit our website for more information at:
Contact Us Today for a 1 on 1 Personalized Demo!
You may also e-mail us for more information.