731 Database Management Systems • Database Concepts and Design किसी टेबल में EmployeeID और OfficialEmail दोनों अलग-अलग प्रत्येक रिकॉर्ड की विशिष्ट पहचान कर सकते हैं। EmployeeID को Primary Key चुना गया है। OfficialEmail किस प्रकार की कुंजी का उदाहरण है? EmployeeID and OfficialEmail can each independently identify every record uniquely in a table. If EmployeeID is selected as the primary key, what does OfficialEmail represent? A. Foreign Key Foreign Key B. Composite Key Composite Key C. Alternate Key Alternate Key D. Non-key Attribute Non-key Attribute उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: C Correct Answer: C Primary Key के रूप में न चुनी गई Candidate Key को Alternate Key कहते हैं। यहाँ OfficialEmail भी रिकॉर्ड की विशिष्ट पहचान कर सकता है। A candidate key not selected as the primary key is an alternate key. Here, OfficialEmail can also uniquely identify a record.
732 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.
733 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.
734 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.
735 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.
736 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.
737 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.
738 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.
739 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.
740 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.