Using Data Modeler
Using Data Modeler
Using Data Modeler
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Figure 5ID-based ColumnsID-based Key vs. Candidate KeyAn ID-based key is considered to have distinct advantages over a candidate key, whenchoosing a unique identifier for a table. One of these advantages is an ID-based key’sability to maintain a constant size, because it is a system-generated value.Another advantage is that an ID-based key uses one column, whereas a candidate keymay need to use multiple columns to uniquely identify the table. <strong>Using</strong> a singlecolumn results in a simpler, cleaner database design, because in relationships only onecolumn not multiple columns migrates as a foreign key.<strong>Using</strong> multiple columns also makes it more difficult to ensure unique entries in thetable. For example, in the T_Physician table you may use name and address ascandidate keys, but you may encounter duplications if one physician has the samename as another physician who lives at the same address, such as would occur in amother-daughter situation. To avoid this you may use ssn as the candidate key, butthen there is a greater likelihood of this information being entered incorrectly. Asystem-generated ID-based key reduces these problems.Domain ColumnsYou can map attributes to domains if you already have a domain defined in your datamodel. Refer to Chapter 4, Physical <strong>Data</strong> Modeling for more information on creatingdomains in the data model. Domains can act as a user-defined data typecorresponding to a specific DBMS language. It is important that you assign yourdomain to the same DBMS language that you will use for your data model, so yourdomain will be compatible with your database.You map attributes to domains by setting the attribute type to the name of yourdomain. In the transformation process, the attribute transforms to a column using thedomain name as the data type, thereby using the domain’s defined data type andsettings.16 Chapter 3 - Logical <strong>Data</strong> Modeling