Difference between entity type and entity set? [cl

2020-05-21 05:01发布

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

标签: database
4条回答
狗以群分
2楼-- · 2020-05-21 05:25

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

查看更多
不美不萌又怎样
3楼-- · 2020-05-21 05:26

Entity type is a group of entities that has similar attributes. While, Entity set of entities of the same entity type.

查看更多
小情绪 Triste *
4楼-- · 2020-05-21 05:37

Entity means anything with distinct and independent existence. Entity type is basically a collection of entities that have the similar attributes. Entity set is the collection as a set of all entities of the similar type. So, Entity type and entity set are analogous. Example of entity set: set of all persons, universities, companies An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Example: student = (student-id, student-name, address-street, address-city), item = (item-number, price)

查看更多
三岁会撩人
5楼-- · 2020-05-21 05:44

The entity type refers to the collection of entity that share a common definition Entity set is the set of entities of the same type that share the same attributes.Eg set of all people who are customer at a particular bank can be defined as the entity customer.

查看更多
登录 后发表回答