DBMS — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye.

📚 639 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
639 questions

Question 346

EN + हिं Medium
GB Question::all() returns
IN प्रश्न::सभी() रिटर्न
First record only केवल पहला रिकॉर्ड
Collection of all Question model instances सभी प्रश्न मॉडल उदाहरणों का संग्रह
Count of questions प्रश्नों की संख्या
NULL व्यर्थ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Model::all(): retrieves ALL rows from table as a Collection of model instances.
व्याख्या (हिन्दी) मॉडल::सभी(): मॉडल उदाहरणों के संग्रह के रूप में तालिका से सभी पंक्तियों को पुनर्प्राप्त करता है।
🎯 Exam Perspective
DBMS ("Introduction to DBMS" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 347

EN + हिं Medium
GB Question::find(1) returns
IN प्रश्न::(1) रिटर्न खोजें
All questions सभी प्रश्न
Question with PK=1 or NULL if not found यदि नहीं मिला तो PK=1 या NULL वाला प्रश्न
Questions where id>1 प्रश्न जहां आईडी>1
First question only केवल पहला प्रश्न
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) find($id): retrieves model with that primary key value, or NULL if not found.
व्याख्या (हिन्दी) ढूंढें($id): उस प्राथमिक कुंजी मान के साथ मॉडल पुनर्प्राप्त करता है, या नहीं मिलने पर NULL प्राप्त करता है।
🎯 Exam Perspective
यह सवाल DBMS ("Introduction to DBMS" sub-topic) category का है — difficulty level "Medium", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 348

EN + हिं Medium
GB findOrFail($id) when ID not found
IN जब आईडी नहीं मिली तो findOrFair($id)।
Returns NULL शून्य लौटाता है
Returns empty collection खाली संग्रह लौटाता है
Throws ModelNotFoundException मॉडलनॉटफाउंडएक्सेप्शन फेंकता है
Creates new record नया रिकॉर्ड बनाया
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) findOrFail: throws ModelNotFoundException (404 in web context) if record not found.
व्याख्या (हिन्दी) findOrFair: यदि रिकॉर्ड नहीं मिला तो मॉडलनॉटफाउंडएक्सेप्शन (वेब ​​​​संदर्भ में 404) फेंकता है।
🎯 Exam Perspective
यह प्रश्न DBMS ("Introduction to DBMS" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 349

EN + हिं Medium
GB Eager loading with('posts') prevents
IN ('पोस्ट') के साथ उत्सुकतापूर्वक लोड करने से रोकता है
Slow queries धीमी क्वेरी
N+1 query problem by loading related models in 2 queries instead of N+1 N+1 के बजाय 2 क्वेरी में संबंधित मॉडल लोड करके N+1 क्वेरी समस्या
Table locking टेबल लॉक करना
Migration errors माइग्रेशन त्रुटियाँ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) with('relation') eager loads: 1 query for all models + 1 for all related = 2 total (not N+1).
व्याख्या (हिन्दी) with('relation') उत्सुक भार: सभी मॉडलों के लिए 1 क्वेरी + सभी संबंधितों के लिए 1 = कुल 2 (एन+1 नहीं)।
🎯 Exam Perspective
DBMS ("Introduction to DBMS" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 350

EN + हिं Medium
GB Eloquent create() requires
IN सुवक्ता सृजन() की आवश्यकता है
No setup कोई सेटअप नहीं
$fillable array set on model (mass assignment protection) मॉडल पर $भरने योग्य सरणी सेट (मास असाइनमेंट सुरक्षा)
$guarded only केवल $रक्षित
A factory एक कारखाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) create(): uses mass assignment - must define $fillable whitelist or $guarded blacklist.
व्याख्या (हिन्दी) create(): बड़े पैमाने पर असाइनमेंट का उपयोग करता है - $ fillable श्वेतसूची या $ संरक्षित ब्लैकलिस्ट को परिभाषित करना होगा।
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में DBMS ("Introduction to DBMS" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 351

EN + हिं Medium
GB $question->save() performs
IN $question->save() निष्पादित करता है
SELECT query क्वेरी चुनें
DELETE query क्वेरी हटाएँ
INSERT for new model or UPDATE for existing model नए मॉडल के लिए सम्मिलित करें या मौजूदा मॉडल के लिए अद्यतन करें
TRUNCATE काट-छांट
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) save(): executes INSERT for new (unsaved) instances or UPDATE for existing (already in DB).
व्याख्या (हिन्दी) save(): नए (बिना सहेजे गए) उदाहरणों के लिए INSERT या मौजूदा (पहले से ही DB में) के लिए अद्यतन निष्पादित करता है।
🎯 Exam Perspective
अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो DBMS ("Introduction to DBMS" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 352

EN + हिं Medium
GB Soft delete uses
IN सॉफ्ट डिलीट उपयोग
Boolean is_deleted column only बूलियन केवल कॉलम हटा दिया गया है
deleted_at TIMESTAMP column (NULL=active, timestamp=deleted) TIMESTAMP कॉलम पर हटा दिया गया (शून्य=सक्रिय, टाइमस्टैम्प=हटाया गया)
Physically deletes and archives भौतिक रूप से हटाता है और संग्रहीत करता है
DROP TABLE ड्रॉप तालिका
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) SoftDeletes trait: uses deleted_at column. Soft-deleted rows stay in DB but excluded from normal queries.
व्याख्या (हिन्दी) SoftDeletes विशेषता: delete_at कॉलम का उपयोग करता है। सॉफ़्ट-डिलीट पंक्तियाँ DB में रहती हैं लेकिन सामान्य प्रश्नों से बाहर रखी जाती हैं।
🎯 Exam Perspective
DBMS ("Introduction to DBMS" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 353

EN + हिं Medium
GB withTrashed() includes
IN withTrashed() शामिल है
Only soft-deleted records केवल सॉफ्ट-डिलीट किए गए रिकॉर्ड
All records including soft-deleted ones सॉफ़्ट-डिलीट सहित सभी रिकॉर्ड
Only active records केवल सक्रिय रिकॉर्ड
Only trashed records केवल रिकॉर्ड रद्दी कर दिए गए
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) withTrashed()->get(): includes BOTH soft-deleted and non-deleted records.
व्याख्या (हिन्दी) withTrashed()->get(): इसमें सॉफ्ट-डिलीट और नॉन-डिलीट किए गए दोनों रिकॉर्ड शामिल हैं।
🎯 Exam Perspective
यह सवाल DBMS ("Introduction to DBMS" sub-topic) category का है — difficulty level "Medium", और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 354

EN + हिं Medium
GB belongsToMany() is used for
IN संबंधितToMany() का उपयोग किसके लिए किया जाता है?
One-to-one एक से एक
One-to-many कई लोगों के लिए एक
Many-to-many relationship requiring pivot table अनेक-से-अनेक संबंध के लिए पिवट तालिका की आवश्यकता होती है
Polymorphic बहुरूपी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) belongsToMany: defines M:N relationship using a pivot (junction) table.
व्याख्या (हिन्दी) संबंधितToMany: पिवट (जंक्शन) तालिका का उपयोग करके M:N संबंध को परिभाषित करता है।
🎯 Exam Perspective
यह प्रश्न DBMS ("Introduction to DBMS" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 355

EN + हिं Medium
GB chunk(100, callback) in Eloquent
IN सुवक्ता में खंड(100, कॉलबैक)।
Paginates results परिणाम पृष्ठांकित करता है
Processes records 100 at a time preventing memory exhaustion मेमोरी थकावट को रोकने के लिए प्रक्रियाएं एक समय में 100 रिकॉर्ड करती हैं
Sorts records अभिलेखों को क्रमबद्ध करता है
Groups records समूह अभिलेख
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) chunk: processes large datasets in batches of N records, preventing OOM for millions of rows.
व्याख्या (हिन्दी) खंड: एन रिकॉर्ड के बैचों में बड़े डेटासेट को संसाधित करता है, लाखों पंक्तियों के लिए ओओएम को रोकता है।
🎯 Exam Perspective
DBMS ("Introduction to DBMS" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 356

EN + हिं Medium
GB DB::table('questions')->get() returns
IN DB::table('questions')->get() रिटर्न
Eloquent models वाक्पटु मॉडल
Plain PHP stdClass objects (not Eloquent model instances) सादा PHP stdClass ऑब्जेक्ट (एलोक्वेंट मॉडल उदाहरण नहीं)
Array of arrays सरणियों की श्रृंखला
Paginator पेजिनेटर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Query Builder: returns stdClass objects. Eloquent's Model::all() returns model instances.
व्याख्या (हिन्दी) क्वेरी बिल्डर: stdClass ऑब्जेक्ट लौटाता है। एलोक्वेंट का मॉडल::सभी() मॉडल उदाहरण लौटाता है।
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में DBMS ("Introduction to DBMS" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 357

EN + हिं Medium
GB DB::table('questions')->where('is_deleted',0)->count() returns
IN DB::table('questions')->where('is_deleted',0)->count() रिटर्न
All questions सभी प्रश्न
SQL DELETE count एसक्यूएल डिलीट गिनती
Integer count of non-deleted questions न हटाए गए प्रश्नों की पूर्णांक संख्या
NULL व्यर्थ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) count(): returns number of rows matching query: SELECT COUNT(*) FROM questions WHERE is_deleted=0.
व्याख्या (हिन्दी) गिनती(): क्वेरी से मेल खाने वाली पंक्तियों की संख्या लौटाता है: उन प्रश्नों से COUNT(*) चुनें जहां_हटाया गया = 0 है।
🎯 Exam Perspective
अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो DBMS ("Introduction to DBMS" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 358

EN + हिं Medium
GB php artisan migrate:fresh
IN php कारीगर माइग्रेट: ताज़ा
Runs pending migrations लंबित माइग्रेशन चलाता है
Rolls back last batch अंतिम बैच वापस रोल करता है
Drops ALL tables then re-runs all migrations सभी तालिकाओं को हटाता है और फिर सभी माइग्रेशन को फिर से चलाता है
Refreshes one migration एक माइग्रेशन को ताज़ा करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) migrate:fresh: DROP all tables, then run all migrations from scratch. Clean slate.
व्याख्या (हिन्दी) माइग्रेट: ताज़ा: सभी तालिकाओं को हटा दें, फिर स्क्रैच से सभी माइग्रेशन चलाएँ। नई शुरुआत।
🎯 Exam Perspective
DBMS ("Introduction to DBMS" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 359

EN + हिं Medium
GB Schema::create() in migration
IN माइग्रेशन में Schema::create()
Drops a table एक टेबल गिरा देता है
Creates a new database table एक नई डेटाबेस टेबल बनाता है
Modifies existing table मौजूदा तालिका को संशोधित करता है
Creates index only केवल सूचकांक बनाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Schema::create('tablename', fn(Blueprint $table){...}) creates a new table.
व्याख्या (हिन्दी) Schema::create('tablename', fn(Blueprint $table){...}) एक नई तालिका बनाता है।
🎯 Exam Perspective
यह सवाल DBMS ("Introduction to DBMS" sub-topic) category का है — difficulty level "Medium", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 360

EN + हिं Medium
GB $table->id() creates
IN $table->id() बनाता है
UUID column यूयूआईडी कॉलम
AUTO_INCREMENT UNSIGNED BIGINT primary key column named id AUTO_INCREMENT अहस्ताक्षरित BIGINT प्राथमिक कुंजी कॉलम जिसका नाम आईडी है
Non-primary integer गैर-प्राथमिक पूर्णांक
VARCHAR id वचर आईडी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) id() shorthand for bigIncrements('id'): auto-increment BIGINT UNSIGNED primary key.
व्याख्या (हिन्दी) आईडी() bigIncrements('id') के लिए शॉर्टहैंड: ऑटो-इंक्रीमेंट BIGINT UNSIGNED प्राथमिक कुंजी।
🎯 Exam Perspective
यह प्रश्न DBMS ("Introduction to DBMS" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।