























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























































































because data modeling is essential. Option D is false because XML conversion is not the primary purpose.
Rationale: Referential integrity ensures that a foreign key value corresponds to an existing primary key value in the referenced table (or is NULL if allowed). Entity integrity (B) ensures no duplicate primary keys and no NULLs in primary key. Domain integrity (A) restricts data type and allowed values.
AVG(Amount) FROM Transactions WHERE TransactionDate > '2023- 01 - 01'. What does the AVG function return if no rows satisfy the WHERE condition? A) 0 B) NULL C) An error message D) An empty result set with no column CORRECT ANSWER: B (✓) Rationale: Aggregate functions like AVG return NULL when no rows are selected, not zero. This distinguishes between a true average of zero and no data. Option A would be incorrect because zero could be misinterpreted.
Rationale: Weak entities are drawn with double rectangles. Their primary key includes the foreign key from the identifying (strong) entity (e.g., OrderLineItem depends on Order). Option B describes derived attribute? No. Option C and D are incorrect.
MajorID - > MajorDean. So non-key attribute depends on another non-key? MajorDean depends on MajorID, which is not a candidate key. That's transitive violation. D similar. Question asks "which scenario violates 3NF?" Both B and D, but typical exam expects B. I'll pick B. CORRECT ANSWER: B (✓) Rationale: In 3NF, every non-prime attribute must depend directly on the primary key. B has MajorDean dependent on MajorID (non-key), creating transitive dependency through StudentID → MajorID → MajorDean. D also violates but B is classic example.
at most one) instance of A. Example: one Department has many Employees, each Employee works in one Department.*
B) The ability to change the physical storage structures (e.g., indexes, file organization) without altering the logical schema or application programs. C) The ability to access data from multiple databases without authentication. D) The ability to store data in a location-independent manner using cloud storage. CORRECT ANSWER: B (✓) Rationale: Physical data independence means changes to the internal (physical) schema (e.g., using different indexes, partitioning) do not affect the conceptual/logical schema or external views. Option A describes logical data independence.
B) SELECT CustomerID, SUM(TotalAmount) FROM Orders WHERE COUNT(OrderID) > 5 GROUP BY CustomerID; C) SELECT CustomerID, SUM(TotalAmount) FROM Orders GROUP BY CustomerID WHERE COUNT(OrderID) > 5; D) SELECT CustomerID, SUM(TotalAmount) FROM Orders HAVING COUNT(OrderID) > 5; CORRECT ANSWER: A (✓) Rationale: GROUP BY CustomerID groups orders per customer. The HAVING clause filters groups with COUNT(OrderID) > 5. WHERE cannot contain aggregate functions. Option D lacks GROUP BY, causing error or single row result.
C) The table has 5 duplicate email addresses that are ignored by COUNT(Email). D) The second query incorrectly used the Email column which has a different data type. CORRECT ANSWER: B (✓) Rationale: COUNT() counts all rows regardless of NULLs. COUNT(column_name) counts only rows where that column is NOT NULL. Thus, 5 rows have NULL Email. Option C is incorrect because COUNT(Email) does not ignore duplicates unless DISTINCT is used.*