Units — Computer Science — Class 9
  1. Unit 1Fundamentals of Computer
  2. Unit 2Fundamentals of Operating System
  3. Unit 3Office Automation
  4. Unit 4Data Communication and Computer Networks
  5. Unit 5Computer Security and Ethics
  6. Unit 6Web Development
  7. Unit 7Introduction to Database System

Computer Science Class 9 — Unit 7: Introduction to Database System

Read the lesson, check the fully solved exercise, then test yourself with the MCQs quiz. Teachers get a complete guide with this unit.

Sindh Textbook Board50 MCQs · 5 Practice Sets
🌐 Language:Default is English. Choose اردو or سنڌي — every sentence's translation and help will appear in that language.

← All Computer Science Class 9 Units · Computer Science — Class 9 · Unit 7 · Printed pages 142–159

Source: The Textbook of Computer Science for Grade 9, Sindh Textbook Board, Jamshoro (prepared by Association for Academic Quality — AFAQ).

About this source

Textbook text is reproduced for free educational study. All solutions, explanations, practice questions, diagrams and teacher's guides are original work by 100MCQs. 100MCQs is an independent site and is not affiliated with or endorsed by the Sindh Textbook Board. Read our Disclaimer.

📖 Lesson — Introduction to Database System

This is the full lesson from your textbook (Unit 7, printed pages 142–159), part by part, in the book's own order. Difficult words are bold — their meanings are given under each part. Choose اردو or سنڌي above — the translation of every sentence will appear under it. Words marked ⭐ are the book's own important terms.

یہ آپ کی کتاب کا مکمل سبق ہے — مشکل الفاظ کے آسان معنی ہر حصے کے نیچے دیے گئے ہیں۔

هي توهان جي ڪتاب جو مڪمل سبق آهي — مشڪل لفظن جا آسان مطلب هر حصي هيٺ ڏنا ويا آهن۔

7.1 What is a database? Printed p 143

A database is an organised collection of related data, stored so that it can be retrieved, updated and shared efficiently. In the model this book teaches — the relational model — the data is organised into tables: each table holds records (rows) about one kind of thing, and each record is made of fields (columns). A school database, for example, may hold a Students table, a Teachers table and a Classes table.

ڈیٹا بیس متعلقہ ڈیٹا کا منظم مجموعہ ہے، جو اس طرح محفوظ کیا جاتا ہے کہ اسے مؤثر طریقے سے حاصل، تازہ اور شیئر کیا جا سکے۔ اس ماڈل میں جو یہ کتاب پڑھاتی ہے — رلیشنل ماڈل — ڈیٹا کو ٹیبلز میں منظم کیا جاتا ہے: ہر ٹیبل ایک قسم کی چیز کے بارے میں ریکارڈز (قطاریں) رکھتی ہے، اور ہر ریکارڈ فیلڈز (کالموں) سے بنا ہوتا ہے۔ مثال کے طور پر اسکول کے ڈیٹا بیس میں طلبہ کی ٹیبل، اساتذہ کی ٹیبل اور جماعتوں کی ٹیبل ہو سکتی ہے۔

ڊيٽابيس لاڳاپيل ڊيٽا جو منظم مجموعو آهي، جيڪو اهڙي طرح محفوظ ڪيو وڃي ٿو ته ان کي موثر طريقي سان حاصل، تازو ۽ شيئر ڪري سگهجي. ان ماڊل ۾ جيڪو هي ڪتاب پڙهائي ٿو — رليشنل ماڊل — ڊيٽا کي ٽيبلن ۾ منظم ڪيو وڃي ٿو: هر ٽيبل هڪ قسم جي شيءِ بابت ريڪارڊ (قطارون) رکي ٿي، ۽ هر ريڪارڊ فيلڊن (ڪالمن) مان ٺهيل هوندو آهي. مثال طور اسڪول جي ڊيٽابيس ۾ شاگردن جي ٽيبل، استادن جي ٽيبل ۽ ڪلاسن جي ٽيبل ٿي سگهي ٿي.

The printed book defines a database with the sentence “it is mathematically developed data structure which converts raw input data into meaningful information” (register TE-CS9-053). That sentence is garbled in print and is not repeated as a definition here: a database stores data; it is the processing and querying of that data which produces meaningful information.

چھپی کتاب ڈیٹا بیس کی تعریف اس جملے سے کرتی ہے “it is mathematically developed data structure which converts raw input data into meaningful information” (رجسٹر TE-CS9-053)۔ یہ جملہ چھپائی میں بگڑا ہوا ہے اور یہاں تعریف کے طور پر نہیں دہرایا گیا: ڈیٹا بیس ڈیٹا محفوظ کرتا ہے؛ اس ڈیٹا کی پروسیسنگ اور استفسار ہی بامعنی معلومات پیدا کرتا ہے۔

ڇپيل ڪتاب ڊيٽابيس جي تعريف ان جملي سان ڪري ٿو “it is mathematically developed data structure which converts raw input data into meaningful information” (رجسٽر TE-CS9-053). اهو جملو ڇپائي ۾ بگڙيل آهي ۽ هتي تعريف طور نه ورجايو ويو آهي: ڊيٽابيس ڊيٽا محفوظ ڪري ٿو؛ ان ڊيٽا جي پروسيسنگ ۽ استفسار ئي بامعنيٰ معلومات پيدا ڪري ٿو.

Databases are used almost everywhere data must be kept safely and found quickly: in industries and factories, hospitals and health records, agriculture, schools and examinations, business and shops, and banking. The book gives the example of NADRA, Pakistan's national registration authority, whose database holds citizens' identity records.

ڈیٹا بیس تقریباً ہر جگہ استعمال ہوتے ہیں جہاں ڈیٹا محفوظ رکھنا اور جلدی تلاش کرنا ہو: صنعتوں اور کارخانوں میں، اسپتالوں اور صحت کے ریکارڈ میں، زراعت میں، اسکولوں اور امتحانات میں، کاروبار اور دکانوں میں، اور بینکاری میں۔ کتاب نادرا کی مثال دیتی ہے، پاکستان کی قومی رجسٹریشن اتھارٹی، جس کے ڈیٹا بیس میں شہریوں کے شناختی ریکارڈ موجود ہیں۔

ڊيٽابيس تقريبن هر هنڌ استعمال ٿين ٿا جتي ڊيٽا محفوظ رکڻ ۽ جلدي ڳولڻ هجي: صنعتن ۽ ڪارخانن ۾، اسپتالن ۽ صحت جي ريڪارڊ ۾، زراعت ۾، اسڪولن ۽ امتحانن ۾، ڪاروبار ۽ دڪانن ۾، ۽ بينڪاري ۾. ڪتاب نادرا جو مثال ڏئي ٿو، پاڪستان جي قومي رجسٽريشن اٿارٽي، جنهن جي ڊيٽابيس ۾ شهرين جا شناختي ريڪارڊ موجود آهن.

One qualification to keep in mind: this unit teaches the relational model, in which data lives in tables. Not every real database is built of tables — the book's own list of DBMS software in §7.1.1 includes MongoDB, which stores documents instead. Whenever this book says “database”, it means a relational database unless stated otherwise.

ایک قید ذہن میں رکھیں: یہ یونٹ رلیشنل ماڈل پڑھاتا ہے، جس میں ڈیٹا ٹیبلز میں رہتا ہے۔ ہر اصل ڈیٹا بیس ٹیبلز سے نہیں بنا ہوتا — کتاب کی اپنی DBMS سافٹ ویئر فہرست §7.1.1 میں MongoDB شامل ہے، جو اس کے بجائے دستاویزات محفوظ کرتا ہے۔ جب بھی یہ کتاب “ڈیٹا بیس” کہے، اس سے مراد رلیشنل ڈیٹا بیس ہے جب تک کہ اس کے برعکس نہ کہا جائے۔

هڪ قيد ذهن ۾ رکو: هي يونٽ رليشنل ماڊل پڙهائي ٿو، جنهن ۾ ڊيٽا ٽيبلن ۾ رهي ٿو. هر اصل ڊيٽابيس ٽيبلن مان ٺهيل نه هوندو آهي — ڪتاب جي پنهنجي DBMS سافٽ ويئر فهرست §7.1.1 ۾ MongoDB شامل آهي، جيڪو ان بدران دستاويز محفوظ ڪري ٿو. جڏهن به هي ڪتاب “ڊيٽابيس” چوي، ان مان مراد رليشنل ڊيٽابيس آهي جيستائين ان جي برعڪس نه چيو وڃي.

Words in this part

database — an organised collection of related data stored for efficient retrieval and updating متعلقہ ڈیٹا کا منظم مجموعہ جو مؤثر حصول اور تازہ کاری کے لیے محفوظ ہو لاڳاپيل ڊيٽا جو منظم مجموعو جيڪو موثر حصول ۽ تازي ڪاري لاءِ محفوظ هجي

relational model — the model in which data is organised into tables of records and fields وہ ماڈل جس میں ڈیٹا ریکارڈز اور فیلڈز کی ٹیبلز میں منظم ہوتا ہے اهو ماڊل جنهن ۾ ڊيٽا ريڪارڊن ۽ فيلڊن جي ٽيبلن ۾ منظم ٿئي ٿو

7.1.1 Database Management System (DBMS) Printed p 144

A database management system (DBMS) is the software that sits between the database and the people or programs that use it. Users do not handle the stored files directly; they ask the DBMS to add, find, change or delete data, and the DBMS does the work while enforcing the database's rules. So the database is the stored data itself, and the DBMS is the software that manages it — the two terms must not be confused.

ڈیٹا بیس مینجمنٹ سسٹم (DBMS) وہ سافٹ ویئر ہے جو ڈیٹا بیس اور اسے استعمال کرنے والے لوگوں یا پروگراموں کے درمیان ہوتا ہے۔ صارفین محفوظ فائلوں کو براہِ راست نہیں سنبھالتے؛ وہ DBMS سے ڈیٹا شامل کرنے، تلاش کرنے، بدلنے یا حذف کرنے کو کہتے ہیں، اور DBMS ڈیٹا بیس کے قوانین نافذ کرتے ہوئے کام کرتا ہے۔ تو ڈیٹا بیس خود محفوظ ڈیٹا ہے، اور DBMS وہ سافٹ ویئر ہے جو اسے منظم کرتا ہے — دونوں اصطلاحات کو گڈمڈ نہیں کرنا چاہیے۔

ڊيٽابيس مئنيجمينٽ سسٽم (DBMS) اهو سافٽ ويئر آهي جيڪو ڊيٽابيس ۽ ان کي استعمال ڪندڙ ماڻهن يا پروگرامن جي وچ ۾ هوندو آهي. صارف محفوظ فائلن کي سڌو نه سنڀاليندا آهن؛ اهي DBMS کي ڊيٽا شامل ڪرڻ، ڳولڻ، بدلڻ يا حذف ڪرڻ لاءِ چوندا آهن، ۽ DBMS ڊيٽابيس جا قانون نافذ ڪندي ڪم ڪري ٿو. پوءِ ڊيٽابيس پاڻ محفوظ ڊيٽا آهي، ۽ DBMS اهو سافٽ ويئر آهي جيڪو ان کي منظم ڪري ٿو — ٻنهي اصطلاحن کي گڊمڊ نه ڪرڻ گهرجي.

The book names these DBMS examples: MySQL, Oracle, Microsoft SQL Server, MongoDB, Visual FoxPro, IBM Db2 and PostgreSQL (its Figure 7.1 is a collage of such product logos). The DBMS used for this unit's practical work is Microsoft Access, the database package of Microsoft Office — which is why the printed exercise asks which Office package is a DBMS, and the answer is MS-Access.

کتاب یہ DBMS مثالیں نامزد کرتی ہے: MySQL، Oracle، Microsoft SQL Server، MongoDB، Visual FoxPro، IBM Db2 اور PostgreSQL (اس کی شکل 7.1 ایسے پروڈکٹ لوگو کا مجموعہ ہے)۔ اس یونٹ کے عملی کام کے لیے استعمال ہونے والا DBMS Microsoft Access ہے، Microsoft Office کا ڈیٹا بیس پیکیج — یہی وجہ ہے کہ چھپی مشق پوچھتی ہے کہ کون سا Office پیکیج DBMS ہے، اور جواب MS-Access ہے۔

ڪتاب اهي DBMS مثالون نامزد ڪري ٿو: MySQL، Oracle، Microsoft SQL Server، MongoDB، Visual FoxPro، IBM Db2 ۽ PostgreSQL (ان جي شڪل 7.1 اهڙن پروڊڪٽ لوگن جو مجموعو آهي). هن يونٽ جي عملي ڪم لاءِ استعمال ٿيندڙ DBMS Microsoft Access آهي، Microsoft Office جو ڊيٽابيس پيڪيج — اهو ئي سبب آهي جو ڇپيل مشق پڇي ٿي ته ڪهڙو Office پيڪيج DBMS آهي، ۽ جواب MS-Access آهي.

Words in this part

DBMS — database management system — the software that manages a database and serves its users ڈیٹا بیس مینجمنٹ سسٹم — وہ سافٹ ویئر جو ڈیٹا بیس کو منظم کرتا ہے اور اس کے صارفین کی خدمت کرتا ہے ڊيٽابيس مئنيجمينٽ سسٽم — اهو سافٽ ويئر جيڪو ڊيٽابيس کي منظم ڪري ٿو ۽ ان جي صارفن جي خدمت ڪري ٿو

7.1.2 Flat file system Printed p 144

Before database systems, data was commonly kept in a flat file: a single table stored as a plain text file, with one record on each line and the fields within a line separated by a delimiter such as a tab or a comma. A flat file has no connections to other files, no built-in rules, and no software managing access to it.

ڈیٹا بیس سسٹمز سے پہلے، ڈیٹا عام طور پر فلیٹ فائل میں رکھا جاتا تھا: ایک واحد ٹیبل جو سادہ ٹیکسٹ فائل کے طور پر محفوظ ہو، ہر لائن پر ایک ریکارڈ اور لائن کے اندر فیلڈز کسی حد کار جیسے ٹیب یا کوما سے الگ۔ فلیٹ فائل کا دوسری فائلوں سے کوئی تعلق نہیں ہوتا، کوئی داخلی قوانین نہیں ہوتے، اور اس تک رسائی کو منظم کرنے والا کوئی سافٹ ویئر نہیں ہوتا۔

ڊيٽابيس سسٽمن کان اڳ، ڊيٽا عام طور فليٽ فائل ۾ رکيو ويندو هو: هڪ واحد ٽيبل جيڪا سادي ٽيڪسٽ فائل طور محفوظ هجي، هر لائن تي هڪ ريڪارڊ ۽ لائن جي اندر فيلڊ ڪنهن حد ڪار جهڙوڪ ٽيب يا ڪاما سان الڳ. فليٽ فائل جو ٻين فائلن سان ڪو تعلق نه هوندو آهي، ڪي اندروني قانون نه هوندا آهن، ۽ ان تائين پهچ کي منظم ڪندڙ ڪو سافٽ ويئر نه هوندو آهي.

That simplicity is also its basic limitation — the point the printed exercise tests: a flat file stores its data in a single file. Because the same information is often typed again in several places, copies disagree (data redundancy and inconsistency); only one person can work on the file at a time; and there is no protection against wrong or duplicate entries.

یہ سادگی ہی اس کی بنیادی حد بھی ہے — وہ نکتہ جو چھپی مشق جانچتی ہے: فلیٹ فائل اپنا ڈیٹا ایک واحد فائل میں محفوظ کرتی ہے۔ چونکہ ایک ہی معلومات اکثر کئی جگہوں پر دوبارہ لکھی جاتی ہے، نقول میں اختلاف ہو جاتا ہے (ڈیٹا کی تکرار اور عدم مطابقت)؛ ایک وقت میں صرف ایک شخص فائل پر کام کر سکتا ہے؛ اور غلط یا دہرے اندراج کے خلاف کوئی تحفظ نہیں ہوتا۔

اها سادگي ئي ان جي بنيادي حد به آهي — اهو نڪتو جيڪو ڇپيل مشق جاچي ٿي: فليٽ فائل پنهنجو ڊيٽا هڪ واحد فائل ۾ محفوظ ڪري ٿي. ڇاڪاڻ ته هڪ ئي معلومات اڪثر ڪيترين جاين تي ٻيهر لکي وڃي ٿي، نقلن ۾ اختلاف ٿي وڃي ٿو (ڊيٽا جي ورجاءَ ۽ عدم مطابقت)؛ هڪ وقت ۾ رڳو هڪ شخص فائل تي ڪم ڪري سگهي ٿو؛ ۽ غلط يا ٻٽي اندراج خلاف ڪو تحفظ نه هوندو آهي.

Words in this part

flat file — a single table stored as a plain text file, one record per line ایک واحد ٹیبل جو سادہ ٹیکسٹ فائل کے طور پر محفوظ ہو، ہر لائن پر ایک ریکارڈ هڪ واحد ٽيبل جيڪا سادي ٽيڪسٽ فائل طور محفوظ هجي، هر لائن تي هڪ ريڪارڊ

delimiter — a character such as a tab or comma that separates fields in a text file کوئی حرف جیسے ٹیب یا کوما جو ٹیکسٹ فائل میں فیلڈز کو الگ کرے ڪو اکر جهڙوڪ ٽيب يا ڪاما جيڪو ٽيڪسٽ فائل ۾ فيلڊن کي الڳ ڪري

data redundancy — the same data stored again in more than one place ایک ہی ڈیٹا کا ایک سے زیادہ جگہ دوبارہ محفوظ ہونا ساڳئي ڊيٽا جو هڪ کان وڌيڪ هنڌ ٻيهر محفوظ ٿيڻ

7.1.3 Database system versus flat file system Printed p 145

The book compares the two systems on five points. (1) Users: a DBMS lets many users work with the data at the same time; a flat file serves one user at a time. (2) Size: a DBMS handles huge amounts of data; a flat file suits smaller sets. (3) Duplication: a DBMS avoids duplication and keeps data consistent (integrity); a flat file easily holds duplicate, redundant copies. (4) Access: a DBMS offers online access over a network; a flat file has no remote connections. (5) Scale of use: database systems serve small, medium and large businesses; flat files suit smaller needs only.

کتاب دونوں نظاموں کا پانچ نکات پر موازنہ کرتی ہے۔ (1) صارفین: DBMS کئی صارفین کو ایک ہی وقت میں ڈیٹا کے ساتھ کام کرنے دیتا ہے؛ فلیٹ فائل ایک وقت میں ایک صارف کی خدمت کرتی ہے۔ (2) جسامت: DBMS بہت بڑی مقدار میں ڈیٹا سنبھالتا ہے؛ فلیٹ فائل چھوٹے سیٹوں کے لیے موزوں ہے۔ (3) تکرار: DBMS تکرّار سے بچاتا ہے اور ڈیٹا کو مطابق رکھتا ہے (دیانت)؛ فلیٹ فائل آسانی سے دہری، زائد نقول رکھتی ہے۔ (4) رسائی: DBMS نیٹ ورک پر آن لائن رسائی دیتا ہے؛ فلیٹ فائل میں دور دراز رابطے نہیں ہوتے۔ (5) استعمال کا پیمانہ: ڈیٹا بیس سسٹم چھوٹے، درمیانے اور بڑے کاروباروں کی خدمت کرتے ہیں؛ فلیٹ فائلیں صرف چھوٹی ضروریات کے لیے موزوں ہیں۔

ڪتاب ٻنهي نظامن جو پنجن نڪتن تي موازنو ڪري ٿي. (1) صارف: DBMS ڪيترن صارفن کي هڪ ئي وقت ڊيٽا سان ڪم ڪرڻ ڏئي ٿو؛ فليٽ فائل هڪ وقت ۾ هڪ صارف جي خدمت ڪري ٿي. (2) جسامت: DBMS تمام وڏي مقدار ۾ ڊيٽا سنڀالي ٿو؛ فليٽ فائل ننڍن سيٽن لاءِ موزون آهي. (3) ورجاءَ: DBMS ورجاءَ کان بچائي ٿو ۽ ڊيٽا کي مطابق رکي ٿو (ديانت)؛ فليٽ فائل آساني سان ٻٽيون، زائد نقلون رکي ٿي. (4) پهچ: DBMS نيٽ ورڪ تي آن لائن پهچ ڏئي ٿو؛ فليٽ فائل ۾ دور دراز رابطا نه هوندا آهن. (5) استعمال جو پيمانو: ڊيٽابيس سسٽم ننڍن، وچولن ۽ وڏن ڪاروبارن جي خدمت ڪن ٿا؛ فليٽ فائلون رڳو ننڍن ضرورتن لاءِ موزون آهن.

The book then lists the characteristics that make a DBMS preferable. Multiple users can view, add, edit and delete data under control. The DBMS provides tools — queries, views and forms — for working with the data. It is more secure and reliable, with backups and limited permissions for different users. Data is distributed across related tables through keys and relationships, so duplication and redundancy fall. And it can handle large and complex data for medium and large organisations.

پھر کتاب وہ خصوصیات درج کرتی ہے جو DBMS کو ترجیحی بناتی ہیں۔ کئی صارفین کنٹرول کے تحت ڈیٹا دیکھ، شامل، ترمیم اور حذف کر سکتے ہیں۔ DBMS ڈیٹا کے ساتھ کام کے لیے ٹولز — استفسارات، ویوز اور فارمز — فراہم کرتا ہے۔ یہ زیادہ محفوظ اور قابلِ اعتماد ہے، بیک اپ اور مختلف صارفین کے لیے محدود اجازتوں کے ساتھ۔ ڈیٹا کیز اور رشتوں کے ذریعے متعلقہ ٹیبلز میں تقسیم ہوتا ہے، اس لیے تکرّار اور زائدیت کم ہو جاتی ہے۔ اور یہ درمیانی اور بڑی تنظیموں کے لیے بڑا اور پیچیدہ ڈیٹا سنبھال سکتا ہے۔

پوءِ ڪتاب اهي خصوصيتون درج ڪري ٿي جيڪي DBMS کي ترجيحي بڻائين ٿيون. ڪيترائي صارف ڪنٽرول هيٺ ڊيٽا ڏسي، شامل، ترميم ۽ حذف ڪري سگهن ٿا. DBMS ڊيٽا سان ڪم لاءِ ٽول — استفسار، ويو ۽ فارم — فراهم ڪري ٿو. اهو وڌيڪ محفوظ ۽ قابلِ اعتماد آهي، بيڪ اپ ۽ مختلف صارفن لاءِ محدود اجازتن سان. ڊيٽا ڪيز ۽ رشتن ذريعي لاڳاپيل ٽيبلن ۾ ورهائجي ٿو، تنهن ڪري ورجاءَ ۽ زائديت گهٽجي وڃي ٿي. ۽ اهو وچولين ۽ وڏين تنظيمن لاءِ وڏو ۽ پيچيده ڊيٽا سنڀالي سگهي ٿو.

7.2 Components of a database — table, field and record Printed p 146

A table organises data elements in rows and columns — the book's examples are a contact list and a teacher's marks record. A field is the smallest component of the table: one column, holding one kind of value for every record, such as Name or Class. Fields have unique names within their table, and a field is also called an attribute or a column. A record is a single complete entry — one row — made of the values of all the fields for one item: several fields together make one record, records together make a table, and tables together make a database.

ٹیبل ڈیٹا عناصر کو قطاروں اور کالموں میں منظم کرتی ہے — کتاب کی مثالیں رابطہ فہرست اور استاد کا نمبروں والا ریکارڈ ہیں۔ فیلڈ ٹیبل کا سب سے چھوٹا جزو ہے: ایک کالم، جو ہر ریکارڈ کے لیے ایک قسم کی قدر رکھتا ہے، جیسے نام یا جماعت۔ فیلڈز کے اپنی ٹیبل کے اندر منفرد نام ہوتے ہیں، اور فیلڈ کو ایٹریبیوٹ یا کالم بھی کہا جاتا ہے۔ ریکارڈ ایک واحد مکمل اندراج ہے — ایک قطار — جو ایک شے کے لیے تمام فیلڈز کی قدروں سے بنا ہوتا ہے: کئی فیلڈز مل کر ایک ریکارڈ بناتے ہیں، ریکارڈز مل کر ٹیبل، اور ٹیبلز مل کر ڈیٹا بیس۔

ٽيبل ڊيٽا عنصرن کي قطارن ۽ ڪالمن ۾ منظم ڪري ٿي — ڪتاب جا مثال رابطا فهرست ۽ استاد جو نمبرن وارو ريڪارڊ آهن. فيلڊ ٽيبل جو سڀ کان ننڍو جزو آهي: هڪ ڪالم، جيڪو هر ريڪارڊ لاءِ هڪ قسم جي قدر رکي ٿو، جهڙوڪ نالو يا ڪلاس. فيلڊن جا پنهنجي ٽيبل جي اندر منفرد نالا هوندا آهن، ۽ فيلڊ کي ايٽريبيوٽ يا ڪالم به چيو وڃي ٿو. ريڪارڊ هڪ واحد مڪمل اندراج آهي — هڪ قطار — جيڪو هڪ شيءِ لاءِ سڀني فيلڊن جي قدرن مان ٺهيل هوندو آهي: ڪيترائي فيلڊ گڏجي هڪ ريڪارڊ ٺاهين ٿا، ريڪارڊ گڏجي ٽيبل، ۽ ٽيبلون گڏجي ڊيٽابيس.

Printed correction (register TE-CS9-053): the book's record paragraph says in print that a record “is made up of two or several data items which are also called tuples”. That is garbled. The correct statement is: a record is a tuple — “record”, “row” and “tuple” are three names for the same thing — and a record is made up of fields (data items), not of tuples.

چھپی تصحیح (رجسٹر TE-CS9-053): کتاب کا ریکارڈ پیراگراف چھپائی میں کہتا ہے کہ ریکارڈ “is made up of two or several data items which are also called tuples”۔ یہ بگڑا ہوا ہے۔ درست بیان یہ ہے: ریکارڈ بذاتِ خود ایک ٹیوپل ہے — “ریکارڈ”، “قطار” اور “ٹیوپل” ایک ہی چیز کے تین نام ہیں — اور ریکارڈ فیلڈز (ڈیٹا آئٹمز) سے بنا ہوتا ہے، ٹیوپلز سے نہیں۔

ڇپيل تصحيح (رجسٽر TE-CS9-053): ڪتاب جو ريڪارڊ پيراگراف ڇپائي ۾ چوي ٿو ته ريڪارڊ “is made up of two or several data items which are also called tuples”. اهو بگڙيل آهي. درست بيان اهو آهي: ريڪارڊ بذاتِ خود هڪ ٽيوپل آهي — “ريڪارڊ”، “قطار” ۽ “ٽيوپل” هڪ ئي شيءِ جا ٽي نالا آهن — ۽ ريڪارڊ فيلڊن (ڊيٽا آئٽمن) مان ٺهيل هوندو آهي، ٽيوپلن مان نه.

The diagram below shows the three components on one small table. The book's own Figure 7.2 prints a Student table with real-style student and father names; the diagram here uses clearly fictional sample data instead, as all practice data in this unit does (register S9).

نیچے دی گئی شکل تینوں اجزا ایک چھوٹی ٹیبل پر دکھاتی ہے۔ کتاب کی اپنی شکل 7.2 طلبہ اور والد کے اصل جیسے ناموں والی Student ٹیبل چھاپتی ہے؛ یہاں کی شکل اس کے بجائے واضح طور پر فرضی نمونہ ڈیٹا استعمال کرتی ہے، جیسا کہ اس یونٹ کا تمام مشقی ڈیٹا کرتا ہے (رجسٹر S9)۔

هيٺ ڏنل شڪل ٽئي جزا هڪ ننڍي ٽيبل تي ڏيکاري ٿي. ڪتاب جي پنهنجي شڪل 7.2 شاگردن ۽ والد جي اصل جهڙن نالن واري Student ٽيبل ڇاپي ٿي؛ هتي جي شڪل ان بدران واضح طور فرضي نمونا ڊيٽا استعمال ڪري ٿي، جيئن هن يونٽ جو سڀ مشقي ڊيٽا ڪري ٿو (رجسٽر S9).

StudentIDNameClass1A. FictionalIX2B. FictionalIX3C. FictionalXFIELD (column)RECORD (row)TABLE

Table, field and record on one small table (sample data fictional): each column is a field, each row is a record, and the whole grid is the table.

ایک چھوٹی ٹیبل پر ٹیبل، فیلڈ اور ریکارڈ (نمونہ ڈیٹا فرضی): ہر کالم ایک فیلڈ ہے، ہر قطار ایک ریکارڈ، اور پورا گرڈ ٹیبل ہے۔

هڪ ننڍي ٽيبل تي ٽيبل، فيلڊ ۽ ريڪارڊ (نمونا ڊيٽا فرضي): هر ڪالم هڪ فيلڊ آهي، هر قطار هڪ ريڪارڊ، ۽ سڄو گرڊ ٽيبل آهي.

Words in this part

table — data organised in rows (records) and columns (fields) قطاروں (ریکارڈز) اور کالموں (فیلڈز) میں منظم ڈیٹا قطارن (ريڪارڊن) ۽ ڪالمن (فيلڊن) ۾ منظم ڊيٽا

field — one column of a table; the smallest component, also called an attribute ٹیبل کا ایک کالم؛ سب سے چھوٹا جزو، ایٹریبیوٹ بھی کہلاتا ہے ٽيبل جو هڪ ڪالم؛ سڀ کان ننڍو جزو، ايٽريبيوٽ به چئبو آهي

record — one complete row of a table; also called a tuple ٹیبل کی ایک مکمل قطار؛ ٹیوپل بھی کہلاتی ہے ٽيبل جي هڪ مڪمل قطار؛ ٽيوپل به چئبي آهي

7.2 Data types Printed p 147

Every field has a data type, which declares what kind of value the field may hold. The book's table lists six: Integer — whole numbers, such as 145, −35, 74586. Floating Point — numbers with decimal points, such as 5.6, 3.14, 554.9. Character — a single character, such as A, B, c, d. String — a combination of letters, numbers and special characters, such as Pakistan, Computer, @admin. Boolean — a value that is true or false (the book prints the examples 1 and 0, the way many systems store them). Date & Time — a date or time in a specified format, such as 01-01-2020 11:30.

ہر فیلڈ کی ایک ڈیٹا ٹائپ ہوتی ہے، جو اعلان کرتی ہے کہ فیلڈ کس قسم کی قدر رکھ سکتی ہے۔ کتاب کی ٹیبل چھ درج کرتی ہے: Integer — مکمل اعداد، جیسے 145، −35، 74586۔ Floating Point — اعشاریہ والے اعداد، جیسے 5.6، 3.14، 554.9۔ Character — ایک واحد حرف، جیسے A، B، c، d۔ String — حروف، اعداد اور خاص علامات کا مجموعہ، جیسے Pakistan، Computer، @admin۔ Boolean — وہ قدر جو درست یا غلط ہو (کتاب مثالیں 1 اور 0 چھاپتی ہے، جیسا کہ کئی نظام انہیں محفوظ کرتے ہیں)۔ Date & Time — مخصوص فارمیٹ میں تاریخ یا وقت، جیسے 01-01-2020 11:30۔

هر فيلڊ جي هڪ ڊيٽا ٽائپ هوندي آهي، جيڪا اعلان ڪري ٿي ته فيلڊ ڪهڙي قسم جي قدر رکي سگهي ٿي. ڪتاب جي ٽيبل ڇهه درج ڪري ٿي: Integer — مڪمل انگ، جهڙوڪ 145، −35، 74586. Floating Point — اعشاريي وارا انگ، جهڙوڪ 5.6، 3.14، 554.9. Character — هڪ واحد اکر، جهڙوڪ A، B، c، d. String — اکرن، انگن ۽ خاص علامتن جو مجموعو، جهڙوڪ Pakistan، Computer، @admin. Boolean — اها قدر جيڪا درست يا غلط هجي (ڪتاب مثالون 1 ۽ 0 ڇاپي ٿي، جيئن ڪيترائي نظام انهن کي محفوظ ڪن ٿا). Date & Time — مخصوص فارميٽ ۾ تاريخ يا وقت، جهڙوڪ 01-01-2020 11:30.

Two practical points from the book. First, the Integer of MS Access is a small integer: it holds values from −32768 to 32767, so a bigger whole number needs a larger numeric type. Second, choosing the proper data type for each field matters: the DBMS can then reject wrong entries (letters in a marks field, for example), store data compactly, and the book notes that a well-typed database runs faster.

کتاب سے دو عملی نکات۔ پہلا، MS Access کا Integer ایک چھوٹا صحیح عدد ہے: یہ −32768 سے 32767 تک قدریں رکھتا ہے، اس لیے بڑے مکمل عدد کو بڑی عددی قسم درکار ہوتی ہے۔ دوسرا، ہر فیلڈ کے لیے مناسب ڈیٹا ٹائپ کا انتخاب اہم ہے: پھر DBMS غلط اندراجات کو رد کر سکتا ہے (مثال کے طور پر نمبروں والی فیلڈ میں حروف)، ڈیٹا کو سمیٹ کر محفوظ کر سکتا ہے، اور کتاب نوٹ کرتی ہے کہ اچھی طرح ٹائپ شدہ ڈیٹا بیس تیزی سے چلتا ہے۔

ڪتاب مان ٻه عملي نڪتا. پهريون، MS Access جو Integer هڪ ننڍو صحيح انگ آهي: اهو −32768 کان 32767 تائين قدرون رکي ٿو، تنهن ڪري وڏي مڪمل انگ کي وڏي عددي قسم گهرجي. ٻيو، هر فيلڊ لاءِ مناسب ڊيٽا ٽائپ جي چونڊ اهم آهي: پوءِ DBMS غلط اندراجن کي رد ڪري سگهي ٿو (مثال طور نمبرن واري فيلڊ ۾ اکر)، ڊيٽا کي سميٽي محفوظ ڪري سگهي ٿو، ۽ ڪتاب نوٽ ڪري ٿي ته سٺي طرح ٽائپ ٿيل ڊيٽابيس تيزي سان هلي ٿو.

Words in this part

data type — the declared kind of value a field may hold, e.g. Integer or String وہ اعلان شدہ قسم کی قدر جو فیلڈ رکھ سکتی ہے، مثلاً Integer یا String اها اعلان ٿيل قسم جي قدر جيڪا فيلڊ رکي سگهي ٿي، مثلاً Integer يا String

Boolean — a data type holding only true or false وہ ڈیٹا ٹائپ جو صرف درست یا غلط رکھتی ہے اها ڊيٽا ٽائپ جيڪا رڳو درست يا غلط رکي ٿي

7.2 Views — and working in MS Access Printed p 148

A view shows data without storing it. It fetches selected fields and records from one or more tables and presents them as if they were a table, but the data itself stays in the original tables — so a view makes no changes to the stored data. Views are used to show each user only what they need and to keep the rest of the database secure: a view can display names and classes while hiding marks or salaries.

ویو ڈیٹا کو محفوظ کیے بغیر دکھاتا ہے۔ یہ ایک یا زیادہ ٹیبلز سے منتخب فیلڈز اور ریکارڈز لاتا ہے اور انہیں ایسے پیش کرتا ہے گویا وہ ٹیبل ہوں، لیکن ڈیٹا خود اصل ٹیبلز میں رہتا ہے — اس لیے ویو محفوظ ڈیٹا میں کوئی تبدیلی نہیں کرتا۔ ویوز ہر صارف کو صرف وہی دکھانے کے لیے استعمال ہوتے ہیں جس کی اسے ضرورت ہو اور باقی ڈیٹا بیس کو محفوظ رکھنے کے لیے: ویو نام اور جماعتیں دکھا سکتا ہے جبکہ نمبر یا تنخواہیں چھپا سکتا ہے۔

ويو ڊيٽا کي محفوظ ڪرڻ کان سواءِ ڏيکاري ٿو. اهو هڪ يا وڌيڪ ٽيبلن مان چونڊيل فيلڊ ۽ ريڪارڊ آڻي ٿو ۽ انهن کي ائين پيش ڪري ٿو ڄڻ اهي ٽيبل هجن، پر ڊيٽا پاڻ اصل ٽيبلن ۾ رهي ٿو — تنهن ڪري ويو محفوظ ڊيٽا ۾ ڪا تبديلي نٿو ڪري. ويو هر صارف کي رڳو اهو ڏيکارڻ لاءِ استعمال ٿين ٿا جنهن جي ان کي ضرورت هجي ۽ باقي ڊيٽابيس کي محفوظ رکڻ لاءِ: ويو نالا ۽ ڪلاس ڏيکاري سگهي ٿو جڏهن ته نمبر يا پگهارون لڪائي سگهي ٿو.

A table and a view therefore differ in a fundamental way: a table stores real data; a view is a virtual presentation of stored data. That is also the difference the printed matching exercise tests with the pair “View — shows virtual data”.

اس لیے ٹیبل اور ویو میں بنیادی فرق ہے: ٹیبل اصل ڈیٹا محفوظ کرتی ہے؛ ویو محفوظ ڈیٹا کی مجازی پیشکش ہے۔ یہی وہ فرق ہے جو چھپی ملاپ مشق جوڑے “View — shows virtual data” سے جانچتی ہے۔

تنهن ڪري ٽيبل ۽ ويو ۾ بنيادي فرق آهي: ٽيبل اصل ڊيٽا محفوظ ڪري ٿي؛ ويو محفوظ ڊيٽا جي مجازي پيشڪش آهي. اهو ئي اهو فرق آهي جيڪو ڇپيل ملاپ مشق جوڙي “View — shows virtual data” سان جاچي ٿي.

Working in MS Access, the book creates tables in Design View, where each field's name and data type are defined before any data is entered, and shows the entered data in Datasheet View, the grid of rows and columns. Its worked example designs a Customer table with the fields Customer ID (Number — “the unique identifier for a customer”), First Name (Text), Last Name (Text) and Address (Text). The book's Access screenshots are from the 2007-era interface (its sample file is named bankdb): treat them as historical illustrations of the same ideas, since menus and ribbons have changed in appearance since then.

MS Access میں کام کرتے ہوئے، کتاب ٹیبلز Design View میں بناتی ہے، جہاں کوئی ڈیٹا درج کرنے سے پہلے ہر فیلڈ کا نام اور ڈیٹا ٹائپ متعین کیا جاتا ہے، اور درج شدہ ڈیٹا Datasheet View میں دکھاتی ہے، قطاروں اور کالموں کا گرڈ۔ اس کی حل شدہ مثال ایک Customer ٹیبل ڈیزائن کرتی ہے جس کے فیلڈز ہیں Customer ID (Number — “the unique identifier for a customer”)، First Name (Text)، Last Name (Text) اور Address (Text)۔ کتاب کے Access اسکرین شاٹس 2007 دور کے انٹرفیس سے ہیں (اس کی نمونہ فائل کا نام bankdb ہے): انہیں انہی خیالات کی تاریخی تصویریں سمجھیں، کیونکہ اس کے بعد سے مینو اور ربن کی صورت بدل چکی ہے۔

MS Access ۾ ڪم ڪندي، ڪتاب ٽيبلون Design View ۾ ٺاهي ٿي، جتي ڪو ڊيٽا داخل ڪرڻ کان اڳ هر فيلڊ جو نالو ۽ ڊيٽا ٽائپ متعین ڪيو وڃي ٿو، ۽ داخل ٿيل ڊيٽا Datasheet View ۾ ڏيکاري ٿي، قطارن ۽ ڪالمن جو گرڊ. ان جي حل ٿيل مثال هڪ Customer ٽيبل ڊيزائن ڪري ٿي جنهن جا فيلڊ آهن Customer ID (Number — “the unique identifier for a customer”)، First Name (Text)، Last Name (Text) ۽ Address (Text). ڪتاب جا Access اسڪرين شاٽ 2007 واري دور جي انٽرفيس مان آهن (ان جي نموني فائل جو نالو bankdb آهي): انهن کي ساڳين خيالن جون تاريخي تصويرون سمجهو، ڇاڪاڻ ته ان کان پوءِ مينو ۽ ربن جي صورت بدلجي چڪي آهي.

Words in this part

view — a virtual presentation of data fetched from tables; it stores nothing itself ٹیبلز سے لائے گئے ڈیٹا کی مجازی پیشکش؛ یہ خود کچھ محفوظ نہیں کرتی ٽيبلن مان آندل ڊيٽا جي مجازي پيشڪش؛ اها پاڻ ڪجهه محفوظ نٿي ڪري

Design View — the Access view in which a table's fields and data types are defined وہ Access ویو جس میں ٹیبل کے فیلڈز اور ڈیٹا ٹائپس متعین کیے جاتے ہیں اهو Access ويو جنهن ۾ ٽيبل جا فيلڊ ۽ ڊيٽا ٽائپ متعین ڪيا وڃن ٿا

Datasheet View — the Access grid view showing records in rows and fields in columns وہ Access گرڈ ویو جو ریکارڈز قطاروں اور فیلڈز کالموں میں دکھاتا ہے اهو Access گرڊ ويو جيڪو ريڪارڊ قطارن ۽ فيلڊ ڪالمن ۾ ڏيکاري ٿو

7.3 Data modelling and entities Printed p 150

Data modelling is the designing step that comes before building a database: making a conceptual representation of the data objects the system needs and the relations between them. Modelling identifies the important fields, removes irrelevant data, and settles the structure before any table is created in software. The book builds its model from three components: entities, relationships and referential keys.

ڈیٹا ماڈلنگ وہ ڈیزائننگ مرحلہ ہے جو ڈیٹا بیس بنانے سے پہلے آتا ہے: نظام کو درکار ڈیٹا اشیاء اور ان کے درمیان رشتوں کی تصوراتی نمائندگی بنانا۔ ماڈلنگ اہم فیلڈز کی نشاندہی کرتی ہے، غیر متعلقہ ڈیٹا ہٹاتی ہے، اور سافٹ ویئر میں کوئی ٹیبل بننے سے پہلے ساخت طے کرتی ہے۔ کتاب اپنا ماڈل تین اجزا سے بناتی ہے: اینٹیٹیز، رشتے اور ریفرینشل کیز۔

ڊيٽا ماڊلنگ اهو ڊيزائننگ مرحلو آهي جيڪو ڊيٽابيس ٺاهڻ کان اڳ اچي ٿو: نظام کي گهربل ڊيٽا شين ۽ انهن جي وچ ۾ رشتن جي تصوراتي نمائندگي ٺاهڻ. ماڊلنگ اهم فيلڊن جي نشاندهي ڪري ٿي، غير لاڳاپيل ڊيٽا هٽائي ٿي، ۽ سافٽ ويئر ۾ ڪا ٽيبل ٺهڻ کان اڳ ساخت طئي ڪري ٿي. ڪتاب پنهنجو ماڊل ٽن جزن مان ٺاهي ٿي: اينٽيٽيز، رشتا ۽ ريفرينشل ڪيز.

An entity is a distinct thing about which data is stored — it becomes an independent table in the database, and its fields are its attributes. The book's example is an Employees entity with the attributes EmployeeID, Name, Designation and Salary: “Employee” is the entity, and each fact stored about an employee is an attribute. (In this unit's own worked examples, all such data is fictional.)

اینٹیٹی ایک الگ چیز ہے جس کے بارے میں ڈیٹا محفوظ کیا جاتا ہے — یہ ڈیٹا بیس میں ایک آزاد ٹیبل بنتی ہے، اور اس کے فیلڈز اس کے ایٹریبیوٹس ہوتے ہیں۔ کتاب کی مثال Employees اینٹیٹی ہے جس کے ایٹریبیوٹس EmployeeID، Name، Designation اور Salary ہیں: “Employee” اینٹیٹی ہے، اور ملازم کے بارے میں محفوظ ہر حقیقت ایک ایٹریبیوٹ ہے۔ (اس یونٹ کی اپنی حل شدہ مثالوں میں، ایسا تمام ڈیٹا فرضی ہے۔)

اينٽيٽي هڪ الڳ شيءِ آهي جنهن بابت ڊيٽا محفوظ ڪيو وڃي ٿو — اها ڊيٽابيس ۾ هڪ آزاد ٽيبل بڻجي ٿي، ۽ ان جا فيلڊ ان جا ايٽريبيوٽ هوندا آهن. ڪتاب جو مثال Employees اينٽيٽي آهي جنهن جا ايٽريبيوٽ EmployeeID، Name، Designation ۽ Salary آهن: “Employee” اينٽيٽي آهي، ۽ ملازم بابت محفوظ هر حقيقت هڪ ايٽريبيوٽ آهي. (هن يونٽ جي پنهنجي حل ٿيل مثالن ۾، اهڙو سڀ ڊيٽا فرضي آهي.)

Words in this part

entity — a distinct thing about which data is stored; it becomes a table ایک الگ چیز جس کے بارے میں ڈیٹا محفوظ ہو؛ یہ ٹیبل بنتی ہے هڪ الڳ شيءِ جنهن بابت ڊيٽا محفوظ هجي؛ اها ٽيبل بڻجي ٿي

attribute — a property of an entity, stored as one of its fields اینٹیٹی کی ایک خصوصیت، جو اس کے فیلڈز میں سے ایک کے طور پر محفوظ ہو اينٽيٽي جي هڪ خصوصيت، جيڪا ان جي فيلڊن مان هڪ طور محفوظ هجي

data modelling — designing a conceptual representation of data objects and their relations before building the database ڈیٹا بیس بنانے سے پہلے ڈیٹا اشیاء اور ان کے رشتوں کی تصوراتی نمائندگی ڈیزائن کرنا ڊيٽابيس ٺاهڻ کان اڳ ڊيٽا شين ۽ انهن جي رشتن جي تصوراتي نمائندگي ڊيزائن ڪرڻ

7.3.2 Relationships between tables Printed p 151

Why not keep everything in one big table? Because the same facts would be typed again and again — a class teacher's name repeated on every student's row — wasting space and inviting contradiction. That duplication is data redundancy. The relational answer is to split data into focused tables and reconnect them with relationships: a relationship is a connection between two tables, made through a shared attribute, so each fact is stored once and combined when needed.

سب کچھ ایک بڑی ٹیبل میں کیوں نہ رکھا جائے؟ کیونکہ ایک ہی حقائق بار بار لکھے جائیں گے — جماعت کے استاد کا نام ہر طالب علم کی قطار پر دہرایا جائے گا — جگہ ضائع ہوگی اور تضاد کی دعوت ملے گی۔ یہ تکرّار ڈیٹا کی زائدیت (redundancy) ہے۔ رلیشنل جواب یہ ہے کہ ڈیٹا کو مرکوز ٹیبلز میں تقسیم کیا جائے اور انہیں رشتوں سے دوبارہ جوڑا جائے: رشتہ دو ٹیبلز کے درمیان ایک تعلق ہے، جو مشترکہ ایٹریبیوٹ کے ذریعے بنتا ہے، تاکہ ہر حقیقت ایک بار محفوظ ہو اور ضرورت پڑنے پر ملائی جائے۔

سڀ ڪجهه هڪ وڏي ٽيبل ۾ ڇو نه رکيو وڃي؟ ڇاڪاڻ ته ساڳيا حقائق بار بار لکيا ويندا — ڪلاس جي استاد جو نالو هر شاگرد جي قطار تي ورجايو ويندو — جاءِ ضائع ٿيندي ۽ تضاد کي دعوت ملندي. اهو ورجاءَ ڊيٽا جي زائديت (redundancy) آهي. رليشنل جواب اهو آهي ته ڊيٽا کي مرڪوز ٽيبلن ۾ ورهايو وڃي ۽ انهن کي رشتن سان ٻيهر جوڙيو وڃي: رشتو ٻن ٽيبلن جي وچ ۾ هڪ تعلق آهي، جيڪو گڏيل ايٽريبيوٽ ذريعي ٺهي ٿو، ته جيئن هر حقيقت هڪ ڀيرو محفوظ ٿئي ۽ ضرورت پوڻ تي ملائي وڃي.

The book teaches three types of relationship. One-to-One: one record of a table matches only one record of another — uncommon, and used mainly when a very large entity is split into two tables. One-to-Many: one record matches many records of the other table — the most common type; read from the other side, the same connection is Many-to-One. Many-to-Many: records on both sides match many on the other; it is implemented through a third table, the junction table, which turns it into two One-to-Many relationships.

کتاب رشتوں کی تین اقسام پڑھاتی ہے۔ One-to-One: ایک ٹیبل کا ایک ریکارڈ دوسری کے صرف ایک ریکارڈ سے میل کھاتا ہے — غیر عام، اور بنیادی طور پر تب استعمال ہوتا ہے جب بہت بڑی اینٹیٹی دو ٹیبلز میں تقسیم ہو۔ One-to-Many: ایک ریکارڈ دوسری ٹیبل کے کئی ریکارڈز سے میل کھاتا ہے — سب سے عام قسم؛ دوسری طرف سے پڑھا جائے تو یہی تعلق Many-to-One ہے۔ Many-to-Many: دونوں طرف کے ریکارڈز دوسری طرف کے کئی سے میل کھاتے ہیں؛ یہ تیسری ٹیبل، جنکشن ٹیبل، کے ذریعے نافذ ہوتا ہے، جو اسے دو One-to-Many رشتوں میں بدل دیتی ہے۔

ڪتاب رشتن جا ٽي قسم پڙهائي ٿي. One-to-One: هڪ ٽيبل جو هڪ ريڪارڊ ٻي جي رڳو هڪ ريڪارڊ سان ميل کائي ٿو — غير عام، ۽ بنيادي طور تڏهن استعمال ٿئي ٿو جڏهن تمام وڏي اينٽيٽي ٻن ٽيبلن ۾ ورهائجي. One-to-Many: هڪ ريڪارڊ ٻي ٽيبل جي ڪيترن ريڪارڊن سان ميل کائي ٿو — سڀ کان عام قسم؛ ٻي طرف کان پڙهيو وڃي ته اهو ئي تعلق Many-to-One آهي. Many-to-Many: ٻنهي طرفن جا ريڪارڊ ٻي طرف جي ڪيترن سان ميل کائين ٿا؛ اهو ٽين ٽيبل، جنڪشن ٽيبل، ذريعي نافذ ٿئي ٿو، جيڪا ان کي ٻن One-to-Many رشتن ۾ بدلائي ٿي.

Words in this part

relationship — a connection between two tables through a shared attribute مشترکہ ایٹریبیوٹ کے ذریعے دو ٹیبلز کے درمیان تعلق گڏيل ايٽريبيوٽ ذريعي ٻن ٽيبلن جي وچ ۾ تعلق

junction table — a third table that implements a many-to-many relationship as two one-to-many relationships تیسری ٹیبل جو many-to-many رشتے کو دو one-to-many رشتوں کے طور پر نافذ کرتی ہے ٽين ٽيبل جيڪا many-to-many رشتي کي ٻن one-to-many رشتن طور نافذ ڪري ٿي

7.3.3 Keys — primary, foreign and referential Printed p 152

Relationships are configured through keys. A primary key is the field (or combination) chosen to identify each record of a table: the book's two rules are that its value must be unique for every record, and it can never be null (empty). A foreign key is a field in one table whose values refer to a unique key of another table — in practice almost always its primary key — creating the relationship between them. Every non-empty foreign key value must match a value of that referenced key in the related table. Keeping those matches true is called referential integrity — the idea behind the term referential key used by the SLO list — and it protects the data only where the database system actually enforces it: most systems enforce declared foreign keys automatically, but some (SQLite is the common example) apply foreign-key rules only when enforcement is switched on.

رشتے کیز کے ذریعے ترتیب دیے جاتے ہیں۔ پرائمری کی وہ فیلڈ (یا مجموعہ) ہے جو ٹیبل کے ہر ریکارڈ کی شناخت کے لیے منتخب ہو: کتاب کے دو قوانین ہیں کہ اس کی قدر ہر ریکارڈ کے لیے منفرد ہونی چاہیے، اور یہ کبھی null (خالی) نہیں ہو سکتی۔ فارن کی ایک ٹیبل کی وہ فیلڈ ہے جس کی قدریں دوسری ٹیبل کی کسی منفرد کی — عملی طور پر تقریباً ہمیشہ اس کی پرائمری کی — کی طرف اشارہ کرتی ہیں، اور ان کے درمیان رشتہ بناتی ہیں۔ ہر غیر خالی فارن کی قدر کو متعلقہ ٹیبل میں اس حوالہ شدہ کی کی کسی قدر سے میل کھانا چاہیے۔ ان میلوں کو برقرار رکھنا ریفرینشل انٹیگریٹی کہلاتا ہے — یہی وہ خیال ہے جو SLO فہرست میں استعمال شدہ اصطلاح ریفرینشل کی کے پیچھے ہے — اور یہ ڈیٹا کی حفاظت صرف وہاں کرتا ہے جہاں ڈیٹا بیس نظام اسے واقعی نافذ کرے: اکثر نظام اعلان شدہ فارن کیز خودکار طور پر نافذ کرتے ہیں، لیکن بعض (SQLite عام مثال ہے) فارن کی قوانین صرف اس وقت لگاتے ہیں جب نفاذ فعال کیا جائے۔

رشتا ڪيز ذريعي ترتيب ڏنا وڃن ٿا. پرائمري ڪي اها فيلڊ (يا مجموعو) آهي جيڪا ٽيبل جي هر ريڪارڊ جي سڃاڻپ لاءِ چونڊجي: ڪتاب جا ٻه قانون آهن ته ان جي قدر هر ريڪارڊ لاءِ منفرد هجڻ گهرجي، ۽ اها ڪڏهن null (خالي) نٿي ٿي سگهي. فارن ڪي هڪ ٽيبل جي اها فيلڊ آهي جنهن جون قدرون ٻي ٽيبل جي ڪنهن منفرد ڪي — عملي طور لڳ ڀڳ هميشه ان جي پرائمري ڪي — ڏانهن اشارو ڪن ٿيون، ۽ انهن جي وچ ۾ رشتو ٺاهين ٿيون. هر غير خالي فارن ڪي قدر کي لاڳاپيل ٽيبل ۾ ان حوالو ڏنل ڪي جي ڪنهن قدر سان ميل کائڻ گهرجي. انهن ميلن کي برقرار رکڻ ريفرينشل انٽيگريٽي چئبو آهي — اهو ئي خيال آهي جيڪو SLO فهرست ۾ استعمال ٿيل اصطلاح ريفرينشل ڪي جي پويان آهي — ۽ اهو ڊيٽا جي حفاظت رڳو اتي ڪري ٿو جتي ڊيٽا بيس نظام ان کي واقعي نافذ ڪري: گهڻا نظام اعلان ڪيل فارن ڪيز خودڪار طور نافذ ڪن ٿا، پر ڪي (SQLite عام مثال آهي) فارن ڪي قانون رڳو تڏهن لڳائين ٿا جڏهن نفاذ فعال ڪيو وڃي.

Three distinctions the book leaves implicit, stated precisely (register TE-CS9-024). (1) A candidate key is a field, or a combination of fields, that could serve as primary key: its values uniquely identify every record, no field in it is unnecessary (it is minimal), and its values are never null. A table can have several candidate keys; the primary key is the one candidate actually chosen, and the others remain candidate keys. The book never defines candidate keys — this is a labelled supplement, needed because the SLO list asks students to distinguish the key types. (2) A foreign key does not have to be unique: in a One-to-Many relationship the same value repeats on the “many” side — many students carry the same ClassID. It also need not point at a primary key specifically: any key declared unique in the related table can be referenced, though the primary key is the usual target. (3) Whether a foreign key may be null depends on the relationship and on the table’s own rules: it may be null when the relationship is optional (a student not yet assigned to a class), and must not be null when every record has to belong; only a primary key is always forbidden to be null.

تین امتیازات جو کتاب مضمر چھوڑتی ہے، درست طور پر بیان کیے گئے (رجسٹر TE-CS9-024)۔ (1) کینڈیڈیٹ کی وہ فیلڈ، یا فیلڈز کا مجموعہ، ہے جو پرائمری کی کے طور پر کام کر سکتی ہو: اس کی قدریں ہر ریکارڈ کی منفرد شناخت کرتی ہیں، اس میں کوئی فیلڈ غیر ضروری نہیں (یہ کم سے کم ہے)، اور اس کی قدریں کبھی null نہیں ہوتیں۔ کسی ٹیبل میں کئی کینڈیڈیٹ کیز ہو سکتی ہیں؛ پرائمری کی وہ کینڈیڈیٹ ہے جو درحقیقت منتخب ہو، اور باقی کینڈیڈیٹ کیز ہی رہتی ہیں۔ کتاب کینڈیڈیٹ کیز کی تعریف کبھی نہیں کرتی — یہ ایک نشان زد ضمیمہ ہے، جو اس لیے درکار ہے کہ SLO فہرست طلبہ سے کیز کی اقسام میں تمیز چاہتی ہے۔ (2) فارن کی کا منفرد ہونا ضروری نہیں: One-to-Many رشتے میں ایک ہی قدر “کئی” والی طرف دہرائی جاتی ہے — کئی طلبہ کا ایک ہی ClassID ہوتا ہے۔ اس کا خاص طور پر پرائمری کی کی طرف اشارہ کرنا بھی ضروری نہیں: متعلقہ ٹیبل میں منفرد قرار دی گئی کوئی بھی کی حوالہ بن سکتی ہے، اگرچہ پرائمری کی ہی معمول کا ہدف ہے۔ (3) فارن کی null ہو سکتی ہے یا نہیں، یہ رشتے اور ٹیبل کے اپنے قوانین پر منحصر ہے: یہ null ہو سکتی ہے جب رشتہ اختیاری ہو (وہ طالب علم جو ابھی کسی جماعت میں مقرر نہ ہو)، اور null نہیں ہو سکتی جب ہر ریکارڈ کا تعلق لازم ہو؛ صرف پرائمری کی ہمیشہ null ہونے سے ممنوع ہے۔

ٽي امتياز جيڪي ڪتاب مضمر ڇڏي ٿي، درست طور بيان ڪيا ويا (رجسٽر TE-CS9-024). (1) ڪينڊيڊيٽ ڪي اها فيلڊ، يا فيلڊن جو مجموعو، آهي جيڪا پرائمري ڪي طور ڪم ڪري سگهي ٿي: ان جون قدرون هر ريڪارڊ جي منفرد سڃاڻپ ڪن ٿيون، ان ۾ ڪا فيلڊ غير ضروري ناهي (اها گهٽ ۾ گهٽ آهي)، ۽ ان جون قدرون ڪڏهن null نه ٿيون ٿين. ڪنهن ٽيبل ۾ ڪيتريون ڪينڊيڊيٽ ڪيز ٿي سگهن ٿيون؛ پرائمري ڪي اها ڪينڊيڊيٽ آهي جيڪا حقيقت ۾ چونڊجي، ۽ باقي ڪينڊيڊيٽ ڪيز ئي رهن ٿيون. ڪتاب ڪينڊيڊيٽ ڪيز جي تعريف ڪڏهن نٿي ڪري — اهو هڪ نشان لڳل ضميمو آهي، جيڪو ان ڪري گهربل آهي جو SLO فهرست شاگردن کان ڪيز جي قسمن ۾ تميز چاهي ٿي. (2) فارن ڪي جو منفرد هجڻ ضروري ناهي: One-to-Many رشتي ۾ هڪ ئي قدر “ڪيترن” واري طرف ورجائجي ٿي — ڪيترن شاگردن جو هڪ ئي ClassID هوندو آهي. ان جو خاص طور پرائمري ڪي ڏانهن اشارو ڪرڻ به ضروري ناهي: لاڳاپيل ٽيبل ۾ منفرد قرار ڏنل ڪا به ڪي حوالو بڻجي سگهي ٿي، جيتوڻيڪ پرائمري ڪي ئي معمول جو هدف آهي. (3) فارن ڪي null ٿي سگهي ٿي يا نه، اهو رشتي ۽ ٽيبل جي پنهنجن قانونن تي دارومدار رکي ٿو: اها null ٿي سگهي ٿي جڏهن رشتو اختياري هجي (اهو شاگرد جيڪو اڃا ڪنهن ڪلاس ۾ مقرر نه هجي)، ۽ null نٿي ٿي سگهي جڏهن هر ريڪارڊ جو لاڳاپو لازم هجي؛ رڳو پرائمري ڪي هميشه null ٿيڻ کان منع ٿيل آهي.

The book then applies keys to a school example — and gets its central relationship wrong. It prints: “Students table … has an Id field set as a Primary Key. It also has a ClassId field to setup a One-to-One foreign key relationship with the Class table”, and repeats that “a student can be enrolled in only one class; hence, Students table has a One-to-One relationship with Class table.” The reasoning confuses the two directions. “Each student belongs to only one class” is true, but the relationship is judged from both sides: one class contains many students. Class → Students is therefore One-to-Many, and ClassId in Students is an ordinary foreign key repeated on many rows — not a One-to-One link. The printed Figure 7.3 below is preserved exactly as drawn in the book, defects included; the corrected figure follows it.

پھر کتاب کیز کو اسکول کی مثال پر لاگو کرتی ہے — اور اپنے مرکزی رشتے میں غلطی کرتی ہے۔ یہ چھاپتی ہے: “Students table … has an Id field set as a Primary Key. It also has a ClassId field to setup a One-to-One foreign key relationship with the Class table”، اور دہراتی ہے کہ “a student can be enrolled in only one class; hence, Students table has a One-to-One relationship with Class table”۔ استدلال دونوں سمتوں کو گڈمڈ کرتا ہے۔ “ہر طالب علم صرف ایک جماعت سے تعلق رکھتا ہے” درست ہے، لیکن رشتے کا فیصلہ دونوں طرف سے ہوتا ہے: ایک جماعت میں کئی طلبہ ہوتے ہیں۔ اس لیے Class → Students One-to-Many ہے، اور Students میں ClassId ایک عام فارن کی ہے جو کئی قطاروں پر دہرائی جاتی ہے — One-to-One لنک نہیں۔ نیچے چھپی شکل 7.3 بالکل ویسی محفوظ ہے جیسی کتاب میں بنی ہے، خرابیوں سمیت؛ اس کے بعد درست شدہ شکل آتی ہے۔

پوءِ ڪتاب ڪيز کي اسڪول جي مثال تي لاڳو ڪري ٿي — ۽ پنهنجي مرڪزي رشتي ۾ غلطي ڪري ٿي. اها ڇاپي ٿي: “Students table … has an Id field set as a Primary Key. It also has a ClassId field to setup a One-to-One foreign key relationship with the Class table”، ۽ ورجائي ٿي ته “a student can be enrolled in only one class; hence, Students table has a One-to-One relationship with Class table”. استدلال ٻنهي سمن کي گڊمڊ ڪري ٿو. “هر شاگرد رڳو هڪ ڪلاس سان لاڳاپيل آهي” درست آهي، پر رشتي جو فيصلو ٻنهي طرفن کان ٿئي ٿو: هڪ ڪلاس ۾ ڪيترائي شاگرد هوندا آهن. تنهن ڪري Class → Students One-to-Many آهي، ۽ Students ۾ ClassId هڪ عام فارن ڪي آهي جيڪا ڪيترن قطارن تي ورجائجي ٿي — One-to-One لنڪ نه. هيٺ ڇپيل شڪل 7.3 بلڪل ائين محفوظ آهي جيئن ڪتاب ۾ ٺهيل آهي، خرابين سميت؛ ان کان پوءِ درست ٿيل شڪل اچي ٿي.

The printed figure has two further defects. It gives both Class and Teachers a TeachersClassId field, as if the junction table's key lived inside them; and the book's text says the tables “use their TeachersClassId field's foreign key relationship to fetch the related information from this table” — the direction is reversed. Foreign keys live in the junction table (TeachersClass holds TeacherID and ClassID columns pointing outward), not in the tables it connects.

چھپی شکل میں دو مزید خرابیاں ہیں۔ یہ Class اور Teachers دونوں کو TeachersClassId فیلڈ دیتی ہے، گویا جنکشن ٹیبل کی کی ان کے اندر رہتی ہو؛ اور کتاب کا متن کہتا ہے کہ ٹیبلز “use their TeachersClassId field's foreign key relationship to fetch the related information from this table” — سمت الٹی ہے۔ فارن کیز جنکشن ٹیبل کے اندر ہوتی ہیں (TeachersClass میں TeacherID اور ClassID کالم ہوتے ہیں جو باہر کی طرف اشارہ کرتے ہیں)، ان ٹیبلز میں نہیں جنہیں یہ جوڑتی ہے۔

ڇپيل شڪل ۾ ٻه وڌيڪ خرابيون آهن. اها Class ۽ Teachers ٻنهي کي TeachersClassId فيلڊ ڏئي ٿي، ڄڻ جنڪشن ٽيبل جي ڪي انهن جي اندر رهندي هجي؛ ۽ ڪتاب جو متن چوي ٿو ته ٽيبلون “use their TeachersClassId field's foreign key relationship to fetch the related information from this table” — سمت ابتي آهي. فارن ڪيز جنڪشن ٽيبل جي اندر هونديون آهن (TeachersClass ۾ TeacherID ۽ ClassID ڪالم هوندا آهن جيڪي ٻاهر ڏانهن اشارو ڪن ٿا)، انهن ٽيبلن ۾ نه جن کي اها جوڙي ٿي.

StudentsIdNameFathernameClassIdClassIdNameTeachersClassIdTeachersIdNameSubjectTeachersClassIdTeachersClass (Junction Table)IdTeachersIdClassIdOne-to-One Relationship(printed label — incorrect, see corrected figure)One-to-Many Relationships

Figure 7.3 as printed (redrawn faithfully, defects preserved): Students–Class is labelled “One-to-One Relationship”, and both Class and Teachers carry a TeachersClassId field. Both are wrong — see the corrected figure.

شکل 7.3 جیسی چھپی ہے (وفاداری سے دوبارہ بنائی گئی، خرابیاں محفوظ): Students–Class کو “One-to-One Relationship” کہا گیا ہے، اور Class اور Teachers دونوں میں TeachersClassId فیلڈ ہے۔ دونوں غلط ہیں — درست شدہ شکل دیکھیں۔

شڪل 7.3 جيئن ڇپي آهي (وفاداري سان ٻيهر ٺاهيل، خرابيون محفوظ): Students–Class کي “One-to-One Relationship” چيو ويو آهي، ۽ Class ۽ Teachers ٻنهي ۾ TeachersClassId فيلڊ آهي. ٻئي غلط آهن — درست ٿيل شڪل ڏسو.

ClassesClassID (PK)TitleRoomStudentsStudentID (PK)FullNameClassID (FK)TeachersTeacherID (PK)FullNameSubjectTeachersClass (Junction Table)TeacherClassID (PK)TeacherID (FK)ClassID (FK)Unique pair: (TeacherID, ClassID)1∞One-to-Many1∞1∞One-to-Many

Figure 7.3 CORRECTED: Classes (ClassID PK) has many Students (StudentID PK, ClassID FK) — One-to-Many. Teachers and Classes are Many-to-Many, implemented by the junction table TeachersClass (TeacherClassID PK; TeacherID FK; ClassID FK; the pair (TeacherID, ClassID) unique, so the same teacher cannot be entered twice for the same class).

شکل 7.3 درست شدہ: Classes (ClassID PK) کے کئی Students ہیں (StudentID PK، ClassID FK) — One-to-Many۔ Teachers اور Classes Many-to-Many ہیں، جنہیں جنکشن ٹیبل TeachersClass نافذ کرتی ہے (TeacherClassID PK؛ TeacherID FK؛ ClassID FK؛ جوڑا (TeacherID، ClassID) منفرد، تاکہ ایک ہی استاد ایک ہی جماعت کے لیے دو بار درج نہ ہو)۔

شڪل 7.3 درست ٿيل: Classes (ClassID PK) جا ڪيترائي Students آهن (StudentID PK، ClassID FK) — One-to-Many. Teachers ۽ Classes Many-to-Many آهن، جن کي جنڪشن ٽيبل TeachersClass نافذ ڪري ٿي (TeacherClassID PK؛ TeacherID FK؛ ClassID FK؛ جوڙو (TeacherID، ClassID) منفرد، ته جيئن ساڳيو استاد ساڳئي ڪلاس لاءِ ٻه ڀيرا داخل نه ٿئي).

Words in this part

primary key — the chosen field whose unique, never-null value identifies each record وہ منتخب فیلڈ جس کی منفرد، کبھی خالی نہ ہونے والی قدر ہر ریکارڈ کی شناخت کرے اها چونڊيل فيلڊ جنهن جي منفرد، ڪڏهن خالي نه ٿيندڙ قدر هر ريڪارڊ جي سڃاڻپ ڪري

foreign key — a field whose values refer to the primary key of another table, creating a relationship وہ فیلڈ جس کی قدریں دوسری ٹیبل کی پرائمری کی کی طرف اشارہ کریں، رشتہ بناتے ہوئے اها فيلڊ جنهن جون قدرون ٻي ٽيبل جي پرائمري ڪي ڏانهن اشارو ڪن، رشتو ٺاهيندي

candidate key — any field that could serve as primary key (unique, never null); the primary key is the one chosen — supplement, not defined in the book کوئی بھی فیلڈ جو پرائمری کی بن سکے (منفرد، کبھی خالی نہیں)؛ پرائمری کی وہ ہے جو منتخب ہو — ضمیمہ، کتاب میں متعین نہیں ڪا به فيلڊ جيڪا پرائمري ڪي بڻجي سگهي (منفرد، ڪڏهن خالي نه)؛ پرائمري ڪي اها آهي جيڪا چونڊجي — ضميمو، ڪتاب ۾ متعین نه

7.3.4 The ER model and ER diagrams Printed p 153

An Entity-Relationship (ER) model is the diagrammatic design of a database: its ER diagram (ERD) draws the entities, their attributes and the relationships between them before the database is built. The book gives two uses. When the database does not yet exist, the ERD is a clear representation worked out from the user's requirements, guiding construction. When a database already exists, the ERD documents it — database tools can even generate the diagram automatically from a working database.

اینٹیٹی-رلیشن شپ (ER) ماڈل ڈیٹا بیس کا خاکہ نما ڈیزائن ہے: اس کا ER ڈایاگرام (ERD) ڈیٹا بیس بننے سے پہلے اینٹیٹیز، ان کے ایٹریبیوٹس اور ان کے درمیان رشتے کھینچتا ہے۔ کتاب دو استعمال دیتی ہے۔ جب ڈیٹا بیس ابھی موجود نہ ہو، ERD صارف کی ضروریات سے تیار کردہ واضح نمائندگی ہے، جو تعمیر کی رہنمائی کرتی ہے۔ جب ڈیٹا بیس پہلے سے موجود ہو، ERD اس کی دستاویز بندی کرتا ہے — ڈیٹا بیس ٹولز تو چلتے ڈیٹا بیس سے خاکہ خودکار طور پر بھی بنا سکتے ہیں۔

اينٽيٽي-رليشن شپ (ER) ماڊل ڊيٽابيس جو خاڪي نما ڊيزائن آهي: ان جو ER ڊاياگرام (ERD) ڊيٽابيس ٺهڻ کان اڳ اينٽيٽيز، انهن جا ايٽريبيوٽ ۽ انهن جي وچ ۾ رشتا ڇڪي ٿو. ڪتاب ٻه استعمال ڏئي ٿي. جڏهن ڊيٽابيس اڃا موجود نه هجي، ERD صارف جي ضرورتن مان تيار ڪيل واضح نمائندگي آهي، جيڪا تعمير جي رهنمائي ڪري ٿي. جڏهن ڊيٽابيس اڳ ۾ موجود هجي، ERD ان جي دستاويز بندي ڪري ٿو — ڊيٽابيس ٽول ته هلندڙ ڊيٽابيس مان خاڪو خودڪار طور به ٺاهي سگهن ٿا.

In the book's notation (the Chen notation), a rectangle represents an entity, an ellipse (oval) represents an attribute, a diamond represents a relationship, and connecting lines join them; where a line's end is marked 1 or M, it states how many records take part on that side. The book's own steps for designing an ER model are: identify the entities; identify their attributes; identify the relationships; define primary keys in the interrelated entities; design the foreign-key relationships bound to those primary keys; and generate the automated ER diagram.

کتاب کی علامت بندی (Chen علامت بندی) میں، مستطیل اینٹیٹی کی نمائندگی کرتا ہے، بیضوی (ellipse) ایٹریبیوٹ کی، ہیرا نما (diamond) رشتے کی، اور ملانے والی لکیریں انہیں جوڑتی ہیں؛ جہاں لکیر کے سرے پر 1 یا M نشان ہو، یہ بتاتا ہے کہ اس طرف کتنے ریکارڈ حصہ لیتے ہیں۔ ER ماڈل ڈیزائن کرنے کے کتاب کے اپنے مراحل یہ ہیں: اینٹیٹیز کی نشاندہی کریں؛ ان کے ایٹریبیوٹس کی نشاندہی کریں؛ رشتوں کی نشاندہی کریں؛ باہم متعلق اینٹیٹیز میں پرائمری کیز متعین کریں؛ ان پرائمری کیز سے بندھی فارن کی رشتے ڈیزائن کریں؛ اور خودکار ER ڈایاگرام تیار کریں۔

ڪتاب جي علامت بندي (Chen علامت بندي) ۾، مستطيل اينٽيٽي جي نمائندگي ڪري ٿو، بيضوي (ellipse) ايٽريبيوٽ جي، هيرا نما (diamond) رشتي جي، ۽ ملائيندڙ لڪيرون انهن کي جوڙين ٿيون؛ جتي لڪير جي ڇيڙي تي 1 يا M نشان هجي، اهو ٻڌائي ٿو ته ان طرف ڪيترا ريڪارڊ حصو وٺن ٿا. ER ماڊل ڊيزائن ڪرڻ جا ڪتاب جا پنهنجا مرحلا هي آهن: اينٽيٽين جي نشاندهي ڪريو؛ انهن جي ايٽريبيوٽن جي نشاندهي ڪريو؛ رشتن جي نشاندهي ڪريو؛ باهم لاڳاپيل اينٽيٽين ۾ پرائمري ڪيز متعین ڪريو؛ انهن پرائمري ڪيز سان ٻڌل فارن ڪي رشتا ڊيزائن ڪريو؛ ۽ خودڪار ER ڊاياگرام تيار ڪريو.

NameWriterCreatesTitleNovelBuysCons-umerName

The book's sample ER diagram (redrawn): a Writer creates a Novel; a Consumer buys a Novel. Rectangles are entities, diamonds are relationships, ellipses are attributes.

کتاب کا نمونہ ER ڈایاگرام (دوبارہ بنایا گیا): ایک Writer ایک Novel تخلیق کرتا ہے؛ ایک Consumer ایک Novel خریدتا ہے۔ مستطیل اینٹیٹیز ہیں، ہیرا نما رشتے، بیضوی ایٹریبیوٹس۔

ڪتاب جو نمونو ER ڊاياگرام (ٻيهر ٺاهيل): هڪ Writer هڪ Novel تخليق ڪري ٿو؛ هڪ Consumer هڪ Novel خريد ڪري ٿو. مستطيل اينٽيٽيز آهن، هيرا نما رشتا، بيضوي ايٽريبيوٽ.

Words in this part

ER model — the entity-relationship design of a database, drawn as an ER diagram ڈیٹا بیس کا اینٹیٹی-رلیشن شپ ڈیزائن، جو ER ڈایاگرام کے طور پر کھینچا جائے ڊيٽابيس جو اينٽيٽي-رليشن شپ ڊيزائن، جيڪو ER ڊاياگرام طور ڇڪيو وڃي

ERD — entity-relationship diagram — rectangles for entities, ellipses for attributes, diamonds for relationships اینٹیٹی-رلیشن شپ ڈایاگرام — اینٹیٹیز کے لیے مستطیل، ایٹریبیوٹس کے لیے بیضوی، رشتوں کے لیے ہیرا نما اينٽيٽي-رليشن شپ ڊاياگرام — اينٽيٽين لاءِ مستطيل، ايٽريبيوٽن لاءِ بيضوي، رشتن لاءِ هيرا نما

Summary of the unit (printed p 156) Printed p 156

The unit's printed summary collects its main points: a database is organised data; a DBMS is the software that manages it and is preferred over flat files because it serves many users, avoids redundancy and protects the data; tables are built from fields and records; every field has a data type; views present data without storing it; entities, attributes and relationships are designed in an ER model; and keys — primary and foreign — create and guard the relationships.

یونٹ کا چھپا خلاصہ اس کے اہم نکات جمع کرتا ہے: ڈیٹا بیس منظم ڈیٹا ہے؛ DBMS وہ سافٹ ویئر ہے جو اسے منظم کرتا ہے اور فلیٹ فائلوں پر اس لیے ترجیح رکھتا ہے کہ یہ کئی صارفین کی خدمت کرتا ہے، زائدیت سے بچاتا ہے اور ڈیٹا کی حفاظت کرتا ہے؛ ٹیبلز فیلڈز اور ریکارڈز سے بنتی ہیں؛ ہر فیلڈ کی ایک ڈیٹا ٹائپ ہوتی ہے؛ ویوز ڈیٹا کو محفوظ کیے بغیر پیش کرتے ہیں؛ اینٹیٹیز، ایٹریبیوٹس اور رشتے ER ماڈل میں ڈیزائن ہوتے ہیں؛ اور کیز — پرائمری اور فارن — رشتے بناتی اور ان کی حفاظت کرتی ہیں۔

يونٽ جو ڇپيل خلاصو ان جا اهم نڪتا گڏ ڪري ٿو: ڊيٽابيس منظم ڊيٽا آهي؛ DBMS اهو سافٽ ويئر آهي جيڪو ان کي منظم ڪري ٿو ۽ فليٽ فائلن تي ان ڪري ترجيح رکي ٿو جو اهو ڪيترن صارفن جي خدمت ڪري ٿو، زائديت کان بچائي ٿو ۽ ڊيٽا جي حفاظت ڪري ٿو؛ ٽيبلون فيلڊن ۽ ريڪارڊن مان ٺهن ٿيون؛ هر فيلڊ جي هڪ ڊيٽا ٽائپ هوندي آهي؛ ويو ڊيٽا کي محفوظ ڪرڻ کان سواءِ پيش ڪن ٿا؛ اينٽيٽيز، ايٽريبيوٽ ۽ رشتا ER ماڊل ۾ ڊيزائن ٿين ٿا؛ ۽ ڪيز — پرائمري ۽ فارن — رشتا ٺاهين ۽ انهن جي حفاظت ڪن ٿيون.

One printed summary bullet must be corrected (register TE-CS9-052): it says “There are essentially two types of relationships: One-to-One relationship and One-to-Many relationship.” The unit itself teaches three — §7.3.2 includes Many-to-Many, and the same summary correctly adds that a Many-to-Many relationship is a combination of two One-to-Many relationships through a junction table. Learn the summary with that correction applied: the types are One-to-One, One-to-Many and Many-to-Many.

چھپے خلاصے کا ایک نکتہ درست کرنا ضروری ہے (رجسٹر TE-CS9-052): یہ کہتا ہے “There are essentially two types of relationships: One-to-One relationship and One-to-Many relationship.” یونٹ خود تین پڑھاتا ہے — §7.3.2 میں Many-to-Many شامل ہے، اور یہی خلاصہ درست طور پر یہ بھی کہتا ہے کہ Many-to-Many رشتہ جنکشن ٹیبل کے ذریعے دو One-to-Many رشتوں کا مجموعہ ہے۔ خلاصہ اس تصحیح کے ساتھ سیکھیں: اقسام One-to-One، One-to-Many اور Many-to-Many ہیں۔

ڇپيل خلاصي جو هڪ نڪتو درست ڪرڻ ضروري آهي (رجسٽر TE-CS9-052): اهو چوي ٿو “There are essentially two types of relationships: One-to-One relationship and One-to-Many relationship.” يونٽ پاڻ ٽي پڙهائي ٿو — §7.3.2 ۾ Many-to-Many شامل آهي، ۽ اهو ئي خلاصو درست طور اهو به چوي ٿو ته Many-to-Many رشتو جنڪشن ٽيبل ذريعي ٻن One-to-Many رشتن جو مجموعو آهي. خلاصو ان تصحيح سان سکو: قسم One-to-One، One-to-Many ۽ Many-to-Many آهن.

The book closes the unit by listing further reading resources. Those web links are not reproduced here — they are recorded as under review (register TE-CS9-025); ask your teacher before following any printed link, as old links may have changed or lapsed.

کتاب یونٹ کا اختتام مزید مطالعے کے وسائل درج کر کے کرتی ہے۔ وہ ویب لنکس یہاں نہیں دہرائے گئے — وہ زیرِ جائزہ درج ہیں (رجسٹر TE-CS9-025)؛ کسی چھپے لنک پر جانے سے پہلے اپنے استاد سے پوچھیں، کیونکہ پرانے لنکس بدل چکے یا ختم ہو چکے ہو سکتے ہیں۔

ڪتاب يونٽ جو اختتام وڌيڪ مطالعي جا وسيلا درج ڪري ڪري ٿي. اهي ويب لنڪ هتي نه ورجايا ويا آهن — اهي زيرِ جائزو درج آهن (رجسٽر TE-CS9-025)؛ ڪنهن ڇپيل لنڪ تي وڃڻ کان اڳ پنهنجي استاد کان پڇو، ڇاڪاڻ ته پراڻا لنڪ بدلجي چڪا يا ختم ٿي چڪا ٿي سگهن ٿا.

📚 Book Vocabulary — the unit's own important terms (must learn)

These terms are taken from this unit of your book — learn them first. This table always shows all three languages together.

Word ⭐Meaning (English)اردوسنڌي
database ⭐an organised collection of related data stored for efficient useمتعلقہ ڈیٹا کا منظم مجموعہ جو مؤثر استعمال کے لیے محفوظ ہولاڳاپيل ڊيٽا جو منظم مجموعو جيڪو موثر استعمال لاءِ محفوظ هجي
database management system (DBMS) ⭐the software that manages a database and serves its usersوہ سافٹ ویئر جو ڈیٹا بیس کو منظم کرتا ہے اور اس کے صارفین کی خدمت کرتا ہےاهو سافٽ ويئر جيڪو ڊيٽابيس کي منظم ڪري ٿو ۽ ان جي صارفن جي خدمت ڪري ٿو
flat file system ⭐storing data in a single plain-text file, one record per lineڈیٹا کو ایک واحد سادہ ٹیکسٹ فائل میں محفوظ کرنا، ہر لائن پر ایک ریکارڈڊيٽا کي هڪ واحد سادي ٽيڪسٽ فائل ۾ محفوظ ڪرڻ، هر لائن تي هڪ ريڪارڊ
table ⭐data organised in rows and columnsقطاروں اور کالموں میں منظم ڈیٹاقطارن ۽ ڪالمن ۾ منظم ڊيٽا
field ⭐one column of a table, holding one kind of value; also called an attributeٹیبل کا ایک کالم، ایک قسم کی قدر رکھنے والا؛ ایٹریبیوٹ بھی کہلاتا ہےٽيبل جو هڪ ڪالم، هڪ قسم جي قدر رکندڙ؛ ايٽريبيوٽ به چئبو آهي
record ⭐one complete row of a table; also called a tupleٹیبل کی ایک مکمل قطار؛ ٹیوپل بھی کہلاتی ہےٽيبل جي هڪ مڪمل قطار؛ ٽيوپل به چئبي آهي
data type ⭐the kind of value a field may hold, e.g. Integer, String, Booleanقدر کی وہ قسم جو فیلڈ رکھ سکتی ہے، مثلاً Integer، String، Booleanقدر جو اهو قسم جيڪو فيلڊ رکي سگهي ٿي، مثلاً Integer، String، Boolean
view ⭐a virtual presentation of data from tables; it stores nothingٹیبلز کے ڈیٹا کی مجازی پیشکش؛ یہ کچھ محفوظ نہیں کرتیٽيبلن جي ڊيٽا جي مجازي پيشڪش؛ اها ڪجهه محفوظ نٿي ڪري
entity ⭐a distinct thing about which data is stored; becomes a tableایک الگ چیز جس کے بارے میں ڈیٹا محفوظ ہو؛ ٹیبل بنتی ہےهڪ الڳ شيءِ جنهن بابت ڊيٽا محفوظ هجي؛ ٽيبل بڻجي ٿي
attribute ⭐a property of an entity, stored as one of its fieldsاینٹیٹی کی خصوصیت، جو اس کے فیلڈز میں سے ایک کے طور پر محفوظ ہواينٽيٽي جي خصوصيت، جيڪا ان جي فيلڊن مان هڪ طور محفوظ هجي
relationship ⭐a connection between two tables through a shared attributeمشترکہ ایٹریبیوٹ کے ذریعے دو ٹیبلز کے درمیان تعلقگڏيل ايٽريبيوٽ ذريعي ٻن ٽيبلن جي وچ ۾ تعلق
primary key ⭐the field whose unique, never-null value identifies each recordوہ فیلڈ جس کی منفرد، کبھی خالی نہ ہونے والی قدر ہر ریکارڈ کی شناخت کرےاها فيلڊ جنهن جي منفرد، ڪڏهن خالي نه ٿيندڙ قدر هر ريڪارڊ جي سڃاڻپ ڪري
foreign key ⭐a field whose values refer to the primary key of another tableوہ فیلڈ جس کی قدریں دوسری ٹیبل کی پرائمری کی کی طرف اشارہ کریںاها فيلڊ جنهن جون قدرون ٻي ٽيبل جي پرائمري ڪي ڏانهن اشارو ڪن
ER model ⭐the entity-relationship design of a database, drawn as an ER diagramڈیٹا بیس کا اینٹیٹی-رلیشن شپ ڈیزائن، جو ER ڈایاگرام کے طور پر کھینچا جائےڊيٽابيس جو اينٽيٽي-رليشن شپ ڊيزائن، جيڪو ER ڊاياگرام طور ڇڪيو وڃي
data redundancy ⭐the same data stored again in more than one placeایک ہی ڈیٹا کا ایک سے زیادہ جگہ دوبارہ محفوظ ہوناساڳئي ڊيٽا جو هڪ کان وڌيڪ هنڌ ٻيهر محفوظ ٿيڻ
tuple ⭐another name for a record (one row of a table)ریکارڈ کا دوسرا نام (ٹیبل کی ایک قطار)ريڪارڊ جو ٻيو نالو (ٽيبل جي هڪ قطار)

🌱 Extra Help Words

These words are NOT the book's listed terms. They are kept in a separate list only to help you read the lesson easily.

WordMeaning (English)اردوسنڌي
candidate keyany field that could serve as primary key because its values are unique and never nullکوئی بھی فیلڈ جو پرائمری کی بن سکے کیونکہ اس کی قدریں منفرد ہیں اور کبھی خالی نہیںڪا به فيلڊ جيڪا پرائمري ڪي بڻجي سگهي ڇاڪاڻ ته ان جون قدرون منفرد آهن ۽ ڪڏهن خالي نه
referential keythe foreign-key side of a relationship, whose values must match the referenced primary keyرشتے کا فارن کی رخ، جس کی قدروں کو حوالہ شدہ پرائمری کی سے میل کھانا چاہیےرشتي جو فارن ڪي رخ، جنهن جي قدرن کي حوالو ڏنل پرائمري ڪي سان ميل کائڻ گهرجي
junction tablea third table implementing a many-to-many relationshipتیسری ٹیبل جو many-to-many رشتہ نافذ کرتی ہےٽين ٽيبل جيڪا many-to-many رشتو نافذ ڪري ٿي
delimitera character such as a tab or comma separating fields in a text fileکوئی حرف جیسے ٹیب یا کوما جو ٹیکسٹ فائل میں فیلڈز الگ کرےڪو اکر جهڙوڪ ٽيب يا ڪاما جيڪو ٽيڪسٽ فائل ۾ فيلڊ الڳ ڪري
Design Viewthe Access view for defining a table's fields and data typesٹیبل کے فیلڈز اور ڈیٹا ٹائپس متعین کرنے کا Access ویوٽيبل جا فيلڊ ۽ ڊيٽا ٽائپ متعین ڪرڻ جو Access ويو
Datasheet Viewthe Access grid showing records and fields as rows and columnsریکارڈز اور فیلڈز کو قطاروں اور کالموں کے طور پر دکھانے والا Access گرڈريڪارڊن ۽ فيلڊن کي قطارن ۽ ڪالمن طور ڏيکارڻ وارو Access گرڊ
querya question put to the database that fetches matching dataڈیٹا بیس سے کیا گیا سوال جو میل کھاتا ڈیٹا لاتا ہےڊيٽابيس کان ڪيل سوال جيڪو ميل کائيندڙ ڊيٽا آڻي ٿو
integritythe correctness and consistency of stored dataمحفوظ ڈیٹا کی درستگی اور مطابقتمحفوظ ڊيٽا جي درستگي ۽ مطابقت
nullan empty value — a field holding nothing at allخالی قدر — وہ فیلڈ جس میں کچھ بھی نہ ہوخالي قدر — اها فيلڊ جنهن ۾ ڪجهه به نه هجي
uniqueappearing only once; no two records share the valueصرف ایک بار آنے والا؛ کوئی دو ریکارڈ قدر مشترک نہیں رکھتےرڳو هڪ ڀيرو ايندڙ؛ ڪي ٻه ريڪارڊ قدر گڏ نٿا رکن

Help us improve this page. Spotted a mistake, or something that is not clear? Email us at [email protected] — every report helps the next student.