Docsity

DATABASE SYSTEMS A PRACTICAL APPROACH TO DESIGN, IMPLEMENTATION, AND MANAGEMENT SIXTH E, Exams of Nursing

Partial preview of the text

Download DATABASE SYSTEMS A PRACTICAL APPROACH TO DESIGN, IMPLEMENTATION, AND MANAGEMENT SIXTH E and more Exams Nursing in PDF only on Docsity!

DATABASE SYSTEMS

A PRACTICAL APPROACH TO DESIGN,

IMPLEMENTATION, AND MANAGEMENT

SIXTH EDITION

COMPREHENSIVE 100-QUESTION

PRACTICE EXAMINATION

Thomas M. Connolly and Carolyn E. Begg

University-level database systems preparation

SQL • Relational modeling • Normalization • Administration • Analytics

Examination Overview This original practice examination is designed around the subject areas and chapter coverage specified in the supplied brief for Database Systems: A Practical Approach to Design, Implementation, and Management, Sixth Edition. It is not an official Pearson or university examination and does not reproduce textbook questions. Instructions: Select the single best answer for each question. Each item has four options. The correct answer and an explanatory rationale—including why the alternatives do not fit—appear immediately after the question for study use. Coverage and Question Distribution Section Questions Chapters PART I: BACKGROUND 1 – 8 (8) Chapters 1– 3 PART II: THE RELATIONAL MODEL AND LANGUAGES^9 – 35 (27)^ Chapters 4–^9 PART III: DATABASE ANALYSIS AND DESIGN^36 – 59 (24)^ Chapters 10–^15 PART IV: DATABASE DESIGN METHODOLOGY 60 – 71 (12) Chapters 16– 19 PART V: SELECTED DATABASE ISSUES 72 – 83 (12) Chapters 20– 23 PART VI: DISTRIBUTED DBMSS AND REPLICATION^84 – 89 (6)^ Chapters 24–^26 PART VII: OBJECT DBMSS 90 – 92 (3) Chapters 27– 28 PART VIII: THE WEB AND DBMSS 93 – 96 (4) Chapters 29– 30 PART IX: BUSINESS INTELLIGENCE 97 – 100 (4) Chapters 31– 34 Coverage note: The 100-item allocation follows the nine-part distribution in the supplied prompt. The chapter ranges are shown as a coverage guide; related chapter topics are assessed together. Table of Contents If the table of contents field is blank when first opened, right-click it and choose Update Field → Update entire table.

Detailed Rationale: Physical data independence allows changes to the internal schema—such as file organization or indexes—without changing the conceptual or external schemas. Logical data independence concerns changes to the conceptual schema. Integrity and atomicity address correctness and transactions, not schema insulation.

Question 5

A web application uses a browser, an application server, and a separate database server. Which architecture is this? A. Three-tier B. Peer-to-peer C. Single-tier D. Two-tier Correct Answer: A – Three-tier Detailed Rationale: Three-tier architecture separates presentation, application/business logic, and data management. Two-tier typically has a client communicating directly with a database server. Peer-to-peer has no such fixed tier separation; single-tier combines functions.

Question 6

What is the primary responsibility of a database administrator (DBA)? A. Writing every end-user report B. Managing database security, availability, performance, backup, and recovery C. Defining all business strategy D. Replacing application developers Correct Answer: B – Managing database security, availability, performance, backup, and recovery Detailed Rationale: The DBA administers the database environment, including access control, performance, backup, recovery, and operational reliability. Report writing may be an application or user task. Business strategy belongs to organizational leadership, and DBAs complement rather than replace developers.

Question 7

Which is a likely disadvantage of adopting a DBMS? A. Guaranteed faster performance for every workload B. Elimination of all data security risks C. No need for skilled personnel D. Cost and complexity of software, administration, and migration Correct Answer: D – Cost and complexity of software, administration, and migration Detailed Rationale: A DBMS can impose licensing, infrastructure, training, administration, and conversion costs. It does not eliminate security risks, remove the need for skilled personnel, or guarantee superior performance for every workload.

Question 8

Which language category is primarily used to define database structures such as tables and constraints? A. DCL only B. TCL only C. DML D. DDL Correct Answer: D – DDL Detailed Rationale: Data Definition Language (DDL) defines schema objects and constraints, commonly through CREATE, ALTER, and DROP. DML manipulates data; DCL manages privileges; TCL controls transactions.

PART II: THE RELATIONAL MODEL AND LANGUAGES Questions 9–35 | Chapters 4– 9

Question 9

A relation STUDENT(StudentID, Name, Email) has StudentID as its designated primary key. Which requirement follows from entity integrity? A. Email must be unique in every possible design B. Every student must enroll in a course C. Name must determine StudentID D. StudentID must be unique and never NULL Correct Answer: D – StudentID must be unique and never NULL Detailed Rationale: Entity integrity requires every primary-key value to be unique and non-NULL. Email uniqueness is a separate possible constraint, not implied by the primary key. Enrollment is a business relationship, and the stated functional dependency is not established.

Question 10

In a relational table, what does a tuple represent? A. A column definition B. A row representing one record C. A permitted set of values for an attribute D. A physical disk page Correct Answer: B – A row representing one record Detailed Rationale: A tuple is a row in a relation. An attribute is a column; a domain is the set of allowable values for an attribute; a disk page is a physical storage unit.

Question 11

A COURSE table contains DepartmentID referencing DEPARTMENT(DepartmentID). Which rule is enforced by referential integrity? A. CourseID must be alphabetic B. Every course must have a different title C. A non-NULL DepartmentID must match an existing department key D. Every department must offer at least one course Correct Answer: C – A non-NULL DepartmentID must match an existing department key Detailed Rationale: A foreign-key value must match a referenced candidate/primary key value, unless NULL is permitted. The other choices are business constraints not implied by the foreign key.

Question 12

Which relational algebra operator selects rows satisfying a predicate? A. Union (∪) B. Rename (ρ) C. Projection (π) D. Selection (σ) Correct Answer: D – Selection (σ) Detailed Rationale: Selection filters tuples according to a condition. Projection chooses attributes/columns. Union combines union-compatible relations, while rename changes relation or attribute names.

A. HAVING SUM(Sales) > 1000000 B. ON SUM(Sales) > 1000000 C. GROUP BY SUM(Sales) D. WHERE SUM(Sales) > 1000000 Correct Answer: A – HAVING SUM(Sales) > 1000000 Detailed Rationale: Aggregate conditions belong in HAVING because they apply to groups. WHERE is evaluated before aggregation; ON defines join matching; GROUP BY identifies grouping expressions rather than filtering aggregates.

Question 18

Which join retains every row from the left table even when no matching right-table row exists? A. INNER JOIN B. LEFT OUTER JOIN C. CROSS JOIN D. NATURAL JOIN in all cases Correct Answer: B – LEFT OUTER JOIN Detailed Rationale: A LEFT OUTER JOIN preserves all left-side rows and supplies NULLs for unmatched right-side columns. INNER JOIN removes unmatched rows; CROSS JOIN forms combinations; NATURAL JOIN matches common- named columns and does not guarantee preservation.

Question 19

A NOT EXISTS subquery is commonly used to identify which records? A. Rows in physical storage order B. Records with at least one matching row C. Records for which no qualifying related row exists D. Only duplicate rows Correct Answer: C – Records for which no qualifying related row exists Detailed Rationale: NOT EXISTS tests whether the correlated subquery returns no rows, making it useful for anti-join questions such as customers with no orders. EXISTS tests for at least one row; duplicates and physical order are unrelated.

Question 20

Which statement adds a new row to an existing table? A. UPDATE B. DROP C. ALTER TABLE D. INSERT Correct Answer: D – INSERT Detailed Rationale: INSERT adds rows. ALTER TABLE changes schema, UPDATE modifies existing rows, and DROP removes a database object.

Question 21

Which SQL command changes the values of existing rows? A. INSERT B. CREATE C. GRANT D. UPDATE Correct Answer: D – UPDATE

Detailed Rationale: UPDATE modifies existing records, usually with a WHERE condition. INSERT adds rows; CREATE defines objects; GRANT assigns privileges.

Question 22

What is the principal risk of executing DELETE FROM Orders without a WHERE clause? A. Only duplicate rows are removed B. All rows in Orders are deleted C. The table definition is dropped D. Only rows with NULL values are removed Correct Answer: B – All rows in Orders are deleted Detailed Rationale: Without WHERE, DELETE removes every row while leaving the table structure. It does not selectively remove duplicates or NULLs, and DROP—not DELETE—removes the table object.

Question 23

Which constraint ensures that a column cannot contain NULL values? A. FOREIGN KEY B. CHECK C. NOT NULL D. DEFAULT Correct Answer: C – NOT NULL Detailed Rationale: NOT NULL prohibits missing values in that column. CHECK validates a predicate, DEFAULT supplies a value when omitted, and FOREIGN KEY enforces a relationship.

Question 24

Which SQL definition most directly enforces that an employee salary must be nonnegative? A. FOREIGN KEY (Salary) B. ORDER BY Salary C. CHECK (Salary >= 0) D. UNIQUE (Salary) Correct Answer: C – CHECK (Salary >= 0) Detailed Rationale: A CHECK constraint validates each inserted or updated value against a condition. UNIQUE prevents duplicate values; FOREIGN KEY references another key; ORDER BY is a query sorting clause.

Question 25

Why might a DBA create an index on Orders(CustomerID)? A. To potentially speed lookups and joins by CustomerID B. To eliminate the need for backups C. To guarantee that every query is faster D. To enforce that every customer has an order Correct Answer: A – To potentially speed lookups and joins by CustomerID Detailed Rationale: An index can reduce the work needed for selective searches and joins on CustomerID. It does not impose the stated business rule, replace backups, or improve every query; indexes also consume space and add write overhead.

Question 26

A view is best described as: A. A stored query presented as a virtual table B. A mandatory physical copy of every base table

Question 31

Which expression correctly counts all rows in a group, including rows with NULL in a particular column? A. AVG(nullable_column) B. COUNT()* C. COUNT(nullable_column) D. SUM(nullable_column) Correct Answer: B – COUNT() Detailed Rationale:* COUNT(*) counts rows regardless of NULL values in individual columns. COUNT(column) excludes NULLs in that column; SUM and AVG compute numeric aggregates and ignore NULL inputs.

Question 32

What is the result of a CROSS JOIN between relations with 4 and 6 rows? A. 2 rows B. Depends on matching key values C. 10 rows D. 24 rows Correct Answer: D – 24 rows Detailed Rationale: A Cartesian product produces every pair, so 4 × 6 = 24 rows. It does not add row counts or require matching keys.

Question 33

Which relational algebra operation is most naturally associated with finding suppliers who supply every required part? A. Selection B. Union C. Rename D. Division Correct Answer: D – Division Detailed Rationale: Division expresses a universal condition: entities related to all members of another set. Selection filters rows, union combines compatible sets, and rename changes identifiers.

Question 34

In SQL, what does NULL generally represent? A. A numeric zero B. An empty string in every DBMS C. A missing, unknown, or inapplicable value D. A guaranteed false value Correct Answer: C – A missing, unknown, or inapplicable value Detailed Rationale: NULL represents the absence of a known/applicable value and is handled with three-valued logic. It is not interchangeable with zero, empty string, or FALSE.

Question 35

Which predicate correctly tests whether a column contains no value? A. column <> NULL B. column = NULL C. column IS NULL D. column == NULL Correct Answer: C – column IS NULL

Detailed Rationale: SQL uses IS NULL (or IS NOT NULL) because comparisons with NULL yield UNKNOWN rather than ordinary TRUE/FALSE. Equality and inequality comparisons are not the correct NULL test.

Question 40

A relation is in 3NF when, for every nontrivial functional dependency X → A, which condition is sufficient? A. A must be a foreign key B. Every determinant must be a single column C. X is a superkey or A is prime D. X must contain exactly one attribute Correct Answer: C – X is a superkey or A is prime Detailed Rationale: The standard 3NF condition allows X to be a superkey or the dependent attribute A to be prime (part of some candidate key). The other restrictions are not part of the definition.

Question 41

What is the defining BCNF requirement for every nontrivial functional dependency X → Y? A. X must be a superkey B. X and Y must be disjoint tables C. The relation must have no foreign keys D. Y must be prime Correct Answer: A – X must be a superkey Detailed Rationale: BCNF requires every determinant to be a superkey. It is stricter than 3NF in some cases. Prime dependent attributes alone are not enough; foreign keys are unrelated to the definition.

Question 42

A table combines independent sets of employee skills and employee languages, causing every skill to pair with every language. Which dependency concept is most relevant? A. Multivalued dependency B. Partial dependency C. Transitive dependency D. Referential integrity Correct Answer: A – Multivalued dependency Detailed Rationale: Independent multivalued facts about an employee can create a multivalued dependency and a 4NF violation. Partial and transitive dependencies concern functional dependencies; referential integrity concerns foreign keys.

Question 4 3

Which condition characterizes 4NF? A. No relation has more than three attributes B. Every nontrivial multivalued dependency has a superkey determinant C. Every nontrivial FD has a single attribute on the right D. All tables have a surrogate key Correct Answer: B – Every nontrivial multivalued dependency has a superkey determinant Detailed Rationale: 4NF requires the determinant of every nontrivial multivalued dependency to be a superkey. The other choices are not 4NF criteria.

Question 44

A lossless decomposition means that: A. Every table has identical columns B. The number of rows is always reduced C. The original relation can be reconstructed exactly by joining the decomposed relations D. All functional dependencies are automatically preserved

Correct Answer: C – The original relation can be reconstructed exactly by joining the decomposed relations Detailed Rationale: A lossless join decomposition recreates exactly the original relation without spurious tuples or information loss. Dependency preservation is a separate property and is not guaranteed by every lossless decomposition.

Question 45

What is the main purpose of an ER model during conceptual design? A. Represent entities, attributes, and relationships independent of a particular DBMS B. Write application user interfaces C. Determine query execution plans D. Specify disk block placement Correct Answer: A – Represent entities, attributes, and relationships independent of a particular DBMS Detailed Rationale: An ER model captures business data requirements at a conceptual level. Physical storage, user interface implementation, and query plans belong to later design or implementation stages.

Question 46

In an ER relationship, a 1:M cardinality between DEPARTMENT and EMPLOYEE normally means: A. Each department has at most one employee B. Each employee belongs to many departments necessarily C. One department may relate to many employees; each employee relates to one department under the stated rule D. Both sides must have exactly one occurrence Correct Answer: C – One department may relate to many employees; each employee relates to one department under the stated rule Detailed Rationale: The 1:M notation indicates one department can be associated with many employees, while each employee is associated with one department in the modeled relationship. It does not mean one employee per department or mandatory many-to-many participation.

Question 47

A many-to-many relationship between STUDENT and COURSE is mapped into a relational schema. What is the usual implementation? A. Use a trigger instead of tables B. Place all course IDs in one STUDENT text field C. Create an associative ENROLLMENT relation with both foreign keys D. Remove one of the entities Correct Answer: C – Create an associative ENROLLMENT relation with both foreign keys Detailed Rationale: An associative relation resolves M:N relationships into two 1:M relationships and can store relationship attributes such as enrollment date or grade. A delimited list undermines relational integrity; removing entities loses information.

Question 48

A weak entity is typically identified by: A. A timestamp only B. A non-key descriptive attribute C. Its own globally unique key independent of its owner D. An owner entity key combined with a partial key Correct Answer: D – An owner entity key combined with a partial key

Question 53

Which activity belongs to logical database design? A. Mapping a validated ER model to relational tables and constraints B. Installing server hardware C. Monitoring production query latency D. Choosing disk block size Correct Answer: A – Mapping a validated ER model to relational tables and constraints Detailed Rationale: Logical design transforms the conceptual model into a logical schema, such as relations, keys, and constraints. Disk layout is physical design; hardware installation and operational monitoring occur later.

Question 54

A CUSTOMER may place zero or many ORDERS, but each ORDER must belong to exactly one CUSTOMER. Which placement is normally appropriate in a relational design? A. CustomerID as a foreign key in ORDER B. OrderID as a foreign key in CUSTOMER with no other structure C. A separate table for every order attribute D. CustomerName as the foreign key Correct Answer: A – CustomerID as a foreign key in ORDER Detailed Rationale: The foreign key is placed on the many side, ORDER, referencing CUSTOMER. This supports multiple orders per customer and enforces each order's customer association. A repeating order list in CUSTOMER is poor design; descriptive names are not stable keys.

Question 55

A one-to-one relationship between PERSON and PASSPORT may be implemented with: A. No key constraints B. A foreign key in one table constrained UNIQUE, with suitable nullability C. A Cartesian product D. A comma-separated passport list Correct Answer: B – A foreign key in one table constrained UNIQUE, with suitable nullability Detailed Rationale: A unique foreign key enforces at most one related row on the referencing side; nullability and placement depend on participation rules. Cartesian products and delimited lists do not model 1:1 integrity.

Question 56

Which issue is most directly addressed by physical database design? A. Whether a relationship is optional B. Whether requirements are complete C. Whether an entity is a business concept D. Index selection and file organization for workload performance Correct Answer: D – Index selection and file organization for workload performance Detailed Rationale: Physical design selects storage structures, indexes, partitioning, and access paths based on workload and platform. Entity meaning, relationship optionality, and requirement completeness are conceptual/requirements concerns.

Question 57

A relation decomposed into R1(A,B) and R2(B,C) has B → A. Under the binary lossless-join test, why can this decomposition be lossless? A. R1 and R2 have no common attributes

B. Both relations have equal row counts C. Every attribute is a primary key D. The common attribute B functionally determines all attributes of R Correct Answer: D – The common attribute B functionally determines all attributes of R Detailed Rationale: For a binary decomposition, the common attributes must functionally determine one component (or the other) for a lossless join. Since B determines A, B determines R1's attributes A and B. No common attributes generally risks spurious combinations.

Question 58

Which is an insertion anomaly? A. A new department cannot be recorded until an employee is assigned if department data exists only in an employee table B. A query takes longer after adding an index C. A transaction commits successfully D. A foreign key rejects an invalid reference Correct Answer: A – A new department cannot be recorded until an employee is assigned if department data exists only in an employee table Detailed Rationale: An insertion anomaly occurs when one fact cannot be inserted without an unrelated fact because of poor table design. Query speed, successful commit, and rejection of an invalid foreign key are not insertion anomalies.

Question 59

A candidate key is: A. A column that must contain text B. Any attribute used in ORDER BY C. A minimal set of attributes that uniquely identifies each tuple D. A foreign key that allows duplicates Correct Answer: C – A minimal set of attributes that uniquely identifies each tuple Detailed Rationale: A candidate key uniquely identifies tuples and is minimal—no proper subset retains uniqueness. It is not defined by sorting, foreign-key status, or data type.

A. Choose indexes before requirements are known B. Write triggers for every business rule C. Identify candidate entity types and their business relationships D. Create one table with every possible attribute and repeating group Correct Answer: C – Identify candidate entity types and their business relationships Detailed Rationale: Conceptual analysis begins by identifying the important entity types, their attributes, and relationships from requirements. A single wide table creates redundancy; indexes and triggers are implementation decisions made after the model is understood.

Question 65

Which ER attribute is generally appropriate as a derived attribute? A. National identifier stored as supplied B. Customer legal name C. Order reference number D. Age calculated from DateOfBirth Correct Answer: D – Age calculated from DateOfBirth Detailed Rationale: Age changes over time and can be derived from DateOfBirth and the current date, so it is commonly modeled as derived rather than stored. The other values are source facts or identifiers, though storage policy may vary.

Question 66

A relationship has mandatory participation for ORDER but optional participation for CUSTOMER. What does this mean? A. Every order must participate; a customer may have no order B. Every customer must have an order; orders may have no customer C. Neither side participates D. Both sides have exactly one participation Correct Answer: A – Every order must participate; a customer may have no order Detailed Rationale: Mandatory participation on ORDER means each order must be related; optional participation on CUSTOMER permits a customer with zero related orders. The reverse statement swaps the constraints.

Question 67

When mapping a multivalued attribute such as a person's multiple email addresses, the usual relational approach is to: A. Discard all but the first address B. Create a separate relation containing the owner key and one email per row C. Store all addresses in one delimited string D. Duplicate the person row for every address without a key Correct Answer: B – Create a separate relation containing the owner key and one email per row Detailed Rationale: A separate relation represents each multivalued occurrence atomically and references the owner through a foreign key. Delimited values violate 1NF; uncontrolled duplication and discarding values lose integrity or information.

Question 68

A physical design team observes frequent equality searches on a selective column. Which index decision is most defensible? A. Avoid all indexes because they slow reads B. Replace the primary key with the searched column C. Evaluate an index on that column against query frequency, selectivity, and update cost D. Create indexes on every column automatically

Correct Answer: C – Evaluate an index on that column against query frequency, selectivity, and update cost Detailed Rationale: Index selection should be workload-driven, considering selectivity, query frequency, storage, and write overhead. Indexing every column is costly; indexes often improve reads; a search attribute should not automatically replace a primary key.

Question 69

A query plan shows a full table scan for a highly selective predicate on an unindexed column. What is a reasonable tuning response? A. Add random indexes to unrelated tables B. Increase result-set size C. Remove all statistics D. Consider an appropriate index and compare execution plans and measured costs Correct Answer: D – Consider an appropriate index and compare execution plans and measured costs Detailed Rationale: An index may provide a more efficient access path for a selective predicate, but the DBA should verify the plan and measure actual performance. Unrelated indexes, larger results, and missing statistics are not sound tuning methods.

Question 70

Why can adding many indexes reduce write performance? A. Each insert, update, or delete may require index maintenance B. Indexes force every query to perform a full scan C. Indexes prevent transaction logging D. Indexes make rows larger in every storage engine Correct Answer: A – Each insert, update, or delete may require index maintenance Detailed Rationale: Indexes add structures that must be maintained when indexed data changes, increasing write work and storage. They do not inherently force scans or disable logging; row-size effects depend on implementation.

Question 71

Which measure is most useful for evaluating whether a database tuning change helped? A. Assume improvement from index count B. Compare representative workload response time/throughput and resource use before and after C. Count the number of SQL keywords D. Measure only database file name length Correct Answer: B – Compare representative workload response time/throughput and resource use before and after Detailed Rationale: Performance evaluation uses representative workload metrics such as latency, throughput, CPU, I/O, and waits, measured under comparable conditions. Keyword count and file names are irrelevant; index count alone is not evidence.