Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between entity type and entity set? [closed]

Tags:

database

What is attribute. What is the difference between entity, entity type and entity set? Please explain the difference with an example.

like image 841
Niranjan Avatar asked Oct 30 '14 12:10

Niranjan


Video Answer


1 Answers

STUDENT

ID Name AGE

1 Ram 12
2 Sam 13

Above is an example of a table called Student having 2 rows (1,Ram,12) and (2,Sam,13) . Using this we can understand the difference.

Entity

It is something which has real existence. Like tuple1 contains information about Ram(id, name and Age) which has existence in real world . So the tuple1 is an entity. So we may say each tuple is an entity.

Entity Type

It is collection of entity having common attribute. As in Student table each row is an entity and have common attributes. So STUDENT is an entity type which contains entities having attributes id, name and Age.Also each entity type in a database is described by a name and a list of attribute.So we may say a table is an entity type

Entity SET

It is a set of entities of same entity type. so a set of one or more entities of Student Entity type is an Entity Set.

ATTRIBUTE

It is a property of an entity. For example, in table STUDENT id,name and Age are properties of an entity of entity type student. Hence these are attributes.

Comments are Welcome

like image 79
coder Avatar answered Oct 06 '22 00:10

coder