Home Ask Login Register

Developers Planet

Your answer is one click away!

Elda Backa February 2016

Difference between entities and relations in databases

I want to know if an entity is just a table in the database modelling context? And which is the difference between an entity and a relation? I know that the relation is the base concept of relational databases and has tabular presentation. Are the entity and the relation the same thing? Note: Do not confuse the relation with the relshionship.


Jacotdv February 2016

An entity is somting like an object, you can put a name to an entity. A relation is a "link" beetwen entity, you can put a verb to an entity, in your MCD of your databases. for exemple :

in your MCD DOG end are entity end part of is the relation

+-------+                +-----+
|DOG    |                |RACE |
|-------|                |-----|
|name   |---(part of)----|name |
|age    |                +-----+

in your MPD this MCD become :

+--------+                         +---------+
|tDog    |                         |tRace    |
|--------|                         |---------|
|id_tDog |                      +--|id_tRace |
|nameDog |  +--(tRace_to_tDog)--|  |nameRace |
|ageDog  |  |                      +---------+

Post Status

Asked in February 2016
Viewed 2,843 times
Voted 6
Answered 1 times


Leave an answer

Quote of the day: live life