Define the terms entity, attribute, role and relationship between the entities, giving examples for each of them.
Ans: Entity: An entity is a "thing" or "object" in the real world that is apparent from other objects. For instance, a person and bank account can be referred as entities.
Attribute: Entities are explained in a database by a set of attributes, that is the characteristics of an entity are termed as attributes. For instance, name, age, date of birth, etc are attributes of the entity person. Likewise, nature of account, account number, balance, etc is attributes of the entity bank account.
Relationship: A relationship is an association between the various entities. For instance, a depositor relationship relates the entity person with a bank account.
Role: The function which an entity plays in a relationship is called that entity's role. For instance, in the relationship depositor defined above, the entity person plays the role of a customer in the relationship.