teach-ict.com logo

THE education site for computer science and ICT

1. Introduction - Entity

This section assumes that you know what primary and foreign keys are - if not see this section first.

Any system (computerised or otherwise) can be represented as a collection of one or more objects, things or entities.

An entity is any item or object about which data can be collected

For example a physical system called a school is made up of one or more buildings, each of which contain classrooms, each classroom has a number of desks, chairs and so on. So in this example, a 'building', 'classroom', 'desk', 'chair' are entities of the system called 'school'.

A very important aspect of entities within a system is that they have a relationship. For example 'a classroom' contains one or more instances of the 'desk' entity, the relationship is the term 'contains'.

A graphical method called an entity-relationship diagram will be discussed in this section and how they are used to model data.

Of course a school is a real physical system, but the idea applies equally well to an abstract object such as a software system. And this is why Entity-Relationship diagrams are so useful - they enable you to see each entity making up a system and their relationship to one another.

database field

If you note the definition of entity above, it mentions data. Therefore E-R diagrams are an excellent way of modelling data within a relational database. The 'system' is the complete database, the 'entities' are the tables within the database which are also related to one another in some way.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What is an entity relationship diagram