346 Question 346 EN + हिं Medium GB Question::all() returns IN प्रश्न::सभी() रिटर्न A First record only केवल पहला रिकॉर्ड B Collection of all Question model instances सभी प्रश्न मॉडल उदाहरणों का संग्रह C Count of questions प्रश्नों की संख्या D 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 जरूर पढ़ें। 🔗 Related Questions Soft delete uses php artisan migrate:fresh DB::table('questions')->get() returns 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
347 Question 347 EN + हिं Medium GB Question::find(1) returns IN प्रश्न::(1) रिटर्न खोजें A All questions सभी प्रश्न B Question with PK=1 or NULL if not found यदि नहीं मिला तो PK=1 या NULL वाला प्रश्न C Questions where id>1 प्रश्न जहां आईडी>1 D 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 जरूर पढ़ें। 🔗 Related Questions findOrFail($id) when ID not found php artisan migrate:fresh belongsToMany() is used for 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
348 Question 348 EN + हिं Medium GB findOrFail($id) when ID not found IN जब आईडी नहीं मिली तो findOrFair($id)। A Returns NULL शून्य लौटाता है B Returns empty collection खाली संग्रह लौटाता है C Throws ModelNotFoundException मॉडलनॉटफाउंडएक्सेप्शन फेंकता है D 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 दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions Question::all() returns belongsToMany() is used for withTrashed() includes 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
349 Question 349 EN + हिं Medium GB Eager loading with('posts') prevents IN ('पोस्ट') के साथ उत्सुकतापूर्वक लोड करने से रोकता है A Slow queries धीमी क्वेरी B N+1 query problem by loading related models in 2 queries instead of N+1 N+1 के बजाय 2 क्वेरी में संबंधित मॉडल लोड करके N+1 क्वेरी समस्या C Table locking टेबल लॉक करना D 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 न हो। 🔗 Related Questions Question::all() returns Eloquent create() requires belongsToMany() is used for 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
350 Question 350 EN + हिं Medium GB Eloquent create() requires IN सुवक्ता सृजन() की आवश्यकता है A No setup कोई सेटअप नहीं B $fillable array set on model (mass assignment protection) मॉडल पर $भरने योग्य सरणी सेट (मास असाइनमेंट सुरक्षा) C $guarded only केवल $रक्षित D 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 समझें। 🔗 Related Questions DB::table('questions')->get() returns Schema::create() in migration chunk(100, callback) in Eloquent 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
351 Question 351 EN + हिं Medium GB $question->save() performs IN $question->save() निष्पादित करता है A SELECT query क्वेरी चुनें B DELETE query क्वेरी हटाएँ C INSERT for new model or UPDATE for existing model नए मॉडल के लिए सम्मिलित करें या मौजूदा मॉडल के लिए अद्यतन करें D 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 जरूर पढ़ें। 🔗 Related Questions php artisan migrate:fresh Soft delete uses chunk(100, callback) in Eloquent 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
352 Question 352 EN + हिं Medium GB Soft delete uses IN सॉफ्ट डिलीट उपयोग A Boolean is_deleted column only बूलियन केवल कॉलम हटा दिया गया है B deleted_at TIMESTAMP column (NULL=active, timestamp=deleted) TIMESTAMP कॉलम पर हटा दिया गया (शून्य=सक्रिय, टाइमस्टैम्प=हटाया गया) C Physically deletes and archives भौतिक रूप से हटाता है और संग्रहीत करता है D 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 जरूर पढ़ें। 🔗 Related Questions Eloquent create() requires Question::find(1) returns DB::table('questions')->get() returns 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
353 Question 353 EN + हिं Medium GB withTrashed() includes IN withTrashed() शामिल है A Only soft-deleted records केवल सॉफ्ट-डिलीट किए गए रिकॉर्ड B All records including soft-deleted ones सॉफ़्ट-डिलीट सहित सभी रिकॉर्ड C Only active records केवल सक्रिय रिकॉर्ड D 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 जरूर पढ़ें। 🔗 Related Questions belongsToMany() is used for chunk(100, callback) in Eloquent Eloquent create() requires 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
354 Question 354 EN + हिं Medium GB belongsToMany() is used for IN संबंधितToMany() का उपयोग किसके लिए किया जाता है? A One-to-one एक से एक B One-to-many कई लोगों के लिए एक C Many-to-many relationship requiring pivot table अनेक-से-अनेक संबंध के लिए पिवट तालिका की आवश्यकता होती है D 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 दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions Eloquent create() requires DB::table('questions')->get() returns Schema::create() in migration 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
355 Question 355 EN + हिं Medium GB chunk(100, callback) in Eloquent IN सुवक्ता में खंड(100, कॉलबैक)। A Paginates results परिणाम पृष्ठांकित करता है B Processes records 100 at a time preventing memory exhaustion मेमोरी थकावट को रोकने के लिए प्रक्रियाएं एक समय में 100 रिकॉर्ड करती हैं C Sorts records अभिलेखों को क्रमबद्ध करता है D 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 न हो। 🔗 Related Questions DB::table('questions')->get() returns Eloquent create() requires Eager loading with('posts') prevents 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
356 Question 356 EN + हिं Medium GB DB::table('questions')->get() returns IN DB::table('questions')->get() रिटर्न A Eloquent models वाक्पटु मॉडल B Plain PHP stdClass objects (not Eloquent model instances) सादा PHP stdClass ऑब्जेक्ट (एलोक्वेंट मॉडल उदाहरण नहीं) C Array of arrays सरणियों की श्रृंखला D 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 समझें। 🔗 Related Questions chunk(100, callback) in Eloquent Schema::create() in migration belongsToMany() is used for 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
357 Question 357 EN + हिं Medium GB DB::table('questions')->where('is_deleted',0)->count() returns IN DB::table('questions')->where('is_deleted',0)->count() रिटर्न A All questions सभी प्रश्न B SQL DELETE count एसक्यूएल डिलीट गिनती C Integer count of non-deleted questions न हटाए गए प्रश्नों की पूर्णांक संख्या D 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 जरूर पढ़ें। 🔗 Related Questions Schema::create() in migration php artisan migrate:fresh Eloquent create() requires 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
358 Question 358 EN + हिं Medium GB php artisan migrate:fresh IN php कारीगर माइग्रेट: ताज़ा A Runs pending migrations लंबित माइग्रेशन चलाता है B Rolls back last batch अंतिम बैच वापस रोल करता है C Drops ALL tables then re-runs all migrations सभी तालिकाओं को हटाता है और फिर सभी माइग्रेशन को फिर से चलाता है D 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 जरूर पढ़ें। 🔗 Related Questions Soft delete uses Eloquent create() requires Question::all() returns 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
359 Question 359 EN + हिं Medium GB Schema::create() in migration IN माइग्रेशन में Schema::create() A Drops a table एक टेबल गिरा देता है B Creates a new database table एक नई डेटाबेस टेबल बनाता है C Modifies existing table मौजूदा तालिका को संशोधित करता है D 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 जरूर पढ़ें। 🔗 Related Questions withTrashed() includes Question::find(1) returns php artisan migrate:fresh 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)
360 Question 360 EN + हिं Medium GB $table->id() creates IN $table->id() बनाता है A UUID column यूयूआईडी कॉलम B AUTO_INCREMENT UNSIGNED BIGINT primary key column named id AUTO_INCREMENT अहस्ताक्षरित BIGINT प्राथमिक कुंजी कॉलम जिसका नाम आईडी है C Non-primary integer गैर-प्राथमिक पूर्णांक D 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 दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions DB::table('questions')->get() returns DB::table('questions')->where('is_deleted',0)->count()... Question::all() returns 📚 Related Topic Database Architecture (135) Data Models (138) ER Model (138)