Models and modelling
Models and modelling

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

8.3 Entities

Here is the definition of an entity.

An entity represents a thing that has meaning in a given context and about which there is a need to record data.

A data model is not concerned with the individual entities. Instead, it describes particular types of entity. For example, all students are represented by the same types of data (student identifier, name, whether or not registered, and region). Therefore, we simply record the Student entity type that defines the properties common to the collection of all students:

Student (Studentid, Name, Registered, Region)

Thus Student is the name of an entity type with properties of student identifier (named Studentid), student name (Name), whether registered or not (Registered) and location (Region).

An entity type is given a meaningful name for future reference. In this example, there are five entity types: Staff, Student, Course, Enrolment and Assignment. Thus an entity type is a convenient device for representing what we know about the actual entities themselves. Table 5 contains six entities of type Student (each column is headed with the name of a particular property – also known as an attribute).

Table 5 Some entities of the entity type Student
StudentidNameRegisteredRegion
S01AkeroydYesEngland
S02ThompsonNoScotland
S05EllisNoNl
S07GilliesYesScotland
S09ReevesYesEngland
S10UrbachYesWales

Entity types are represented on an E–R diagram as a box containing the name of the entity type.

An attribute (property) is a component of an entity type that represents a single property of the entities of that type.

Thus Studentid, Name, Registered and Region are the attributes of the Student entity type. Note that the term ‘attribute’ is a type concept, but it has become conventional to use the term ‘attribute’ rather than ‘attribute type’.

The values in a table such as those in Table 5 above are known as occurrences or instances of a particular attribute. So, S01 is an occurrence of the attribute Studentid, and Gillies is an occurrence of the attribute Name.

An important E–R data modelling characteristic is that there is a specific way to distinguish entities of the same type, from one another, by using the idea of an identifier. An identifier is a particular attribute with the property of uniqueness, such that no two entities of the same type have the same value for that attribute. For example, the attribute Studentid is the identifier for the Student entity type and the attribute CourseCode is the identifier for the Course entity type. When it is not possible to find a single attribute with the uniqueness property, a combination of attributes is used as an identifier. For example, the two attributes Studentid and CourseCode together form an identifier for the Enrolment entity type. When we write entity types as we did above, it is conventional to underline an attribute that comprises the identifier.

There are three roles for an identifier and they are as follows.

  • As an assertion of existence. An occurrence of the Student entity type with the value S02 for its identifier is an assertion that a student exists and is registered with that student identification number.

  • As a reference. An identifier such as S02 refers uniquely to a specific student; given this identifier, we can examine the above table to discover that the student with this identifier is named Thomson.

  • As a constraint. No two students can have the same identification number.

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to University-level study, we offer two introductory routes to our qualifications. You could either choose to start with an Access module, or a module which allows you to count your previous learning towards an Open University qualification. Read our guide on Where to take your learning next for more information.

Not ready for formal University study? Then browse over 1000 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus371