Transcript for:
Understanding Entity Relationship Model Concepts

Hello everyone and welcome to the course of DBMS. In this video, we're going to look into the basic concepts of entity relationship model or otherwise called the ER model. So basically in this video, we will be looking into few important terminologies in relation to the ER model. The Entity Relationship Model or the ER model describes data as entities, attributes and relationships. In this video, we will be mainly focusing on entities and attributes and in the later videos, we will be looking into the concept of relationships. Now what is an entity? It is a thing in the real world with an independent existence. That is, it is a thing or an object that has its own identity or that can be identified easily. An entity may be an object with physical existence like for example a house, person, an employee etc or it can be objects with a conceptual existence like for example course, job etc. So this is what an entity is. Next let us see what attributes are. Attributes are properties that describe the entities. For example, if I have an entity person, the properties that would describe this particular entity would be name, age, address, phone number, etc. So these are called as attributes of this entity. In our further videos, we will learn about each of the symbols that we have used here and also all the other symbols that we use in the ER diagram. Now let's look into the several types of attributes in the ER model with examples. First, let us see what composite attributes and simple attributes are. Composite attributes are attributes that can be divided into further parts. Whereas simple attributes are attributes that cannot be divided further. An example of a composite attribute is name. This attribute can be divided into further parts first name, middle name and last name. An example of a simple attribute is weight. This attribute cannot be further divided. Other examples could be salary, a person's age, etc. So this is about composite and simple attributes. Next, we have the single-valued attributes and multi-valued attributes. Single-valued attributes are attributes that have a single value or just one value for a particular entity. Whereas multi-valued attributes are attributes that can have a set of values for a particular entity. An example for a single-valued attribute is A particular person can have only a single value for this particular attribute. So age is a single valued attribute of a person. Examples of multi-valued attributes are college degree, languages known etc. A particular person can have more than one college degree and can also know more than one language. Since these attributes can have a set of values for a particular entity, it is called as a multi-valued attribute of a person. So these are about single-valued attributes and multi-valued attributes. Next, let us see what derived attributes and stored attributes are. Derived attributes are attributes that can be derived from other attributes. Whereas stored attributes are attributes from which the value of other attributes are derived. An example of a derived attribute is age. Since age can be derived from date of birth, this is called a derived attribute. Whereas date of birth or birth date of a person is a stored attribute because from this attribute we can derive age of a person. So this is a stored attribute from which the value of other attributes are derived. Next let us see what are complex attributes. A complex attribute has multivalued and composite components in it. We have already seen earlier in this video what multivalued and composite attributes are. So a complex attribute has both multivalued and composite components. Here in the complex attribute, a multivalued attribute is represented within curly brackets and composite attributes are represented within round brackets or parentheses. This is an example of a complex attribute. Here college degrees which is represented within curly brackets is a multi-valued attribute because one person can have more than one degree and within the parenthesis is the composite attribute. So this is about complex attributes. Next we are going to learn about null values. Null is something which is not applicable or unknown. So when does null value mean not applicable? In some cases, an entity might not have an applicable value for an attribute. Like for example, if I have an attribute college degree, this attribute applies only to persons with a college degree. Or if I have an attribute say the landline number, this attribute again applies only to persons who has a landline. So a person who has no college degree will have null for the attribute college degree and a person who has no landline phone will have null for the attribute landline number. So in this particular case the meaning of null is not applicable. Null can also be used when we don't know the value of an attribute. Like for example if we don't know the phone number of a particular entity here say Jeremy then that particular value of the attribute would be null. So in this case the meaning of null is unknown. The unknown category of null can be further classified into two cases. The first case is when the value exists but it is missing. Like for example, the age of Joshua exists but it is missing. So that value would be null. The second case is when it is not known if the value exists or not. Like for example, if we don't know whether the student Jeremy has a phone number or not, In that case, the value of the attribute phone number would be null. Hope you understood what null values are. The next terminology that we are going to learn is entity type. What is entity type? It is a collection of entities that have the same attributes. Example of an entity type is student. So here each record in this table is an entity. We have Harry, Jeremy and Joshua as the entities. These entities share the same attribute that is age and they belong to the entity type student. So an entity type is a collection of entities that have the same attributes. Now what is an entity set? It is a collection of entities of a particular entity type at a point in time. If I say I need students whose age is between 19 and 23, so at that particular point in time, all the students with age between 19 and 23 is an entity set. Next let us see what a key attribute is. A key attribute of a particular entity type is that attribute that is capable of identifying each entity uniquely. For example, role number of a student. Now in this table with entity type student, I have two students with the same name and also the same age. If I have to identify this particular student uniquely, I can identify her by her student ID or role number because no two students can share the same role number in a particular class. So the attribute role number or student ID is a key attribute to identify a student uniquely. Next, what is value set of attributes? Value set of attributes is a set of values that can be assigned to a particular attribute. For example, if the range allowed for the age of an employee is between 22 and 60, then we can specify the value set of the age attribute of an employee as a set of integer numbers between 22 and 60. So that is called as a value set. So these are the few important terminologies that we need to know in relation to the ER model. With this we come to the end of this video. Hope you have understood the definition of each of these terminologies. Thank you.