टॉपिक
- 1 E-R Model in Hindi – ER मॉडल क्या है?
- 2 Component of E-R Model in Hindi – ER मॉडल के घटक
- 3 Entity
- 4 Relationship
- 5 Types of Relationship – रिलेशनशिप के प्रकार
- 6 Degree of Relationship in Hindi
- 7 Attribute
- 8 Types of Attributes in Hindi
- 9 Advantage of ER model in Hindi – ER मॉडल के फायदे
- 10 Disadvantages of ER model in Hindi – ER मॉडल के नुकसान
E-R Model in Hindi – ER मॉडल क्या है?
E-R Model का पूरा नाम entity relationship model होता है। यह एक high level का data model है। इस मॉडल का प्रयोग एक system के लिए data elements और relationship को define करने के लिए किया जाता है.
दूसरे शब्दों में कहें तो, “DBMS में, ER model एक डेटा मॉडल है जो database के structure को चित्र की मदद से describe करता है।”
E-R model को E-R diagram भी कहते है क्योंकि यह entities को diagram (चित्र) के रूप से प्रस्तुत करता है और entities के मध्य relationship को दर्शाता है।
इस मॉडल को 1976 में Peter ने विकसित किया था। E-R मॉडल का उपयोग real-world की conceptual schema को प्रस्तुत करने के लिए किया जाता है।
यह मॉडल डेटाबेस के conceptual view को define करता है और यह database के लिए conceptual design को विकसित करता है.
उदाहरण के लिए – माना कि हमने एक school के database को design किया है. इस database में student एक entity है और address, name, id तथा age इसके attributes हैं. नीचे आपको इसका diagram दिया गया है.

Component of E-R Model in Hindi – ER मॉडल के घटक
ER model के तीन मुख्य components होते हैं जो कि निम्नलिखित हैं:-
- Entity
- Relationship
- Attribute
Entity
एक entity कोई भी person, place, car और real word object हो सकती है। ER diagram में एक entity को rectangle (आयत) के द्वारा प्रदर्शित किया जाता है. Entity के पास एक attribute और एक यूनिक key अवश्य होनी चाहिए.
Entity set:- एक entity set एक ही प्रकार के entities का एक समूह है जो समान properties (गुण) share करता है।
इसका उदाहरण – एक school database में Student, Teacher, Class और course को entity माना जा सकता है. यदि एक student एक entity है तो सभी students के datasets को entity set कहते हैं.

Types of entity – एंटिटी के प्रकार
DBMS में entity निम्नलिखित दो प्रकार की होती है।
- Weak entity
वह entity जो दूसरे entity पर निर्भर होती है उसे weak entity कहते हैं. इसे double rectangle के द्वारा प्रदर्शित किया जाता है. Weak entity को उसके attributes के द्वारा unique तरीके से indentify नहीं किया जा सकता. - Strong entity
वह entity जिसके पास primary key होती है strong entity कहलाती है। Strong entity को उसके attributes के द्वारा unique तरीके से indentify किया जा सकता है.
Relationship
Relationship का प्रयोग entities के मध्य relation को describe करने के लिए किया जाता है. इसको diamond के द्वारा प्रदर्शित किया जाता है.
उदहारण के लिए:- teacher teaches_at school और soldier enrolls in a military. यहाँ teachs_at और enrolls, relationship कहलाते हैं।
Types of Relationship – रिलेशनशिप के प्रकार
यह 4 प्रकार का होता है:-
- One to One
- One to Many
- Many to One
- Many to Many
One to one relationship (1:1)
जब entity A का एक instance, entity B के एक instance के साथ जुडा हुआ होता है। तो उसे one to one relationship कहते हैं.
उदाहरण के लिए:- एक male सिर्फ एक female से शादी कर सकता है और female केवल एक male से शादी कर सकती है. तो इसे हम one-to-one कहेंगे.

One to many relationship (1:M)
यह रिलेशनशिप तब होती है जब entity A का एक instance, entity B के बहुत सारें instance के साथ जुडा होता है।
उदाहरण के लिए- एक Employee एक department में कार्य करता है; एक department के पास कई employee हो सकते है।

Many to one relationship (M:1)
यह रिलेशनशिप तब होती है जब entity A के बहुत सारें instance, entity B के केवल instance के साथ जुडा होता है।
उदाहरण के लिए– real world में, एक student एक कॉलेज में पढ़ सकता है और वह एक साथ किसी दुसरे कॉलेज में नहीं पढ़ सकता है. जबकि एक कॉलेज में बहुत सारें students पढ़ते है. तो इसे हम many to one कहेंगे.

Many to Many Relationship (M:M)
यह रिलेशनशिप तब होती है जब entity A के बहुत सारें instance, Entity B के बहुत सारें instance के साथ जुडा होता है।
उदाहरण के लिए:- बहुत सारें employees, बहुत सारें projects में कार्य कर सकते है।

Degree of Relationship in Hindi
Relationship की degree तीन प्रकार की होती है।
- Binary – अगर relationship type की degree दो होती है तो उसे binary कहते है।
[binary= degree 2.] - Ternary – अगर relationship type की degree तीन होती है तो उसे ternary कहते है।
[Ternary= degree 3.] - N-ary – अगर relationship type की degree n होती है तो उसे n-ary कहते है।
[n-ary=degree n.]
Attribute
Attribute का प्रयोग एक entity की property को describe करने के लिए किया जाता है. इसे oval के द्वारा प्रस्तुत किया जाता है.
उदाहरण के लिए- student एक entity है और उसका subject name, subject code तथा gender उसके attributes हैं।
Types of Attributes in Hindi
DBMS में attribute निम्नलिखित प्रकार के होते हैं:-
Key attribute
वह attribute जो entity set में प्रत्येक entity को uniquely identify करता है उसे key attribute कहते हैं. उदाहरण के लिए – Roll_no प्रत्येक student के लिए unique होता है.
ER diagram में, key attribute का text underline होता है.

Composite attribute
वह attribute जो दूसरे attributes के combination (संयोजन) से बना होता है उसे composite attribute कहते हैं. उदाहरण के लिए – student का address एक composite attribute होता है क्योंकि यह दूसरे attributes से मिलकर बना होता है जैसे- pin_code, city, state, और country.

Single value attribute
वह attribute जिसके पास किसी विशेष entity के लिए केवल एक ही value होती है single value attribute कहलाती है। उदहारण के लिए- किसी व्यक्ति की age एक सिंगल वैल्यू एट्रिब्यूट है।
Multivalued attribute
वह attribute जिसके पास एक entity के लिए बहुत सारी values होती है वह multivalued attribute कहलाता है। इसे double oval के द्वारा प्रस्तुत किया जाता है.
उदहारण के लिए:- किसी car के लिए colors तथा employee के फ़ोन नंबर।

Derived attribute
इस प्रकार के attribute की value को दूसरे सम्बन्धित attribute की value से derived किया जाता है। इसे dashed oval से प्रस्तुत किया जाता है.
उदहारण के लिए:- किसी person की age को उसके birth date से derived किया जाता है। तो age एक derived attribute है.

Advantage of ER model in Hindi – ER मॉडल के फायदे
इसके फायदे निम्नलिखित हैं:-
- इस मॉडल को create करना बहुत ही आसान होता है. अगर आप entity और attributes के मध्य की relationship को जानते हैं तो आप ER diagram को आसानी से create कर सकते हैं.
- इस मॉडल के द्वारा database के structure को diagram में प्रस्तुत किया जाता है इसलिए इसमें relationship को समझना आसान है.
- यह database designers के लिए बहुत ही प्रभावी communication tool है.
- इस model को दूसरे models में convert करना बहुत ही easy है. इसे हम दूसरे models में आसानी से बदल सकते हैं.
Disadvantages of ER model in Hindi – ER मॉडल के नुकसान
इसके नुकसान नीचे दिए गये हैं:-
- इस मॉडल को विकसित करने का कोई भी industry standard नहीं है. इसलिए एक developer के notation को दूसरा developer समझ नहीं सकता.
- इस model में कुछ information या data का loss या hide हो जाता है.
- इसमें data manipulation को show करना मुश्किल होता है.
NOTE:- आपको ये पोस्ट कैसी लगी आप हमें कमेंट के माध्यम से अवश्य बतायें। हमें आपके कमेंट्स का बेसब्री से इन्तजार रहता है। अगर आपका कोई सवाल या कोई suggestions है तो हमें बतायें हम उसको एक या दो दिन के अंदर यहाँ प्रकाशित करेंगे और हाँ पोस्ट शेयर जरूर करें।