6.8 RELATIONAL DATABASE:

6.8 সম্পৰ্কীয় ডাটাবেচ:

In Relational Database data are not stored in a single and very large table. There are many disadvantages of storing data in a single table. In a relational database, data are stored in multiple tables by making a relation among tables based on the primary key. Let us take an example. Suppose in a school, a database of books and authors is to be maintained. The following table can be used to store such information.

সম্পৰ্কীয় ডাটাবেছত ডাটা একক আৰু অতি ডাঙৰ তালিকাত সংৰক্ষণ কৰা নহয়। এটা তালিকাত ডাটা সংৰক্ষণ কৰাৰ বহুতো অসুবিধা আছে। সম্পৰ্কীয় ডাটাবেচ এটাত, প্ৰাথমিক কীৰ ওপৰত আধাৰিত কৰি তালিকাবোৰৰ মাজত সম্পৰ্ক এটা কৰি ডাটা একাধিক তালিকাত সংৰক্ষণ কৰা হয়। আহক আমি এটা উদাহৰণ লওঁ। ধৰি লওঁক এখন বিদ্যালয়ত, কিতাপ আৰু লেখকৰ ডাটাবেচ বজাই ৰাখিব লাগিব। এনে তথ্য সংৰক্ষণ কৰিবলৈ নিম্নলিখিত তালিকাখন ব্যৱহাৰ কৰিব পাৰি।

We can see that in this table some information is stored repeatedly. This happens because of the structure of the table and the nature of the data. In the “Author” field repetition happens because one author may have written multiple books. Similarly, in the “Book” field repetition happens because there may be one book written by multiple authors. Repetition of such information in a database is called redundancy. In a relational database, we should avoid redundancy to reduce error. If you notice, you can find that the spelling of “Dr. A. P. J. Abdul Kalam” is wrong in the last two entries of the table. To correct the spelling, we need to update two entries of the table. But, if we do not repeat the author name with each book and store it in a central store, a single update operation can rectify the error for every book. To do that three tables to be created as below. Using the third table we can map authors to books.

আমি দেখিবলৈ পাওঁ যে এই তালিকাত কিছুমান তথ্য বাৰে বাৰে সংৰক্ষণ কৰা হয়। এইটো তালিকাৰ গাঁথনি আৰু তথ্যৰ প্ৰকৃতিৰ বাবে হয়। “লেখক” ক্ষেত্ৰত পুনৰাবৃত্তি হয় কিয়নো এজন লেখকে একাধিক কিতাপ লিখিব পাৰে। একেদৰে, “কিতাপ” ক্ষেত্ৰত পুনৰাবৃত্তি হয় কিয়নো একাধিক লেখকৰ দ্বাৰা লিখা এখন কিতাপ থাকিব পাৰে। ডাটাবেচত এনে তথ্যৰ পুনৰাবৃত্তিক ৰিডাণ্ডেন্সী বুলি কোৱা হয়। সম্পৰ্কীয় ডাটাবেচ এটাত, আমি ত্ৰুটি হ্ৰাস কৰিবলৈ অতিৰিক্ততা পৰিহাৰ কৰা উচিত। যদি আপুনি লক্ষ্য কৰে, আপুনি দেখিব পাৰে যে টেবুলৰ অন্তিম দুটা প্ৰবিষ্টিত “ড. এ. পি. জে. আব্দুল কালাম”ৰ বানান ভুল। বানানটো সংশোধন কৰিবলৈ, আমি তালিকাৰ দুটা প্ৰবিষ্টি আপডেট কৰিব লাগিব। কিন্তু, যদি আমি প্ৰতিখন কিতাপৰ সৈতে লেখকৰ নাম টো পুনৰাবৃত্তি নকৰোঁ আৰু ইয়াক কেন্দ্ৰীয় দোকানএখনত সংৰক্ষণ নকৰোঁ, এটা আপডেট অপাৰেশ্যনে প্ৰতিখন কিতাপৰ বাবে ত্ৰুটি সংশোধন কৰিব পাৰে। তলত দিয়া ৰদৰে সৃষ্টি কৰিব লগা তিনিখন তালিকা কৰিবলৈ। তৃতীয় তালিকাব্যৱহাৰ কৰি আমি লেখকসকলক কিতাপলৈ মেপ কৰিব পাৰোঁ।