Click to visit our new website
attributes of entities explained and discussed Navigation

attributes of entities

This content is an extract from GetAhead in Business Analysis - the FULL course is in eBook and multimedia CD-Rom format.

Attributes of Entities.
Many different occurrences of a given entity type can usually be identified. In the gift shop example both of the entities 'order' and 'suppliers price list' had numerous occurrences. Each entity type can always be described in terms of attributes, and these attributes will apply to all occurrences of that given entity type. In the camera shop example, all occurrences of the entity 'supplier' could be described by an identifiable set of attributes, including:The Supplier Name, The Supplier Address, The Supplier Telephone Number, Etc. A given attribute belonging to a given entity occurrence can only have one value. Therefore, if a supplier could have more than one address or telephone number then this should be determined before defining the attributes of that entity type. In this example the defined entity may require two or three address and/or telephone number attributes. It is the maximum practical instances of a given attribute that should be catered for in the entity type definition.

Primary Key.
The primary key is the attribute (or group of attributes) that serve to uniquely identify each entity occurrence. Consider the problem that might arise if the name and address of an individual were used as the primary key for identifying the patients within a hospital. Think about this for a moment before reading on. Consider the example of a patient called David Smith living at 23 Acacia Avenue. He has a son also called David Smith living at the same address.
Name and Address would not necessarily provide a unique identifier and confusion could easily arise, potentially creating a mix up with the patient records.
For this reason, in a hospital system patients each have a Patient Number as their primary key.

Compound Key.
If two or more data items are used as the unique identifier, then this represents a compound key. For example, a compound key used to identify a book could be 'Title' together with 'Author'. There may be occasions of authors using a previously used title but not of an author using the same title for more than one of their own books. Where several possible primary keys exist they are called candidate keys. For example, a book could be identified, either by 'Title' together with 'Author' or by the widely used unique identifier for books - the ISBN number.

Foreign Key.
Where an attribute of one entity is a candidate key for another entity, it is termed a foreign key. In the example shown the attribute 'Author' belonging to the entity Book is a foreign key within the entity Author. You may be able to think of some shortcomings to the use of this attribute as the primary key, for example two authors having the same name. It is worth noting that entity relationships are often indicated by the presence of foreign keys.

The Entity Description Form.
This page shows an example entity description form for the entity 'suppliers’ price list', which was identified in the camera shop example. It shows the typical layout of an entity description form. The form contains the following information:
1. Any master and/or detail entities of the entity are named.
2. A brief description of the entity is given.
3. The typical average capacity is stated, the max. and min. capacities could also be shown if of interest.
4. A slash or similar mark is used to indicate any data items used as the key. Here a compound key (Name & Address) is being used.
5. All of the data items (attributes) of the entity are listed.
6. The size details the number of bytes needed to store the data item.
7. This comments column is used for any additional information that the analyst considers necessary or useful.

This content is an extract from GetAhead in Business Analysis - the FULL course is in eBook and multimedia CD-Rom format.            TOP

                                                                                                                                                                    <PREVIOUS    NEXT>

        All Material - Copyright Interactive Training Technologies (2000 - 2005). All Rights Reserved.