Logical Design of Database – एक अच्छा Conceptual Design बनाने के बाद हम इस Design को एक Logical Design में Convert करने की Process शुरू कर सकते हैं। इस Process में Conceptual Design के सभी Entities को Logical Model में Map किया जाता है और विभिन्न Tables के बीच की आपसी Relationships को दो या दो से अधिक Tables के Combination के रूप में Implement कर सकते हैं।
जब Database की Complexity Increase होती है, तब किन्हीं दो Designers द्वारा एक ही System के लिए अलग-अलग तैयार किए गए Design एक जैसे हों, ऐसा जरूरी नहीं होता है और इस बात से Database के Design पर कोई विशेष फर्क भी नहीं पडता है। आज के समय के जितने भी Business Systems हैं, उन्हें Market की Requirements के आधार पर जल्दी-जल्दी Change किया जाता रहता है। इसलिए महत्वपूर्ण बात तो ये होती है, कि इन जल्दी-जल्दी होने वाले Changes को हमारा Database Proper तरीके से Handle कर सके या Databases को इन Changes के लिए समय-समय पर उचित तरीके से बिना परेशानी के Modify किया जा सके।
जब हम Simple Spreadsheet Layout में किसी Database को Handle करते हैं, तब हम देखते हैं कि Spreadsheet में एक ही जैसी Information को बार-बार Store किया जाता है। जब हम Logical Design Create करते हैं, तब हमारा मुख्य Purpose ये होता है कि Database में बार-बार Repeated Form में Store होने वाले Data को कम से कम एक बार Store किया जाए। यानी Data Redundancies को कम से कम किया जाए। इस Concept को ध्यान में रखते हुए जब हम किसी Database को Design करते हैं, तब Design से सम्बंधित समस्याएं व Anomalies की सम्भावना कम से कम होती है और Database को Future की जरूरतों को पूरा करने के लिए बडी ही आसानी से Modify किया जा सकता है।
हम जिस Relational Model को Use करके अपना Database Design कर रहे हैं, उस Relational Model को 1970 में Dr. E. F. Codd नाम के गणितज्ञ ने विकसित किया था। उसका Model Simple व Discrete Data की Tables व उन Tables के बीच की Relationship पर आधारित है। Relationship को एक Table से दूसरी Table के Reference के रूप में Represent किया जाता है, जिससे Data के Duplication की समस्या काफी हद तक कम हो जाती है, क्योंकि Relate होने वाली दोनों ही Tables में एक Same Key होती है, जिससे दोनों Tables आपस में Relate हो जाती हैं। पिछले कुछ सालों में Relational Model Database Management System का मुख्य आधार बन गया है, हालांकि अब इस Model को Object Oriented Database Model से Challenge मिल रहा है। Logical Design के Phase में निम्न काम करने होते हैं:
- Record के प्रकार को पहचानना और उन्हें Represent करने वाले Entity की Table के रूप में Mapping करना।
- Records में Store होने वाले Fields को पहचानना और Field में Store किए जाने वाले Data के Type Definition को Define करना।
- Tables में स्थित Data की Dependencies को पहचानना।
- Database को Normalize करना।
- Tables की Keys को Identify करना।
Identifying the Record Types and Fields
हमने Conceptual Design के अन्तर्गत जिस Entity-Relationship Diagram के बारे में जाना है, वह Relational Model पर आधारित Model होता है। क्योंकि हमारा Logical Model भी एक Relational Model होना चाहिए, इसलिए Conceptual Design को Logical Design में Convert करना भी काफी Simple काम है। Logical Model का Record Type (Table) Conceptual Model के Entity के समान होता है, इसलिए हम Conceptual Model के ER Diagram के सभी Entities के समान ही Logical Model में एक Table Create कर सकते हैं। ठीक इसी तरह से Conceptual Model में हर Entity का जो Attribute होता है, Logical Model में वही Attributes Table के Fields के रूप में Represent किए जा सकते हैं।
Identifying Any Data Dependencies
Conceptual Model के Entities को तो हम Directly Logical Model में Tables के रूप में Represent या Map कर सकते हैं, लेकिन Relationship के साथ हम ऐसा नहीं कर सकते। Relationships को Logical Model में Map करने के लिए हमें Additional Attributes Create करने पडते हैं, ताकि हम Relationships को Tables के Combination के रूप में Implement कर सकें। ये नए Attributes अक्सर एक Table से दूसरी Table में References की तरह Appear होते हैं और हमारे Database के Physical Design में ये Foreign Keys की तरह Represent होते हैं।
चूंकि Relational Database Model में Many-To-Many की Relationship को Directly Represent नहीं किया जा सकता। Environment में इस Relationship के होने का मतलब ये होता है कि इस Relationship की स्वयं की भी कुछ Characteristics हो सकती हैं, जिन्हें Attributes के रूप में इन्हीं Relationships में Store किया जा सकता है। Many-To-Many की Relationship को Represent करने के लिए हमें हमेंशा एक नई Table बनानी पडती है, जिसमें दोनों Tables के Key Fields होते हैं। ऐसा करने पर एक Many-To-Many Relationship दो One-To-Many Relationships में Convert हो जाती है।
उदाहरण के लिए Video-Rental Store Example में Movies व Directors Entities के बीच Many-To-Many की Relationship है, क्योंकि एक Movie के कई Director हो सकते हैं और इसी तरह से एक Director कई Movies को Direct कर सकता है। इस स्थिति में हम Participant_Assignment नाम का एक नया Table Create कर सकते हैं, जो कि इन दोनों ही Entities से एक One-To-Many की Relationship द्वारा Relate हो जाता है। ये Step मुख्य रूप से उस स्थिति में महत्वपूर्ण होता है जब हमें इस Relationship से सम्बंधित जानकारी जैसे कि Payment के Start Date व End Date को Specify व Store करने की जरूरत होती है।
ये Article इस वेबसाईट पर Selling हेतु उपलब्ध EBook Oracle 8i/9i SQL/PLSQL in Hindi से लिया गया है। इसलिए यदि ये Article आपके लिए उपयोगी रहा, तो निश्चित रूप से ये पुस्तक भी आपके लिए काफी उपयोगी साबित होगी।
Oracle 8i/9i SQL/PLSQL in Hindi | Page: 587 | Format: PDF