Degree of Relationship in DBMS in Hindi
DBMS में Relationship की Degree यह बताती है कि एक relationship में कितने entity sets शामिल हैं, यानी यह दिखाती है कि कितनी entities आपस में जुड़ी हैं।उदाहरण के लिए यदि दो entity sets जुड़े हैं तो degree दो है। यदि तीन entity sets जुड़े हैं तो degree तीन है। degree हमें यह समझने में मदद करता है की database में data कैसे एक दूसरे से link है।
Types of Degree of Relationship in DBMS in Hindi
DBMS में Relationship के entity set की संख्या के आधार पर Degree निम्न है।1) Unary Relationship
2) Binary Relationship
3) Ternary Relationship
Unary Relationship
DBMS में Unary relationship का मतलब है, जब एक ही entity खुद से जुड़ी होती है। यह relationship, unary इसलिए कहलाती है क्योंकि इसमें एक ही entity शामिल होता है। इसे एक recursive relationship के नाम से भी जाना जाता है।Example
उदाहरण के लिए एक company में एक employee, अन्य employees को manage कर सकते है जो एक unary relationship को दिखाता है।
Binary Relationship
एक Binary relationship, वह है जिसमे दो विभिन्न entity sets शामिल होते हैं अर्थात इसमें दो entities के बीच relationship होता है। यह database में relationship का सबसे सामान्य प्रकार है।यह relationships, परिभाषित करता है कि कैसे दो entities के data आपस में जुड़े हुए है। Binary relationships, relational databases में entities के बीच सीधा कनेक्शन बनाती हैं, जिससे data को आसानी से व्यवस्थित और प्राप्त किया जा सकता है।
Example
उदाहरण के लिए एक School में Teacher, Student को विभिन्न Subject पढ़ा (Teach) सकते है
Ternary Relationship
DBMS में एक Ternary relationship, 3 entities के बीच का connection है। सरल शब्दों में कहे तो एक Ternary relationship वह है जिसमे तीन विभिन्न entity sets शामिल होते हैं।यह दिखाता है कि कैसे ये 3 entities, आपस मे एक दूसरे से जुड़े हैं।
इस प्रकार के relationship का उपयोग उस समय किया जाता है जब interaction को अकेले दो entities के माध्यम से स्पष्ट रूप से explain नही किया जा सकता है।
कभी-कभी interaction की अधिक जानकारी देने के लिए ternary relationship में attributes जोड़े जाते हैं। इसका उपयोग जटिल database को design करने में किया जाता है।
Example
उदाहरण के लिए एक "Teacher-Course-Student" के बीच का relationship, Ternary relationship के अंतर्गत आता है क्योंकि इसमें 3 entities भाग लेते हैं। एक Teacher, एक course को पढ़ाते हैं तथा Student उस course में enroll करते हैं।
N-ary Relationship
DBMS में एक N-ary relationship दो या दो से अधिक entities के बीच का एक connection हैं। सरल शब्दों में कहे तो एक N-ary relationship वह है जिसमे तीन से ज्यादा entity sets शामिल होते हैं।इसमें N का मतलब है, उन entities की संख्या जो Relationship में शामिल हैं।
यह binary, ternary और अन्य relationships का एक विस्तार है।
यह binary, ternary और अन्य relationships का एक विस्तार है।
N-ary relationships का उपयोग उस समय किया जाता है, जब कई entities को इस तरीके से interact करना होता हैं जिसे केवल दो entities के द्वारा describe नहीं किया जा सकता है।
ये relationships, जटिल database interactions को modeling करने में मदद करता है।
Example
नीचे उदाहरण में 5 entities College, Department, Students, Teaching और Non Teaching Staff को connect किया गया है। इसे निम्न प्रकार से समझते हैं।
एक College में कई departments है। प्रत्येक department में students, enrolled है। प्रत्येक department में teaching staff है। College में Non teaching staff भी है। ये 5 Entities एक have नामक single relationship से जुड़े है।
0 टिप्पणियाँ