Getting Started with InfoSphere Data Architect
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 3 – Logical <strong>Data</strong> Modeling 61<br />
• STUDENT ID: Use the same properties that you used to create the STUDENT<br />
ID attribute for the STUDENT entity.<br />
• COURSE ID: Use the CHAR(8) data type. This is also a primary key.<br />
• SCORE PASSFAIL: Use the BOOLEAN data type. This attribute is required.<br />
• SCORE TOTAL: Use the DECIMAL data type, <strong>with</strong> a length/precision of 3 and<br />
a scale of 0. This attribute is required.<br />
You have created the GRADE entity. In some cases a composite key is needed. A<br />
composite key is a primary key that is made up of more than one attribute. Composite keys<br />
help make sure that your primary keys are always unique <strong>with</strong>out duplicating existing<br />
attributes. For example, to make the GRADE entity unique, you need a composite primary<br />
key: STUDENT ID and COURSE ID. This is shown in Figure 3.9.<br />
Figure 3.9 – Creating a composite key in the Properties view<br />
Note:<br />
When you delete objects from the diagram, they are not deleted from the data model. Use the<br />
<strong>Data</strong> Project Explorer to remove data objects from your data models.<br />
3.2.3 Adding relationships<br />
Now that you have created the two entities in this diagram, you need to specify how the<br />
entities are related. Since the information in this model is related to the student, the<br />
STUDENT entity is the parent entity.<br />
Just as you can create entities <strong>with</strong>in the diagram, you can also specify the relationships<br />
between data objects by using the diagram editor.<br />
Relationships types are identifying and non-identifying. In an identifying relationship, one of<br />
the child entities is a dependent entity. A dependent entity is an entity whose existence is<br />
based on the existence of another set of entity. A non-identifying relationship is one in<br />
which both entities are independent (also known as strong relationship set).<br />
Create a non-identifying optional relationship between the STUDENT entity and the<br />
GRADE entity: