MySQL + SQL · Lesson 21

ER Model और ER Diagram

ER Model क्या है?

Entity-Relationship (ER) model tables बनाने से पहले database को visually design करने का तरीका है। यह entities, उनके attributes और उनके बीच relationships दिखाता है।

Building Blocks

ElementमतलबExample
EntityReal-world object (table बनता है)Student, Teacher
AttributeEntity की property (column बनता है)name, age
RelationshipEntities के बीच linkStudent studies Course
Key attributeEntity को unique पहचानता हैroll_no

Relationship Types

  • One-to-One (1:1): एक student का एक ID card।
  • One-to-Many (1:N): एक class में कई students।
  • Many-to-Many (M:N): students कई courses में enroll।

सारांश

  • ER model = visual database design।
  • Entity→table, attribute→column, relationship→link।
  • Relationships: 1:1, 1:N, M:N।
🔗

Share this topic with a friend

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

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

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