Getting Started with InfoSphere Data Architect
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 3 – Logical <strong>Data</strong> Modeling 59<br />
Note:<br />
If you don’t know what data type to choose, keep in mind the following considerations:<br />
• If an attribute or column is designed for arithmetic calculations, use a numeric data<br />
type.<br />
• Use text data types for all other attributes for the following reasons:<br />
- Text data types are more flexible; for example, you can use constraints to reduce<br />
storage size of data.<br />
- You can better control the input of text data types because DB2 offers more<br />
functions for string data types.<br />
However, sometimes you should use a numeric data type if you want the primary key to also<br />
be numeric (for example, surrogate keys are also numeric).<br />
Note that when you add attributes to the entity, the diagram is also updated. The<br />
STUDENT ID entity is now displayed in the key compartment of the STUDENT entity in the<br />
diagram, <strong>with</strong> an icon next to it to indicate that STUDENT ID is the primary key of the<br />
entity.<br />
Follow the same process outlined above to add more other attributes to the STUDENT<br />
entity. Add the following attributes to the STUDENT entity:<br />
4. Add the FIRST NAME attribute. The attribute has a data type of VARCHAR(20)<br />
and is required.<br />
5. Add the LAST NAME attribute. The attribute has a data type of VARCHAR(50) and<br />
is required.<br />
6. Add the START DATE attribute. The attribute has a data type of DATE.<br />
7. Add the GRADUATION DATE attribute. The attribute has a data type of DATE.<br />
8. Save your work.<br />
You have used the diagram editor to create a complete entity, as seen in Figure 3.8. Now<br />
let's learn how to use the <strong>Data</strong> Project Explorer to create another entity.