BCA / B.Tech 13 min read

Data Models & Type in Hindi

RK

लेखक Ratan Kumawat · संस्थापक, NotesMedia

प्रकाशित:

त्वरित सारांश और मुख्य बिंदु

  • • विषय फोकस: DBMS Notes in Hindi | डीबीएमएस नोट्स (BCA / B.Tech Syllabus)
  • • मुख्य विषय: Data Models & Type in Hindi - General Topics
  • • अवलोकन: Quick Answer: DBMS में Data Model concepts और rules का एक logical framework है, जो यह तय करता है कि database में data कैसे store, organize और manipulat...
  • • मुख्य अवधारणाएं: Data models types, Hierarchical network relational Hindi, Object oriented models,
Quick Answer: DBMS में Data Model concepts और rules का एक logical framework है, जो यह तय करता है कि database में data कैसे store, organize और manipulate होगा, और अलग-अलग data elements के बीच क्या relationship होगी। यह database का architectural blueprint तैयार करता है। इसके मुख्य प्रकार Relational Model (tables और keys), ER Model (entities और relationships), Hierarchical Model (tree structure), Network Model (graph structure) और Object-Oriented Model हैं।

Data Models in DBMS in Hindi क्या है? (Data Model Meaning)

साधारण शब्दों में, जब भी हम कोई घर बनाते हैं, तो पहले उसका नक्शा (blueprint) तैयार करते हैं कि कौन सा कमरा कहाँ बनेगा। ठीक उसी तरह, database बनाने से पहले हम यह तय करते हैं कि data किस format में रहेगा, records एक-दूसरे से कैसे जुड़ेंगे और data पर क्या constraints लागू होंगे। इसी conceptual blueprint को DBMS में Data Model कहा जाता है।

Data Model मुख्य रूप से तीन चीज़ों को define करता है:

  • Data Structure: Data किस रूप में store होगा (जैसे table, tree या graph)।
  • Data Operations: Data पर कौन-से operations (insert, update, delete, search) किए जा सकते हैं।
  • Data Integrity Constraints: Data को सही और valid रखने के नियम (जैसे primary key null नहीं हो सकती)।

Data model database designers और end users के बीच communication का माध्यम बनता है। Database का logical structure समझने के लिए आप Database Schema in Hindi भी पढ़ सकते हैं।

Data Models & Type in Hindi

DBMS में Data Models के मुख्य प्रकार: Hierarchical, Network, Relational, ER और Object-Oriented models.

Advertisement

Categories of Data Models (Data Models के स्तर)

Database architecture में abstraction के level के आधार पर data models को तीन categories में बाँटा जाता है:

  1. Conceptual (High-Level) Data Model: यह user के point of view से data को दिखाता है। इसमें real-world entities और उनके आपसी relationships को सरल रूप में दिखाया जाता है। इसका सबसे बेहतरीन example ER Model (Entity-Relationship Model) है।
  2. Representational / Logical (Record-Based) Data Model: यह model conceptual design को computer system के समझने लायक structure में बदलता है। इसमें data को fixed-format records में store किया जाता है। इसके मुख्य examples Relational Model, Hierarchical Model और Network Model हैं।
  3. Physical (Low-Level) Data Model: यह बताता है कि data असल में hard disk या storage drive में bytes, blocks, file organization और memory index के रूप में कैसे physically store होता है। System में data independence कैसे काम करती है, इसके लिए देखें: Data Independence in Hindi.

Types of Data Models in DBMS (डेटा मॉडल के मुख्य प्रकार)

DBMS के इतिहास और architecture के अनुसार 5 प्रमुख data models सबसे ज़्यादा पढ़े और इस्तेमाल किए जाते हैं:

1. Hierarchical Data Model

Hierarchical Model को IBM ने 1960s में अपने IMS (Information Management System) के लिए develop किया था। इसमें data को एक Tree Structure में organize किया जाता है, जिसमें records nodes के रूप में होते हैं और उनके बीच Parent-Child Relationship होती है।

  • इसमें सबसे ऊपर सिर्फ एक Root Node होता है।
  • एक parent record के कई child records हो सकते हैं (1:N relationship)।
  • लेकिन हर child record का सिर्फ एक ही parent हो सकता है।
        [ University ]        <-- Root (Parent)
          /        \
    [ College A ]  [ College B ]
       /      \
  [ Student ] [ Faculty ]     <-- Child Nodes

फायदे (Advantages):

  • सरल संरचना: Parent-child hierarchy को समझना और 1-to-many data के लिए navigate करना बहुत आसान होता है।
  • High Performance: Pointers पहले से fixed होते हैं, इसलिए search speed 1:N queries के लिए काफी तेज़ होती है।
  • Referential Integrity: Child record बिना parent के exist नहीं कर सकता, जिससे data consistency बनी रहती है।

नुकसान (Disadvantages):

  • M:N Relationship का अभाव: यह model Many-to-Many relationships को सीधे support नहीं करता।
  • Rigid Structure: Database structure में कोई भी नया record type जोड़ना या बदलना बहुत मुश्किल होता है।
  • Deletion Anomaly: अगर आप parent node को delete करते हैं, तो उससे जुड़े सभी child records अपने आप delete हो जाते हैं।

2. Network Data Model

Network Model को 1969 में CODASYL (Conference on Data Systems Languages) committee ने standardize किया था। यह Hierarchical Model की कमियों को दूर करने के लिए बनाया गया था। Network model में data को Graph Structure के रूप में organize किया जाता है।

  • इसमें records को nodes और relationships को pointers या links से दर्शाया जाता है।
  • सबसे बड़ा फ़र्क यह है कि एक child node (जिसे member कहते हैं) के एक से अधिक parent nodes (जिन्हें owner कहते हैं) हो सकते हैं।
  • यह Many-to-Many (M:N) relationships को बहुत आसानी से represent करता है।
    [ Student 1 ]       [ Student 2 ]   <-- Owners (Parents)
          \           /       |
           \         /        |
            [ Course A ]  [ Course B ]  <-- Members (Children)

फायदे (Advantages):

  • Many-to-Many Support: Real-world scenarios (जैसे एक student कई courses पढ़ सकता है और एक course कई students ले सकते हैं) को सीधे संभालता है।
  • Flexible Data Access: Graph structure होने की वजह से data को multiple paths से access किया जा सकता है।
  • Data Redundancy कम: Shared child records होने से duplicate data store नहीं करना पड़ता।

नुकसान (Disadvantages):

  • जटिलता (Complex Pointers): Database के अंदर हजारों pointers का जाल बन जाता है, जिसे manage करना बेहद कठिन होता है।
  • मुश्किल Maintenance: अगर record का schema बदला जाए, तो application program का पूरा navigational code बदलना पड़ता है।
  • User-friendly नहीं: SQL जैसी declarative query language न होने से आम user के लिए query लिखना बहुत कठिन था।

3. Relational Data Model (सबसे लोकप्रिय मॉडल)

Relational Data Model का प्रस्ताव Dr. E.F. Codd ने 1970 में IBM में रखा था। आज दुनिया के सबसे ज़्यादा इस्तेमाल होने वाले databases (जैसे Oracle, MySQL, PostgreSQL, SQL Server) इसी model पर काम करते हैं।

Relational model में data को 2-dimensional Tables के रूप में organize किया जाता है, जिन्हें relational theory में Relations कहते हैं:

  • Table / Relation: Rows और columns का grid।
  • Row / Tuple: एक single complete record।
  • Column / Attribute: Data field या property (जैसे Roll_No, Name, Marks)।
  • Primary Key & Foreign Key: Tables के बीच संबंध बनाने और records को uniquely identify करने के लिए keys का इस्तेमाल होता है। Keys के बारे में detail में पढ़ें: Key Types in DBMS in Hindi.
Table: Student
+---------+----------+---------+
| Roll_No | Name     | Dept_ID |
+---------+----------+---------+
| 101     | Aman     | D01     |
| 102     | Priya    | D02     |
+---------+----------+---------+

Table: Department
+---------+-----------+
| Dept_ID | Dept_Name |
+---------+-----------+
| D01     | CS        |
| D02     | IT        |
+---------+-----------+

फायदे (Advantages):

  • सरलता (Simplicity): Data को row और column के रूप में देखना और समझना इंसानों के लिए सबसे आसान है।
  • Data Independence: Physical storage बदलने पर application logic पर असर नहीं पड़ता।
  • Standard Query Language (SQL): Pointers याद रखने की ज़रूरत नहीं; user सिर्फ declarative SQL query लिखकर data निकाल लेता है।
  • Data Integrity: Constraints (Primary key, Foreign key, Check, Unique) के ज़रिए data हमेशा accurate रहता है।

नुकसान (Disadvantages):

  • Hardware Resources: Complex queries और multiple joins चलाने पर system memory और processing power ज़्यादा लगती है।
  • Unstructured Data के लिए कठिन: Images, videos, complex objects और graph data को store करने में traditional tables limited रह जाती हैं।

4. Entity-Relationship (ER) Model

ER Model को Peter Chen ने 1976 में develop किया था। यह database designing के शुरूआती phase (conceptual design) में सबसे ज़्यादा इस्तेमाल होने वाला high-level model है।

यह real-world system को तीन components में बाँटता है:

  • Entity: कोई भी real-world object जिसका database में स्वतंत्र अस्तित्व हो (जैसे Student, Teacher, Course)। Entities को detail में समझें: What is Entity in DBMS.
  • Attributes: Entity के गुण (जैसे Student entity के attributes: Roll_No, Name, Age)।
  • Relationships: दो या अधिक entities के बीच संबंध (जैसे Student enrolled_in Course)।
[ Student ] ===== ( Enrolled_In ) ===== [ Course ]
  (Entity)          (Relationship)        (Entity)

फायदे:

  • Diagrammatic representation (ER Diagram) की वजह से non-technical clients और technical developers दोनों database requirements को आसानी से समझ लेते हैं।
  • ER Model को आसानी से Relational tables में convert किया जा सकता है।

नुकसान:

  • यह सिर्फ conceptual design के लिए है; कोई भी commercial database सीधे ER model में physical data store नहीं करता।

5. Object-Oriented Data Model (OODM)

1980s के दशक में जब C++ और Smalltalk जैसी OOP languages का चलन बढ़ा, तब Object-Oriented Data Model सामने आया। इसमें data और उसके logic को एक साथ Objects के रूप में store किया जाता है।

  • यह OOPs के core concepts जैसे Classes, Objects, Inheritance, Encapsulation और Polymorphism को सीधे database में support करता है।
  • Multimedia systems, CAD/CAM tools और GIS (Geographic Information Systems) जैसे complex data applications में इसका इस्तेमाल होता है।
  • बाद में Relational और Object model को मिलाकर Object-Relational Data Model (ORDM) बना (जैसे modern PostgreSQL और Oracle)।
Advertisement

Comparison Table: Hierarchical vs Network vs Relational Model

Exam में इन तीनों models का comparison अक्सर 5 या 10 marks में पूछा जाता है। नीचे दिए गए comparison table को अच्छी तरह याद करें:

Feature / Point Hierarchical Model Network Model Relational Model
Data Structure Tree (Parent-Child) Graph (Owner-Member) Tables (Rows और Columns)
Relationships केवल 1:1 और 1:N 1:1, 1:N और M:N 1:1, 1:N और M:N (Join tables से)
Parent Nodes प्रत्येक child का सिर्फ 1 parent Child के multiple parents संभव Foreign keys पर आधारित (no tree)
Data Access Method Pointers (Pre-defined tree paths) Pointers (Navigational paths) Declarative Query Language (SQL)
Flexibility बहुत कम (Rigid) मध्यम बहुत अधिक (Dynamic queries)
Data Independence बहुत limited limited पूरी तरह Logical और Physical independent
Design Complexity सरल लेकिन limited काफी जटिल (Complex pointers) सरल और logical
Standard Language DL/1 (IBM specific) CODASYL DML SQL (ANSI/ISO Standard)

Solved Example: एक ही System को अलग-अलग Data Models में समझना

एक college library system का real example लेते हैं जहाँ Student किताबें (Books) borrow करता है। आइए देखें कि अलग-अलग models इस scenario को कैसे represent करते हैं:

Scenario 1: Relational Model Representation

Relational model में हम entities की अलग-अलग tables बनाते हैं और foreign keys से connect करते हैं:

Student Table (Roll_No, Name, Branch) Book Table (Book_ID, Title, Author) Issue Table (Issue_ID, Roll_No, Book_ID, Date)
101 | Rohit | BCA B01 | DBMS Concepts | Korth I01 | 101 | B01 | 12-Nov-2026
102 | Anjali | MCA B02 | Java Programming | Balagurusamy I02 | 101 | B02 | 15-Nov-2026
103 | Vikas | B.Tech B03 | Python Basics | Guido I03 | 102 | B01 | 18-Nov-2026

यहाँ Issue Table दोनों tables के बीच Many-to-Many relationship को Foreign Keys (Roll_No और Book_ID) के ज़रिए आसानी से manage कर रही है।

Scenario 2: Hierarchical Model Representation

Hierarchical model में यदि Student को parent बनाया जाए:

        [ Student: 101 (Rohit) ]
               /        \
  [ Book: B01 (DBMS) ]   [ Book: B02 (Java) ]

समस्या: यदि Book B01 को दूसरा student (102 Anjali) भी borrow करता है, तो Book B01 का duplicate record Anjali के नीचे बनाना पड़ेगा, क्योंकि एक record का एक ही parent हो सकता है। इससे data redundancy पैदा होती है।

Scenario 3: Network Model Representation

Network model में pointer links से Book record को बिना duplication के दोनों Students से जोड़ा जा सकता है:

   [ Student: 101 ]       [ Student: 102 ]
          \               /
       link \           / link
             [ Book: B01 ]

Exam में कैसे लिखें (5 Marks Answer Ready)

यदि semester exam में 5 marks का प्रश्न आए: "Define Data Models and explain their types in DBMS", तो answer sheet में सीधे इस structure में लिखें:

  • 1. Definition (2 lines): Data model एक logical framework है जो database में data की structure, relationships और constraints को define करता है।
  • 2. Three Levels of Models: High-level (Conceptual/ER), Representational (Relational, Hierarchical, Network), Low-level (Physical)।
  • 3. Five Types with Keywords:
    • Hierarchical Model: Tree structure, Root node, Parent-child 1:N relationship, IBM IMS।
    • Network Model: Graph structure, CODASYL, multiple parents allow, M:N support।
    • Relational Model: Tables (relations), Rows (tuples), Columns (attributes), E.F. Codd, SQL।
    • ER Model: Conceptual blueprint, Peter Chen, Entities, Attributes, Relationships।
    • Object-Oriented Model: Data + Methods = Objects, Classes, Inheritance support।
  • 4. Quick Diagram: Relational model का एक छोटा 2-column table और Hierarchical model का छोटा tree diagram ज़रूर बनाएँ।

Students की Common Mistakes

  1. Data Model और Database Schema में confusion: बहुत से छात्र Data Model और Schema को एक ही मान लेते हैं। Data model वह theoretical framework (जैसे Relational theory) है जिस पर schema (जैसे आपके college database का actual table structure) design किया जाता है।
  2. Hierarchical Model में M:N लिखना: Exams में छात्र लिख देते हैं कि Hierarchical model many-to-many relationship support करता है। यह गलत है; Hierarchical model केवल 1:1 और 1:N support करता है।
  3. Physical Model में SQL को शामिल करना: SQL logical/relational level पर काम करती है, physical level पर नहीं। Physical level पर bytes, blocks, B-trees और disk sectors होते हैं।
  4. ER Model में physical table structure बनाना: ER model केवल conceptual tool है। इसमें primary key constraint की enforcement software नहीं करता, बल्कि designer logical design के लिए underline करता है।

Exam के लिए Important Questions

Short Questions (2–3 marks)

  1. Data Model क्या है? (Database के structure, relationships और rules को define करने वाला logical framework)
  2. Hierarchical और Network data model में मुख्य अंतर क्या है? (Hierarchical में child का केवल 1 parent होता है, जबकि Network में multiple parents हो सकते हैं)
  3. Relational Model किसने और कब दिया था? (Dr. E.F. Codd ने 1970 में)
  4. Data model के तीन levels कौन-से हैं? (Conceptual, Logical/Representational, और Physical data model)
  5. Tuple और Attribute में क्या अंतर है? (Table की horizontal row को Tuple और vertical column को Attribute कहते हैं)

Long Questions (5–10 marks)

  1. DBMS में Data Models क्या हैं? प्रमुख data models (Hierarchical, Network, Relational, ER Model) को diagram के साथ समझाइए।
  2. Relational Data Model के core concepts, advantages और disadvantages को detail में समझाइए।
  3. Hierarchical, Network और Relational data models के बीच अंतर स्पष्ट कीजिए और एक practical example दीजिए।
  4. ER Model क्या है? Database design में इसके roles और components (Entity, Attribute, Relationship) को स्पष्ट कीजिए।

FAQs

Data model in DBMS in Hindi का सरल अर्थ क्या है?

Data model का मतलब है database का logical नक्शा। यह तय करता है कि data को tables में रखना है, tree में रखना है या graph में, और data एक दूसरे से कैसे जुड़ा रहेगा।

आजकल सबसे ज़्यादा कौन सा data model इस्तेमाल होता है?

आजकल industry में सबसे ज़्यादा Relational Data Model (RDBMS जैसे MySQL, PostgreSQL, Oracle) इस्तेमाल होता है। Big data और complex apps के लिए NoSQL और Document/Object models का भी इस्तेमाल होता है।

क्या ER Model एक physical data model है?

नहीं, ER Model एक conceptual (high-level) data model है। इसका इस्तेमाल database implementation से पहले software requirement को visual diagram के रूप में समझने के लिए किया जाता है।

CODASYL approach किस data model से जुड़ी है?

CODASYL (Conference on Data Systems Languages) approach Network Data Model से जुड़ी है, जिसने 1970s में network databases के standard specifications तैयार किए थे।

Hierarchical model में child record का क्या नियम है?

Hierarchical model में नियम यह है कि प्रत्येक child record का केवल एक ही parent record हो सकता है, जबकि एक parent record के कई child records हो सकते हैं।

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

Quick Answer: DBMS में Data Model concepts और rules का एक logical framework है, जो यह तय करता है कि database में data कैसे store, organize और manipulate होगा, और अलग-अलग data elements के बीच क्या relationship होगी।
DBMS Notes in Hindi | डीबीएमएस नोट्स के पाठ्यक्रम में Data Models & Type in Hindi एक महत्वपूर्ण अध्याय है। यह मुख्य सिद्धांतों, परीक्षा प्रश्नों और सूत्रों को समझने के लिए अत्यधिक आवश्यक है।
हाँ, NotesMedia पर आपको Data Models & Type in Hindi के महत्वपूर्ण प्रश्नोत्तर, हल किए गए उदाहरण और नोट्स बिल्कुल मुफ्त मिलेंगे। अधिक अभ्यास के लिए आप हमारा ऐप भी डाउनलोड कर सकते हैं।
Advertisement