Entity in ER Model in Hindi
Table of Contents
- Entity in ER Model in Hindi
- Types of Entity in Hindi
- Primary Key in Entity in Hindi
- Examples of Entity in ER Model in Hindi
- FAQ
Entity in ER Model in Hindi
Entity ER Model का एक basic और सबसे महत्वपूर्ण concept है। यह किसी भी real-world object, person, place या thing को represent करता है, जिसे database में store किया जा सकता है।
अगर आसान भाषा में समझें, तो कोई भी ऐसी चीज जिसके बारे में हम data store करना चाहते हैं, उसे entity कहा जाता है। जैसे Student, Teacher, Employee, Product आदि सभी entities के उदाहरण हैं।
Database design करते समय सबसे पहला step होता है entities को identify करना, क्योंकि पूरा database structure इन्हीं पर आधारित होता है।
हर entity के कुछ attributes होते हैं, जो उसकी properties को define करते हैं। उदाहरण के लिए Student entity के attributes हो सकते हैं — Name, Roll Number, Age, Address आदि।
Entity को ER Diagram में rectangle shape के द्वारा represent किया जाता है। यह graphical representation database को समझने में बहुत मदद करता है।
Types of Entity in Hindi
ER Model में entities को मुख्य रूप से दो भागों में बाँटा जाता है:
- Strong Entity:
Strong Entity वह entity होती है जो अपने आप exist कर सकती है और किसी दूसरी entity पर depend नहीं होती। इसके पास अपनी primary key होती है।
उदाहरण: Student, Employee, Product — ये सभी strong entities हैं क्योंकि इनकी अपनी identity होती है।
- Weak Entity:
Weak Entity वह entity होती है जो अपने अस्तित्व के लिए किसी strong entity पर depend करती है। इसकी अपनी complete primary key नहीं होती।
उदाहरण: Dependent (Employee पर depend करता है), Order Item (Order पर depend करता है)।
Weak entity को ER Diagram में double rectangle के द्वारा represent किया जाता है।
Primary Key in Entity in Hindi
Primary Key किसी भी entity का सबसे महत्वपूर्ण attribute होता है, जो हर record को uniquely identify करता है।
Database में multiple records हो सकते हैं, लेकिन primary key यह सुनिश्चित करती है कि हर record अलग और unique हो।
Primary Key की कुछ महत्वपूर्ण विशेषताएँ:
- Unique Value: हर record की value अलग होती है।
- No Null Value: इसमें NULL value नहीं हो सकती।
- Stable: इसकी value बार-बार change नहीं होती।
- Simple Identification: record को जल्दी identify करने में मदद करता है।
उदाहरण के लिए Student entity में Roll Number या Student ID primary key हो सकती है।
ER Diagram में primary key को underline करके दर्शाया जाता है।
Examples of Entity in ER Model in Hindi
Entity को अच्छे से समझने के लिए कुछ real-life examples देखते हैं:
- Student Entity: Attributes: Student ID, Name, Age, Class यह सबसे common example है जो almost हर database में use होता है।
- Employee Entity: Attributes: Employee ID, Name, Salary, Department यह company database में use होता है।
- Product Entity: Attributes: Product ID, Name, Price, Quantity E-commerce systems में यह बहुत important होता है।
- Course Entity: Attributes: Course ID, Course Name, Duration Education systems में use होता है।
- Order Entity: Attributes: Order ID, Date, Amount Online shopping systems में use होता है।
इन सभी examples में एक common बात है कि हर entity की अपनी unique identity होती है, जिसे primary key के द्वारा define किया जाता है।
जब हम इन entities को relationships के साथ जोड़ते हैं, तब पूरा database structure तैयार होता है।