MySQL + SQL · Lesson 23

Entity, Relationship and Attributes

Entities, Attributes, Relationships

These three are the core of the ER model. This page explains each in depth, including attribute types and weak entities.

Types of Attributes

TypeMeaningExample
SimpleCannot be dividedage
CompositeCan be dividedname → first, last
MultivaluedMany valuesphone numbers
DerivedCalculated from othersage from DOB
KeyUnique identifierroll_no

Strong vs Weak Entity

  • Strong entity: has its own key (Student).
  • Weak entity: depends on a strong entity, no key of its own (e.g. Dependent of an Employee).

Summary

  • Entities=objects, attributes=properties, relationships=links.
  • Attribute types: simple, composite, multivalued, derived, key.
  • Weak entities depend on strong entities.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

\n

💻 Live Code Editor

Is page ki language (MYSQL) mein code likhein aur turant chalाएं — yahीं, bina kuch install kiye.
Powered by OneCompiler. Agar editor na khule to yahान naye tab mein kholein.

💻 Live Code Editor

Is page ke program yahan ready hain — chalाएं, badlें aur seekhें. Bina kuch install kiye.
Powered by OneCompiler. Editor mein code apne aap aa jata hai — Run dabaakर output dekhें. Agar load na ho to naye tab mein kholें.