731 Database Management Systems • Database Concepts and Design एक विभाग में कई कर्मचारी हैं, लेकिन प्रत्येक कर्मचारी केवल एक विभाग में कार्यरत है। Department से Employee का संबंध किस प्रकार का है? A department has several employees, but each employee belongs to only one department. What is the relationship from Department to Employee? A. One-to-One One-to-One B. Many-to-Many Many-to-Many C. Many-to-One Many-to-One D. One-to-Many One-to-Many उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: D Correct Answer: D एक Department रिकॉर्ड कई Employee रिकॉर्डों से जुड़ता है। इसलिए Department से Employee की दिशा में संबंध One-to-Many है। One Department record is associated with multiple Employee records. Therefore, the relationship from Department to Employee is one-to-many.
732 Database Management Systems • Database Concepts and Design Employee टेबल में ऐसा DepartmentID दर्ज करने से रोकना जो Department टेबल में मौजूद नहीं है, किस सिद्धांत का उदाहरण है? Preventing an Employee record from containing a DepartmentID that does not exist in the Department table is an example of enforcing which principle? A. Referential Integrity Referential Integrity B. Data Compression Data Compression C. Data Sorting Data Sorting D. File Fragmentation File Fragmentation उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: A Correct Answer: A Referential Integrity संबंधित टेबलों के संदर्भों की वैधता बनाए रखती है। Foreign Key constraint इस प्रकार के अमान्य संदर्भ को रोक सकती है। Referential integrity maintains valid references between related tables. A foreign key constraint can prevent this type of invalid reference.
733 Database Management Systems • Database Concepts and Design किसी डेटाबेस की टेबलों, फ़ील्डों, डेटा प्रकारों और उनके संबंधों की संरचनात्मक रूपरेखा को सामान्यतः क्या कहते हैं? What is the structural description of a database, including its tables, fields, data types and relationships, generally called? A. Transaction Transaction B. Schema Schema C. Backup Backup D. Record Record उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: B Correct Answer: B Schema डेटाबेस की तार्किक संरचना का वर्णन करता है। किसी समय टेबलों में मौजूद वास्तविक डेटा इस संरचना से अलग अवधारणा है। A schema describes the logical structure of a database. The actual data stored at a particular time is a separate concept.
734 Database Management Systems • SQL Basics SQL में नई टेबल की संरचना बनाने के लिए कौन-सा कमांड प्रयोग किया जाता है? Which SQL command is used to define and create a new table? A. UPDATE UPDATE B. SELECT SELECT C. DELETE DELETE D. CREATE TABLE CREATE TABLE उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: D Correct Answer: D CREATE TABLE नई टेबल बनाता है और उसके कॉलम तथा डेटा प्रकार निर्धारित करता है। यह Data Definition Language का कमांड है। CREATE TABLE creates a new table and specifies its columns and data types. It is a Data Definition Language command.
735 Database Management Systems • SQL Basics SQL में पहले से मौजूद Employee टेबल में नया कॉलम जोड़ने के लिए किस कमांड का उपयोग किया जाता है? Which SQL command is used to add a new column to an existing Employee table? A. ALTER TABLE ALTER TABLE B. ORDER BY ORDER BY C. DELETE DELETE D. COMMIT COMMIT उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: A Correct Answer: A ALTER TABLE मौजूदा टेबल की संरचना बदलता है, जैसे कॉलम जोड़ना। UPDATE मौजूदा पंक्तियों के मान बदलता है, टेबल में नया कॉलम नहीं जोड़ता। ALTER TABLE changes an existing table definition, such as by adding a column. UPDATE changes values in existing rows rather than adding a column.
736 Database Management Systems • SQL Basics SQL में Employee टेबल से केवल EmployeeID = 25 वाली पंक्ति हटाने का सही कथन कौन-सा है? Which SQL statement correctly deletes only the row with EmployeeID = 25 from the Employee table? A. DROP TABLE Employee; DROP TABLE Employee; B. DELETE FROM Employee; DELETE FROM Employee; C. DELETE FROM Employee WHERE EmployeeID = 25; DELETE FROM Employee WHERE EmployeeID = 25; D. ALTER TABLE Employee ADD EmployeeID INT; ALTER TABLE Employee ADD EmployeeID INT; उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: C Correct Answer: C DELETE के साथ WHERE हटाई जाने वाली पंक्ति की शर्त निर्धारित करता है। WHERE के बिना DELETE सभी पंक्तियों को हटाने का प्रयास करेगा। WHERE restricts DELETE to the matching row. Without WHERE, DELETE attempts to remove every row from the table.
737 Database Management Systems • SQL Basics SQL में किसी टेबल को उसके डेटा और संरचना सहित हटाने के लिए कौन-सा कमांड प्रयोग किया जाता है? Which SQL command removes a table together with its data and definition? A. SELECT SELECT B. DROP TABLE DROP TABLE C. UPDATE UPDATE D. GROUP BY GROUP BY उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: B Correct Answer: B DROP TABLE टेबल की संरचना और उसके डेटा को हटाता है। DELETE पंक्तियाँ हटाता है, लेकिन टेबल की संरचना बनाए रखता है। DROP TABLE removes the table definition and its data. DELETE removes rows while retaining the table definition.
738 Database Management Systems • SQL Basics SQL में SELECT DISTINCT City FROM Applicants; का मुख्य उद्देश्य क्या है? What is the main purpose of SELECT DISTINCT City FROM Applicants; in SQL? A. Applicants टेबल से दोहराई गई पंक्तियाँ स्थायी रूप से हटाना Permanently delete duplicate rows from Applicants B. हर शहर का नाम अनिवार्य रूप से वर्णानुक्रम में दिखाना Always display city names in alphabetical order C. केवल पहली पंक्ति का शहर दिखाना Display the city from only the first row D. परिणाम में दोहराव हटाकर अलग-अलग शहर दिखाना Display distinct city values without duplicates in the result उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: D Correct Answer: D DISTINCT परिणाम से दोहराए गए मान हटाता है; मूल टेबल नहीं बदलता। निश्चित क्रम के लिए अलग से ORDER BY चाहिए। DISTINCT eliminates duplicate values from the result without modifying the source table. A guaranteed ordering requires ORDER BY.
739 Database Management Systems • SQL Basics SQL Server में Name LIKE 'R%' शर्त किस प्रकार के नामों से मेल खाती है? In SQL Server, what type of names does the condition Name LIKE 'R%' match? A. R से शुरू होने वाले नाम Names beginning with R B. R पर समाप्त होने वाले नाम Names ending with R C. केवल दो अक्षरों वाले नाम Names containing exactly two characters D. ऐसे नाम जिनमें R कहीं भी न हो Names containing no R anywhere उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: A Correct Answer: A LIKE में % शून्य या अधिक वर्णों को दर्शाता है। इसलिए R% का अर्थ R के बाद कोई भी वर्ण-क्रम है; अक्षर-केस का व्यवहार collation पर निर्भर करता है। In LIKE, % represents zero or more characters. Thus, R% matches R followed by any sequence; case sensitivity depends on the collation.
740 Database Management Systems • SQL Basics SQL में Marks BETWEEN 40 AND 60 शर्त के बारे में कौन-सा कथन सही है? Which statement is correct about the SQL condition Marks BETWEEN 40 AND 60? A. केवल 40 से अधिक और 60 से कम मान शामिल होते हैं। Only values greater than 40 and less than 60 are included. B. 40 शामिल होता है, लेकिन 60 नहीं। 40 is included, but 60 is excluded. C. 40 और 60 सहित बीच के सभी मान शामिल होते हैं। All values from 40 through 60, including both endpoints, are included. D. केवल 40 और 60 शामिल होते हैं। Only 40 and 60 are included. उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: C Correct Answer: C BETWEEN दोनों सीमाओं को शामिल करता है। यह शर्त Marks >= 40 AND Marks <= 60 के बराबर है। BETWEEN includes both boundary values. This condition is equivalent to Marks >= 40 AND Marks <= 60.