Free tutorials & notes in Hindi & English · Clean code examples 🧰 मुफ़्त PDF और फ़ोटो टूल्स →
MySQL + SQL · Lesson 15

Relation, Tuple, Attribute, Domain, Degree और Cardinality

औपचारिक शब्द

किताबें relational databases को relation, tuple, attribute, domain, degree और cardinality जैसे औपचारिक शब्दों से वर्णित करती हैं। ये जटिल लगते हैं, पर हर एक बस table के परिचित हिस्से का नाम है। इन्हें सीखना आपको DBMS theory और exam सवाल आसानी से पढ़ने में मदद करता है।

💡 Relation = table, tuple = row, attribute = column। बाक़ी उनके आकार और values बताते हैं।

Relation

Relation बस एक table है — rows और columns का set। यह शब्द relational model के गणितीय आधार से आता है। जब भी आप "relation" पढ़ें, एक table की कल्पना कीजिए।

rollnamemarks
1Aman88
2Diya92

यह पूरी table एक relation है, (मान लीजिए) Students कहलाती।

Tuple और attribute

  • Tuple — एक row (record)। ऊपर की table में, (1, Aman, 88) एक tuple है।
  • Attribute — एक column (field)। roll, name और marks attributes हैं।

तो relation tuples (rows) से बनी है, और हर tuple के हर attribute (column) की एक value है।

Domain

Domain किसी attribute के लिए allowed values का set है। जैसे:

  • marks का domain: 0 से 100 तक integers।
  • name का domain: अक्षरों की strings।
  • gender का domain: {Male, Female, Other}।

किसी attribute में कोई भी value उसके domain से आनी चाहिए, जो data मान्य रखता है।

Degree और cardinality

  • Degree — attributes (columns) की संख्या। Students relation का degree 3 है।
  • Cardinality — tuples (rows) की संख्या। 2 students के साथ, cardinality 2 है।

याद रखने का आसान तरीका: degree columns गिनता है, cardinality rows गिनती है।

संबंधित key शब्द

  • Relation schema — संरचना: Students(roll, name, marks)।
  • Relation instance — किसी पल की असली rows।
  • Primary key — वो attribute जो हर tuple को विशिष्ट पहचानता है।

ये औपचारिक शब्दों को उस schema-और-instance विचार से जोड़ते हैं जो आप पहले से जानते हैं।

आम गलतियाँ

  • यह सोचना "relation" मतलब relationship। Relation एक table है, tables के बीच link नहीं।
  • Degree और cardinality बदलना। Degree = columns; cardinality = rows।
  • Domain को data type से मिलाना। Domain allowed value set है; data type व्यापक है।
  • Tuple और attribute मिलाना। Tuple एक row है; attribute एक column।

सारांश

  • Relation = table; tuple = row; attribute = column।
  • Domain = किसी attribute के लिए allowed values।
  • Degree = columns की संख्या; cardinality = rows की संख्या।
  • Relation schema संरचना है; instance मौजूदा data।
  • ये औपचारिक शब्द बस परिचित table हिस्सों को फिर से नाम देते हैं।

आगे, model दोहराइए relational database में, या संरचना बनाम data विचार schema vs instance में।

अक्सर पूछे जाने वाले प्रश्न (FAQ)

DBMS में relation क्या है?
Relation relational database में table का औपचारिक नाम है। यह rows (tuples) और columns (attributes) का set है। तो जब किताब "relation" कहती है, इसका मतलब बस एक table है।
Tuple और attribute क्या है?
Tuple relation की एक row है (एक record), और attribute एक column है (एक field)। जैसे, students table में, हर student एक tuple है, और name व marks attributes हैं।
DBMS में domain क्या है?
Domain किसी attribute के लिए allowed values का set है। जैसे, marks column का domain 0 से 100 तक integers हो सकता है, और gender column का domain {Male, Female, Other} हो सकता है।
Degree और cardinality में क्या अंतर है?
Degree relation में attributes (columns) की संख्या है। Cardinality tuples (rows) की संख्या है। तो 3 columns और 50 rows वाली table का degree 3 और cardinality 50 है।
Relation schema बनाम relation instance क्या है?
Relation schema संरचना है — relation नाम और उसके attributes, जैसे Students(roll, name, marks)। Relation instance किसी दिए समय पर उसमें tuples (rows) का असली set है।
🔗

Share this topic with a friend

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

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

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

अगला topicDBMS में Schema और Instance आपकी प्रगति: 15 / 151 (10%) · Lesson 16 / 151 आगे बढ़ें →

यह lesson कैसा लगा?

आपकी राय से हम content और बेहतर बनाते हैं।

अपना review और सुझाव लिखें (वैकल्पिक)

Review approve होने के बाद आपका नाम और शहर इसके साथ public दिख सकते हैं। Email या phone न लिखें।

▶ CodingEasily on YouTube

Video से सीखें – आसान Hindi में

चुनी हुई video: RDBMS भाग 3 – Class XI Commerce IT

▶ Channel subscribe करें