Computer AwarenessHardIBPS SO IT Officer
ORDERS.CustomerID is a foreign key to CUSTOMER, declared with ON DELETE CASCADE. What happens when a customer row is deleted?
- A. The delete is refused while any order for that customer exists
- B. The customer's orders are deleted automatically along with it
- C. The CustomerID in that customer's orders is set to NULL
- D. The orders are kept unchanged and point to a missing customer
Correct answer: B. The customer's orders are deleted automatically along with it
CASCADE propagates the delete to the referencing rows. Refusing the delete is the default (RESTRICT/NO ACTION) and setting NULL is ON DELETE SET NULL.
हिंदी में
ORDERS.CustomerID, CUSTOMER की फ़ॉरेन की है, जो ON DELETE CASCADE के साथ घोषित है। ग्राहक की पंक्ति हटाने पर क्या होता है?
- A. उस ग्राहक का कोई भी ऑर्डर रहने तक हटाना अस्वीकार कर दिया जाता है
- B. ग्राहक के ऑर्डर उसके साथ अपने आप हट जाते हैं
- C. उस ग्राहक के ऑर्डरों में CustomerID NULL कर दिया जाता है
- D. ऑर्डर अपरिवर्तित रहते हैं और अनुपस्थित ग्राहक की ओर संकेत करते हैं
उत्तर: B. CASCADE हटाने को संदर्भित पंक्तियों तक फैलाता है। हटाने को अस्वीकार करना डिफ़ॉल्ट (RESTRICT/NO ACTION) है और NULL करना ON DELETE SET NULL है।
More Computer Awareness questions
- In ENROLMENT(StudentID, CourseID, Grade), a student takes many courses and a course has many students, but a student takes a course only…
- Which pairing of computer generation and its key technology is WRONG?
- ENIAC, completed in 1945 to compute artillery firing tables, was built with which technology and which number system?
- The 'stored-program' concept, in which a computer's instructions are kept in the same memory as its data, is chiefly associated with:
- Herman Hollerith's punched-card tabulating machine, whose company later grew into IBM, was first used on a large scale for:
- Which early mechanical calculator could multiply, by repeated addition using a stepped drum, and not just add and subtract?