Derived Attributes and Stored Attributes (Dashed Ellipse) Notes in Hindi & English : व्युत्पन्न एट्रिब्यूट (Derived Attribute) और स्टोर्ड एट्रिब्यूट में अंतर और 20 महत्वपूर्ण MCQ प्रश्न (Rajasthan IT Exam)

Post a Comment

PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Derived Attributes and Stored Attributes (Dashed Ellipse) (व्युत्पन्न एट्रिब्यूट (Derived Attribute) और स्टोर्ड एट्रिब्यूट में अंतर) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।

Overview: Stored (Base) Attributes persist physically on disk (Solid Ellipse), whereas Derived Attributes (Dashed Ellipse) compute values dynamically from stored attributes or system clocks via SQL Views or Generated Columns to eliminate update redundancy.

अध्याय सार: स्टोर्ड (बेस) एट्रिब्यूट्स डेटाबेस में भौतिक रूप से सहेजे जाते हैं (ठोस अंडाकार), जबकि व्युत्पन्न एट्रिब्यूट्स (Derived Attributes — डैश्ड अंडाकार) का मान आवश्यकता पड़ने पर स्टोर्ड एट्रिब्यूट्स से गणना करके निकाला जाता है।

Derived Attributes and Stored Attributes (Dashed Ellipse): Detailed Notes & Architecture (व्युत्पन्न एट्रिब्यूट (Derived Attribute) और स्टोर्ड एट्रिब्यूट में अंतर)

1. Stored (Base) vs Derived Attributes Concept (स्टोर्ड (बेस) बनाम व्युत्पन्न (Derived) एट्रिब्यूट्स)

[EN] A Stored (Base) Attribute is directly persisted as physical data inside database records—for example, `Date_of_Birth`, `Joining_Date`, `Unit_Price`, and `Quantity`. A Derived Attribute is NOT independently input; instead, its value is mathematically or logically computed from one or more stored attributes (or current system state like `CURRENT_DATE`). Classic examples include `Age` (derived from `DOB` and today's date), `Years_of_Service` (from `Hire_Date`), `Total_Amount` (`Price * Qty`), and `Dept_Headcount` (counting related employees).

[HI] स्टोर्ड (बेस) एट्रिब्यूट वह होता है जिसका वास्तविक मान डिस्क पर डेटाबेस तालिका में भौतिक रूप से सहेजा जाता है (जैसे `Date_of_Birth`, `Price`, `Quantity`)। इसके विपरीत, व्युत्पन्न एट्रिब्यूट (Derived Attribute) का मान सीधे स्टोर करने के बजाय अन्य स्टोर्ड एट्रिब्यूट्स या वर्तमान सिस्टम समय से गणना कर निकाला जाता है—जैसे `DOB` से `Age`, `Hire_Date` से `Experience`, या `Price × Qty` से `Total_Amount`।

2. ER Diagram Notation: Solid vs Dashed Ellipse (ER आरेख में प्रदर्शन: ठोस बनाम डैश्ड अंडाकार)

[EN] In Peter Chen's ER diagramming standard, Stored Attributes are drawn with a standard continuous solid-line Ellipse, whereas Derived Attributes are distinctly drawn using a Dashed (Dotted) Ellipse. Visually distinguishing derived fields warns database architects not to naively allocate redundant physical columns for computable values when converting the ER diagram into normalized SQL tables.

[HI] पीटर चेन के ER आरेख में स्टोर्ड एट्रिब्यूट्स को सामान्य ठोस (Solid) सीमा वाले अंडाकार से दर्शाया जाता है, जबकि व्युत्पन्न एट्रिब्यूट्स को टूटी हुई रेखा वाले अंडाकार (Dashed/Dotted Ellipse) से दिखाया जाता है। यह प्रतीक डेटाबेस डिज़ाइनर को संकेत देता है कि इस मान को मूल तालिका में अलग से स्टोर करने की आवश्यकता नहीं है।

3. Why Derived Attributes Are Omitted from Base Tables & SQL Implementations (मूल तालिकाओं में इन्हें न सहेजने का कारण और SQL विकल्प)

[EN] Storing `Age` physically alongside `DOB` introduces severe redundancy and guaranteed staleness: every year on a person's birthday, stored `Age` becomes factually wrong unless batch-updated daily. Therefore, relational mapping normally omits derived attributes from base tables and computes them dynamically inside SQL `SELECT` queries, reusable `CREATE VIEW` definitions, or modern SQL `GENERATED ALWAYS AS (...) VIRTUAL` columns.

[HI] यदि किसी तालिका में `DOB` के साथ `Age` को भी भौतिक रूप से सहेजा जाए, तो हर वर्ष जन्मदिन पर पुराना डेटा गलत हो जाएगा और अनावश्यक अपडेट चलाना पड़ेगा। इसी अनियंत्रित दोहराव व असंगतता से बचने के लिए रिलेशनल मैपिंग में व्युत्पन्न एट्रिब्यूट्स को मूल तालिका से हटाकर SQL `VIEW` या `GENERATED ALWAYS AS ... VIRTUAL` कॉलम के रूप में लागू किया जाता है।

4. Storage vs Compute Trade-Off & Materialized Caching (स्टोरेज बनाम गणना संतुलन और मटेरियलाइज़्ड कैशिंग)

[EN] Computing derived values dynamically saves disk space and ensures 100% real-time accuracy, at the slight cost of CPU arithmetic at read time. However, for heavy analytical aggregates across millions of rows (such as `Account_Balance` or `Total_Order_Sales`), systems occasionally cache a materialized stored copy updated atomically via `GENERATED ... STORED`, `TRIGGER`s, or `REFRESH MATERIALIZED VIEW` to accelerate high-traffic dashboards.

[HI] रनटाइम पर गणना करने से डिस्क स्पेस बचता है और डेटा हमेशा 100% सटीक रहता है। हालांकि यदि लाखों पंक्तियों का योग (जैसे कुल बिक्री या खाता शेष) बार-बार पढ़ना हो, तो तेज़ प्रदर्शन के लिए कभी-कभी `MATERIALIZED VIEW`, `TRIGGER` या `GENERATED ... STORED` कॉलम द्वारा गणना को कैश भी किया जाता है।

Syntax, Formula & Technical Example (Derived Attributes and Stored Attributes (Dashed Ellipse))

-- ER Derived Attribute (Dashed Ellipse) Mapped to SQL View & Virtual Column
CREATE TABLE Employee (
    Emp_ID    INT PRIMARY KEY,
    Name      VARCHAR(60),
    DOB       DATE NOT NULL,        -- Stored Attribute (Solid Ellipse)
    Base_Pay  DECIMAL(10,2),
    Bonus     DECIMAL(10,2),
    Gross_Pay DECIMAL(10,2) GENERATED ALWAYS AS (Base_Pay + Bonus) VIRTUAL -- Derived
);
CREATE VIEW Employee_Age_View AS
  SELECT Emp_ID, Name, DOB, TIMESTAMPDIFF(YEAR, DOB, CURDATE()) AS Age FROM Employee;

Derived Attributes and Stored Attributes (Dashed Ellipse) Quick Reference & Comparison Table

Attribute / Implementation TypePersistence & ER Diagram SymbolConsistency & Performance Note
Stored (Base) AttributeSolid Ellipse; persisted physically inside table disk pagesAuthoritative source; updated explicitly by DML writes
Derived AttributeDashed (Dotted) Ellipse; computed on demand from base dataOmitted from base 3NF tables to prevent stale redundancy
SQL View / Virtual ColumnLogical query formula or GENERATED ... VIRTUAL definitionZero extra storage; always up-to-date with current clock/rows
Materialized / Trigger CachePrecomputed aggregate stored physically via Trigger/MVBoosts heavy read throughput; adds write/refresh overhead

Derived Attributes and Stored Attributes (Dashed Ellipse) Top 20 Bilingual MCQs with Answers

Q1. In Peter Chen's ER notation, which symbol specifically identifies a Derived Attribute?

(पीटर चेन के ER आरेख में व्युत्पन्न एट्रिब्यूट (Derived Attribute) को किस प्रतीक से दर्शाया जाता है?)

(A) Solid Underlined Ellipse

(B) Double Rectangle

(C) Double Ellipse

(D) Dashed (Dotted) Ellipse

Correct Answer: (D)

[EN] A Dashed Ellipse distinguishes computable attributes like `Age` from persisted Stored Attributes (Solid Ellipse).

[HI] डैश्ड या डॉटेड अंडाकार (Dashed Ellipse) का उपयोग व्युत्पन्न एट्रिब्यूट दर्शाने के लिए किया जाता है।

Q2. Between `Date_of_Birth` and `Age` for a `Student` entity, which is the Stored Attribute and which is the Derived Attribute?

(`Student` एंटिटी के लिए `Date_of_Birth` और `Age` में से कौन सा स्टोर्ड एट्रिब्यूट है और कौन सा व्युत्पन्न एट्रिब्यूट?)

(A) `Age` is Stored; `Date_of_Birth` is Derived

(B) Both are Multi-Valued Keys

(C) `Date_of_Birth` is Stored; `Age` is Derived

(D) Both are Derived Attributes

Correct Answer: (C)

[EN] `Date_of_Birth` never changes and is physically saved; `Age` increments continuously over time and is derived from `CURRENT_DATE - DOB`.

[HI] `Date_of_Birth` एक स्थायी मान है जिसे डेटाबेस में स्टोर किया जाता है, जबकि `Age` को वर्तमान तिथि और DOB से गणना कर निकाला जाता है।

Q3. Why should a Derived Attribute like `Age` generally NOT be stored as an ordinary physical column alongside `Date_of_Birth`?

(`Date_of_Birth` के साथ `Age` को एक सामान्य भौतिक कॉलम के रूप में स्टोर क्यों नहीं करना चाहिए?)

(A) Because `Age` is always a Multi-Valued attribute

(B) Because SQL databases cannot store integer ages

(C) It creates redundant data that rapidly becomes stale and inaccurate as time advances

(D) Because storing `Age` disables Primary Keys

Correct Answer: (C)

[EN] Storing a time-dependent computed value without automatic recalculation violates normalization principles and guarantees stale birthdays.

[HI] समय के साथ `Age` बदलती रहती है; इसे भौतिक रूप से स्टोर करने पर दोहराव बढ़ता है और कुछ समय बाद मान पुराना व गलत हो जाता है।

Q4. Which SQL feature is the standard relational way to expose Derived Attributes cleanly without duplicating physical storage?

(भौतिक स्टोरेज को दोहराए बिना व्युत्पन्न एट्रिब्यूट्स को उपलब्ध कराने का मानक SQL तरीका कौन सा है?)

(A) Disabling `FOREIGN KEY` checks

(B) Duplicating the table across two separate databases

(C) Creating a SQL `VIEW` (or `GENERATED ALWAYS AS ... VIRTUAL` column)

(D) Creating a `DOUBLE DIAMOND` constraint

Correct Answer: (C)

[EN] A `VIEW` computes the derived expression freshly whenever queried, consuming zero row storage while keeping applications clean.

[HI] SQL `VIEW` या `GENERATED ... VIRTUAL` कॉलम बिना अतिरिक्त डिस्क स्थान घेरे हर क्वेरी पर सटीक गणना करके परिणाम दिखाते हैं।

Q5. In an ER diagram for `DEPARTMENT`, the attribute `Number_of_Employees` is computed by counting linked `EMPLOYEE` entities. What kind of attribute is it?

(`DEPARTMENT` एंटिटी का एट्रिब्यूट `Number_of_Employees`, जो संबंधित कर्मचारियों की गिनती से प्राप्त होता है, किस प्रकार का एट्रिब्यूट है?)

(A) Weak Discriminator

(B) Simple Stored Key Attribute

(C) Composite Multi-Valued Attribute

(D) Derived Attribute (computed across a relationship)

Correct Answer: (D)

[EN] Derived attributes can depend not only on other attributes of the same entity (`Price * Qty`), but also on aggregates across related entity sets (`COUNT(*)`).

[HI] व्युत्पन्न एट्रिब्यूट किसी संबंध से जुड़े रिकॉर्डों की गिनती या योग (`COUNT(*)`) करके भी निकाले जा सकते हैं।

Q6. Can a Stored Attribute EVER be a Composite Attribute at the same time?

(क्या कोई स्टोर्ड एट्रिब्यूट एक साथ कम्पोजिट एट्रिब्यूट भी हो सकता है?)

(A) Yes — e.g., `Address` (or its leaf parts `Street`, `City`, `Pin`) is physically stored rather than derived

(B) Only inside Hierarchical IMS databases

(C) No — all Composite Attributes are strictly Derived

(D) No — Stored Attributes can only be numeric integers

Correct Answer: (A)

[EN] Stored vs Derived asks 'is it persisted or calculated?', whereas Simple vs Composite asks 'is it atomic or divisible?'—these are independent axes.

[HI] हाँ, 'स्टोर्ड बनाम डिराइव्ड' और 'सिंपल बनाम कम्पोजिट' अलग-अलग श्रेणियाँ हैं; पते के उप-भाग डेटाबेस में भौतिक रूप से स्टोर किए जाते हैं।

Q7. Suppose an e-commerce `Order_Item` table stores `Unit_Price` and `Quantity`. How should `Line_Total` (`Unit_Price * Quantity`) normally be modeled in ER diagrams?

(किसी ई-कॉमर्स तालिका `Order_Item` में `Unit_Price` और `Quantity` संग्रहीत हैं। ER आरेख में `Line_Total` को कैसे दर्शाया जाना चाहिए?)

(A) As an Identifying Weak Entity

(B) As a Primary Key with solid underline

(C) As a Multi-Valued Double Ellipse

(D) As a Derived Attribute using a Dashed Ellipse

Correct Answer: (D)

[EN] Because `Line_Total` is strictly a deterministic product of two stored columns (`Unit_Price * Quantity`), it is a Derived Attribute.

[HI] `Line_Total` सीधे `Unit_Price × Quantity` से निकलता है, इसलिए यह एक व्युत्पन्न एट्रिब्यूट है जिसे डैश्ड अंडाकार से दर्शाया जाता है।

Q8. What happens if a database mistakenly stores both `SubTotal` and `Tax` and `GrandTotal` as independent mutable columns without triggers or constraints?

(यदि डेटाबेस बिना किसी ट्रिगर के `SubTotal`, `Tax` और `GrandTotal` तीनों को स्वतंत्र बदलने योग्य कॉलमों में स्टोर कर दे, तो क्या खतरा होता है?)

(A) An application updating `Tax` without updating `GrandTotal` introduces arithmetic data inconsistency

(B) The database automatically drops the `SubTotal` column

(C) Disk space automatically shrinks by 50%

(D) Indexes switch from B+ tree to Linear arrays

Correct Answer: (A)

[EN] Whenever derived values are stored redundantly without strict automated triggers/generated formulas, partial updates corrupt totals.

[HI] यदि केवल `Tax` अपडेट हो और `GrandTotal` अपडेट करना छूट जाए, तो डेटा में गणितीय असंगतता (Inconsistency) उत्पन्न हो जाती है।

Q9. When might an architect deliberately store a Derived Attribute (such as `Account_Balance` or `Total_Inventory`) using Triggers or Materialized Views?

(कब एक डेटाबेस आर्किटेक्ट जानबूझकर `Account_Balance` जैसे व्युत्पन्न एट्रिब्यूट को ट्रिगर या मटेरियलाइज़्ड व्यू द्वारा स्टोर करने का निर्णय ले सकता है?)

(A) Because Dashed Ellipses cannot be rendered on laser printers

(B) When the entity has fewer than 5 rows total

(C) When recalculating aggregates dynamically across millions of historical ledger rows on every read would cause unacceptable latency

(D) When the database lacks a primary key

Correct Answer: (C)

[EN] Caching heavy aggregations trades extra write-time maintenance (triggers/refreshes) for near-instant read performance.

[HI] जब हर बार लाखों पुराने लेनदेन जोड़ने में बहुत अधिक समय लग रहा हो, तो पढ़ने की गति तेज करने के लिए ट्रिगर या मटेरियलाइज़्ड व्यू से योग को कैश किया जाता है।

Q10. In SQL standard (`GENERATED ALWAYS AS (expr) VIRTUAL` vs `STORED`), what is the key difference between `VIRTUAL` and `STORED` generated columns?

(SQL में `GENERATED ALWAYS AS (expr) VIRTUAL` और `STORED` कॉलमों के बीच मुख्य अंतर क्या है?)

(A) `VIRTUAL` cannot use arithmetic operators

(B) `VIRTUAL` deletes rows after every `SELECT`

(C) `STORED` allows manual `INSERT` overrides bypassing the formula

(D) `VIRTUAL` computes values on the fly occupying no row storage, while `STORED` persists the computed result on disk and updates automatically on row writes

Correct Answer: (D)

[EN] Both prevent inconsistency because users cannot manually overwrite the formula, differing strictly in storage vs runtime compute.

[HI] `VIRTUAL` डिस्क स्पेस नहीं लेता और पढ़ते समय गणना करता है, जबकि `STORED` मान को डिस्क पर सहेजता है और पंक्ति बदलते ही स्वतः अपडेट हो जाता है।

Q11. Which attribute in an `EMPLOYEE` entity (`Emp_ID`, `Name`, `Hire_Date`, `Tenure_Years`, `Salary`) is the Derived Attribute?

(`EMPLOYEE` एंटिटी (`Emp_ID`, `Name`, `Hire_Date`, `Tenure_Years`, `Salary`) में से कौन सा व्युत्पन्न एट्रिब्यूट है?)

(A) `Hire_Date`

(B) `Salary`

(C) `Emp_ID`

(D) `Tenure_Years` (computed from `Hire_Date` and current date)

Correct Answer: (D)

[EN] `Hire_Date` is the stored historical fact; `Tenure_Years` is derived dynamically from `Hire_Date`.

[HI] `Hire_Date` एक स्टोर्ड तथ्य है और उससे निकाला जाने वाला कार्यकाल `Tenure_Years` एक व्युत्पन्न एट्रिब्यूट है।

Q12. Which property characterizes a Stored Attribute?

(निम्नलिखित में से कौन सा गुण एक स्टोर्ड एट्रिब्यूट (Stored Attribute) की पहचान है?)

(A) It is always enclosed in a Dashed Ellipse

(B) It changes automatically every second without DML writes

(C) It is always discarded during SQL table creation

(D) Its value cannot be derived from other columns and must be explicitly entered and saved in the database

Correct Answer: (D)

[EN] Base attributes hold primary input facts (`DOB`, `Hire_Date`, `Base_Pay`) from which derived values originate.

[HI] स्टोर्ड एट्रिब्यूट का मान किसी अन्य कॉलम से नहीं निकाला जा सकता, बल्कि इसे सीधे उपयोगकर्ता द्वारा डेटाबेस में दर्ज व सहेजा जाता है।

Q13. How does omitting Derived Attributes from base tables support Database Normalization (specifically 2NF/3NF principles)?

(मूल तालिकाओं से व्युत्पन्न एट्रिब्यूट्स को हटाना डेटाबेस नॉर्मलाइज़ेशन (2NF/3NF) के सिद्धांतों का समर्थन कैसे करता है?)

(A) It increases duplicate disk storage intentionally

(B) It removes all primary keys from the schema

(C) It removes transitive/computational redundancy where non-key columns depend functionally on other non-key columns

(D) It merges all entities into one giant flat file

Correct Answer: (C)

[EN] If `Area` depends directly on `(Length, Width)`, storing `Area` introduces a functional dependency among non-key attributes, creating update anomalies.

[HI] यदि गैर-कुंजी कॉलम किसी अन्य गैर-कुंजी कॉलम से निकाले जा सकते हैं, तो उन्हें अलग से स्टोर न करने से अपडेट विसंगतियाँ और दोहराव समाप्त होते हैं।

Q14. Does a Derived Attribute typically become a column when converting an ER diagram directly to a minimal normalized Relational Schema?

(ER आरेख को न्यूनतम नॉर्मलाइज़्ड रिलेशनल स्कीमा में बदलते समय क्या व्युत्पन्न एट्रिब्यूट सामान्यतः बेस तालिका का कॉलम बनता है?)

(A) Yes — it always becomes the table's Primary Key

(B) Yes — it becomes a Double Diamond table

(C) No — it deletes the entire entity set

(D) No — it is omitted from the base table schema and documented instead as a View or query calculation

Correct Answer: (D)

[EN] Standard ER-to-Relational mapping rules explicitly drop Dashed-Ellipse attributes from physical base tables unless performance caching justifies materialization.

[HI] नहीं, सामान्य ER-से-रिलेशनल मैपिंग में डैश्ड अंडाकार वाले एट्रिब्यूट्स को मूल तालिका में नहीं रखा जाता बल्कि View/क्वेरी के रूप में लागू किया जाता है।

Q15. Can a Derived Attribute also be Multi-Valued in rare conceptual models?

(क्या कोई व्युत्पन्न एट्रिब्यूट विशेष मामलों में मल्टी-वैल्यूड भी हो सकता है?)

(A) Only in Hierarchical trees

(B) No — SQL prohibits computing more than 1 row

(C) No — derived values can only be single floating-point numbers

(D) Yes — e.g., `Upcoming_Due_Dates` derived dynamically from a `Loan` start date and term schedule (drawn as a dashed double ellipse)

Correct Answer: (D)

[EN] Although uncommon, a computed set (like generated installment schedule dates or overdue invoice IDs) is conceptually both derived and multi-valued.

[HI] हाँ, उदाहरण के लिए किसी ऋण की प्रारंभ तिथि व अवधि से निकाली जाने वाली सभी आगामी किस्त तिथियों का सेट दोनों गुण रख सकता है।

Q16. Which of the following statements about Stored and Derived Attributes is FALSE?

(स्टोर्ड और व्युत्पन्न एट्रिब्यूट्स के बारे में निम्नलिखित में से कौन सा कथन असत्य (FALSE) है?)

(A) Stored Attributes provide the base data from which Derived Attributes are calculated

(B) In Peter Chen's notation, Derived Attributes are drawn using a Dashed Ellipse

(C) Computing Derived Attributes via SQL Views avoids update inconsistency

(D) Derived Attributes are always represented by a solid-border Double Rectangle in ER diagrams

Correct Answer: (D)

[EN] A Double Rectangle represents a Weak Entity Set—NEVER a Derived Attribute (which uses a Dashed Ellipse).

[HI] डबल आयत (Double Rectangle) हमेशा कमजोर एंटिटी सेट को दर्शाता है; व्युत्पन्न एट्रिब्यूट को हमेशा डैश्ड अंडाकार से दर्शाया जाता है।

Q17. Within Derived Attributes and Stored Attributes (Dashed Ellipse), which attribute / implementation type directly maps to: "Solid Ellipse; persisted physically inside table disk pages"?

(Derived Attributes and Stored Attributes (Dashed Ellipse) में कौन सा Attribute / Implementation Type सीधे "Solid Ellipse; persisted physically inside table disk pages" से संबंधित है?)

(A) Derived Attribute

(B) SQL View / Virtual Column

(C) Stored (Base) Attribute

(D) Materialized / Trigger Cache

Correct Answer: (C)

[EN] In Derived Attributes and Stored Attributes (Dashed Ellipse), 'Stored (Base) Attribute' handles 'Solid Ellipse; persisted physically inside table disk pages' (Authoritative source; updated explicitly by DML writes).

[HI] Derived Attributes and Stored Attributes (Dashed Ellipse) में 'Stored (Base) Attribute' का कार्य/विवरण 'Solid Ellipse; persisted physically inside table disk pages' (Authoritative source; updated explicitly by DML writes) है।

Q18. Which option accurately describes 'Derived Attribute' in Derived Attributes and Stored Attributes (Dashed Ellipse)?

(Derived Attributes and Stored Attributes (Dashed Ellipse) के संदर्भ में 'Derived Attribute' की सही विशेषता कौन सी है?)

(A) Precomputed aggregate stored physically via Trigger/MV

(B) Dashed (Dotted) Ellipse; computed on demand from base data

(C) Solid Ellipse; persisted physically inside table disk pages

(D) Logical query formula or GENERATED ... VIRTUAL definition

Correct Answer: (B)

[EN] 'Derived Attribute' provides 'Dashed (Dotted) Ellipse; computed on demand from base data' — key point: Omitted from base 3NF tables to prevent stale redundancy.

[HI] 'Derived Attribute' का मुख्य विवरण 'Dashed (Dotted) Ellipse; computed on demand from base data' है (Omitted from base 3NF tables to prevent stale redundancy)।

Q19. In Derived Attributes and Stored Attributes (Dashed Ellipse), identify the correct parameter for the specification: "Logical query formula or GENERATED ... VIRTUAL definition".

(Derived Attributes and Stored Attributes (Dashed Ellipse) में "Logical query formula or GENERATED ... VIRTUAL definition" विवरण किस विकल्प के लिए सही है?)

(A) Derived Attribute

(B) SQL View / Virtual Column

(C) Stored (Base) Attribute

(D) Materialized / Trigger Cache

Correct Answer: (B)

[EN] 'SQL View / Virtual Column' corresponds to 'Logical query formula or GENERATED ... VIRTUAL definition' (Zero extra storage; always up-to-date with current clock/rows).

[HI] 'SQL View / Virtual Column' का संबंध 'Logical query formula or GENERATED ... VIRTUAL definition' (Zero extra storage; always up-to-date with current clock/rows) से है।

Q20. Considering Derived Attributes and Stored Attributes (Dashed Ellipse), what key behavior defines 'Materialized / Trigger Cache'?

(Derived Attributes and Stored Attributes (Dashed Ellipse) में 'Materialized / Trigger Cache' की मुख्य भूमिका या मान क्या है?)

(A) Solid Ellipse; persisted physically inside table disk pages

(B) Precomputed aggregate stored physically via Trigger/MV

(C) Dashed (Dotted) Ellipse; computed on demand from base data

(D) Logical query formula or GENERATED ... VIRTUAL definition

Correct Answer: (B)

[EN] 'Materialized / Trigger Cache' represents 'Precomputed aggregate stored physically via Trigger/MV' (Boosts heavy read throughput; adds write/refresh overhead).

[HI] 'Materialized / Trigger Cache' का अर्थ/मान 'Precomputed aggregate stored physically via Trigger/MV' है (Boosts heavy read throughput; adds write/refresh overhead)।

Derived Attributes and Stored Attributes (Dashed Ellipse) — Exam FAQs

Q1: Why do we still draw Derived Attributes in ER diagrams if we don't store them in tables?

जब हम व्युत्पन्न एट्रिब्यूट्स को तालिका में स्टोर ही नहीं करते, तो उन्हें ER आरेख में क्यों बनाते हैं?

[EN] Drawing them with a Dashed Ellipse documents important business metrics required by end users (like `Age` or `GPA`) so developers know to expose them via Views or API calculations while reminding DBAs not to duplicate them physically.

[HI] डैश्ड अंडाकार से उन्हें दिखाने का उद्देश्य यह दस्तावेज़ करना है कि व्यवसाय या रिपोर्ट को उस गणना (जैसे `Age` या `GPA`) की आवश्यकता है, ताकि डेवलपर उसे View/क्वेरी से निकाल सकें।

Q2: What is the difference between a Derived Attribute and a Stored Attribute?

व्युत्पन्न एट्रिब्यूट (Derived) और स्टोर्ड एट्रिब्यूट (Stored) में क्या अंतर है?

[EN] A Stored Attribute holds raw persisted data saved directly on disk (e.g., `DOB`), whereas a Derived Attribute computes its value dynamically from stored attributes or system functions (e.g., `Age` from `DOB`).

[HI] स्टोर्ड एट्रिब्यूट में वास्तविक डेटा डिस्क पर सहेजा जाता है (जैसे जन्मतिथि), जबकि व्युत्पन्न एट्रिब्यूट में मान की गणना स्टोर्ड डेटा से की जाती है (जैसे आयु)।

Q3: Are Virtual Generated Columns better than Views for Derived Attributes?

क्या व्युत्पन्न एट्रिब्यूट्स के लिए `VIEW` की तुलना में वर्चुअल जेनरेटेड कॉलम बेहतर हैं?

[EN] For row-level derivations inside one table (like `Gross_Pay = Base + Bonus`), Virtual Generated Columns are ideal because they stay directly inside the table definition and can even be indexed; for multi-table aggregations (`SUM`/`COUNT`), Views are required.

[HI] एक ही पंक्ति की सरल गणना के लिए वर्चुअल कॉलम बहुत अच्छे हैं (इन पर इंडेक्स भी बन सकता है), लेकिन कई तालिकाओं या `SUM`/`COUNT` जैसी गणनाओं के लिए SQL `VIEW` आवश्यक होता है।

Related Posts

  • Loading related posts...

Post a Comment

Search Topic Notes & 20 MCQs (Hindi / English)