
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
University Information Systems Program Course D270: Data Management & Analytics
Typology: Exams
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















Section 1: Database Fundamentals & Data Modeling (Questions 1-25)
Answer: B Explanation: A DBMS is software that enables efficient storage, retrieval, updating, and management of data in databases, providing data integrity, security, and concurrent access.
Answer: C Explanation: The relational model, introduced by E.F. Codd, organizes data into tables (relations) with rows (tuples) and columns (attributes).
Answer: C Explanation: Three-schema architecture: Internal (physical storage), Conceptual (logical structure), External (user views). The conceptual schema provides a community view of the database.
A) A relationship between tables B) A thing or object in the real world C) A database constraint D) A SQL query
Answer: B Explanation: Entities are real-world objects (e.g., Student, Course) about which data is stored. Represented as rectangles in ER diagrams.
Answer: A Explanation: 1:1 relationship = each entity in set A associates with at most one entity in set B, and vice versa (e.g., Employee to Company Car assignment).
Answer: B Explanation: Weak entities cannot exist independently; they depend on a strong (owner) entity. Represented with double rectangles in ER diagrams.
Answer: C Explanation: Primary key constraints: unique, NOT NULL, minimal (cannot have unnecessary attributes). Can be composite (multiple attributes).
Answer: A Explanation: CREATE TABLE statement defines a new table structure including column names, data types, and constraints.
Answer: C Explanation: DELETE FROM table_name without WHERE deletes all rows (but table structure remains). TRUNCATE TABLE is faster for deleting all rows.
Answer: D Explanation: FULL OUTER JOIN returns all rows from both tables, matching where possible, NULLs where no match. Not all DBMS support (MySQL doesn't).
Answer: B Explanation: Correlated subquery references columns from outer query, executes repeatedly for each outer row. Often less efficient than joins.
C) Sort the result set D) Join multiple tables
Answer: B Explanation: WHERE filters rows, HAVING filters groups. HAVING can use aggregate functions (SUM, COUNT), WHERE cannot.
Answer: B Explanation: NOT NULL constraint prevents NULL values in column. Primary key implies NOT NULL, but columns can have NOT NULL without being primary key.
Answer: E Explanation: ACID = Atomicity (all or nothing), Consistency (valid state), Isolation (concurrent execution), Durability (permanent). Accuracy is not an ACID property.
Answer: C Explanation: Two-phase locking (growing then shrinking phases) ensures serializable schedules and maintains data integrity during concurrent transactions.
Section 2: SQL Queries & Advanced Database Concepts (Questions 26-50)
Answer: B Explanation: COUNT() returns number of rows including NULLs. COUNT(column) counts non-NULL values in specific column.
Answer: B Explanation: DISTINCT eliminates duplicate values, returning unique department names from Employees table.
Answer: B Explanation: LIKE with wildcards: % (any string), _ (single character). Example: WHERE name LIKE 'A%' finds names starting with A.
Answer: A Explanation: UNION combines result sets vertically, removing duplicates. UNION ALL keeps duplicates. Requires same number/type of columns.
Answer: A Explanation: Can create primary key with CREATE TABLE or ALTER TABLE ADD PRIMARY KEY. Some DBMS also use CONSTRAINT syntax.
Answer: A Explanation: Self-join uses table aliases to join a table to itself, often for hierarchical data (e.g., employees and managers both in Employees table).
Answer: B Explanation: Read Committed is default in Oracle, PostgreSQL, SQL Server. Prevents dirty reads but allows non-repeatable reads and phantom reads.
Answer: A Explanation: Deadlock = transaction T1 holds lock A needs lock B, transaction T2 holds lock B needs lock A. DBMS detects and aborts one transaction.
Explanation: Star schema: fact table (measures, foreign keys) connected to dimension tables (descriptive attributes). Snowflake schema = normalized dimensions.
Answer: C Explanation: OLAP (Online Analytical Processing) operations: Roll-up (summarize), Drill-down (detail), Slice (subset on one dimension), Dice (subset on multiple dimensions).
Answer: B Explanation: Data mining = discovering patterns, correlations, trends in large datasets using ML, statistics, database systems. Includes classification, clustering, association.
Answer: B Explanation: Surrogate key = artificial key (auto-increment, GUID) with no business meaning. Advantages: stable, simple, performance. Contrast with natural key (SSN, email).
Answer: C Explanation: SUM(col) OVER (ORDER BY col2) calculates running total. Window functions perform calculations across row set without collapsing rows.
A) WITH clause B) CREATE VIEW C) TEMPORARY TABLE D) SUBQUERY
Answer: A Explanation: CTE syntax: WITH cte_name AS (SELECT ...) SELECT FROM cte_name. Improves readability over nested subqueries, can be recursive.
Answer: D Explanation: Serializable provides highest isolation: prevents dirty reads (uncommitted data), non-repeatable reads (same row different values), phantom reads (new rows appear).
Answer: D Explanation: Key-value stores: simple schema, fast lookups (Redis, DynamoDB). Document stores: JSON/XML (MongoDB). Column-family: tables with flexible columns (Cassandra). Graph: nodes/edges (Neo4j).
Answer: A Explanation: ETL = Extract (from source), Transform (clean, integrate), Load (into data warehouse). ELT (Load then Transform) is modern variant for big data.
D) Data modeling
Answer: B Explanation: Data analytics = inspecting, cleaning, transforming data to discover useful information, support decision-making. Includes descriptive, diagnostic, predictive, prescriptive.
Answer: C Explanation: Predictive analytics uses statistical models, ML to forecast future. Descriptive = what happened, Diagnostic = why, Prescriptive = what should be done.
Answer: B Explanation: Regression predicts continuous values (price, temperature). Classification predicts categories (yes/no, spam/not). Clustering groups similar items.
Answer: C Explanation: K-means partitions data into K clusters based on distance to centroids. Unsupervised learning (no labels). Sensitive to initial centroids and K value.
Answer: A
Explanation: Confusion matrix: TP = actual positive predicted positive, FP = actual negative predicted positive, TN = actual negative predicted negative, FN = actual positive predicted negative.
Answer: B Explanation: Precision = TP/(TP+FP) = how many selected items are relevant. Recall = TP/(TP+FN) = how many relevant items are selected. F1-score = harmonic mean.
Answer: A Explanation: Overfitting = model learns noise/patterns specific to training set, fails to generalize. Solutions: more data, regularization, cross-validation, simpler model.
Answer: B Explanation: k-fold cross-validation splits data into k subsets, train on k-1, test on 1, repeat k times. Reduces overfitting, better performance estimate than single train/test split.
Answer: B Explanation: PCA transforms variables into uncorrelated principal components, reducing dimensions while preserving variance. Useful for visualization, noise reduction.
D) All of the above
Answer: D Explanation: Recursive CTE: anchor member (base case) UNION ALL recursive member (references CTE). Used for hierarchical data (org charts, bill of materials).
Answer: D Explanation: SQL injection defenses: parameterized queries (prepared statements), stored procedures, input validation, least privilege, escaping user input.
Answer: C Explanation: MERGE (UPSERT) inserts if not exists, updates if exists. Syntax: MERGE INTO target USING source ON condition WHEN MATCHED/MISMATCHED.
Answer: B Explanation: Role-Based Access Control assigns permissions to roles, users assigned roles. Simpler than assigning permissions directly to each user.
Answer: D
Explanation: Data governance = overall management of data availability, usability, integrity, security. Includes policies, standards, processes, roles.
Answer: D Explanation: GDPR (General Data Protection Regulation) EU law: consent, right to access/delete, data portability, breach notification, privacy by design.
Answer: B Explanation: Horizontal scaling (scale-out) = add more servers/nodes. Vertical scaling (scale-up) = add resources to existing server. Cloud favors horizontal.
Answer: B Explanation: Data lake stores raw, unstructured/semi-structured/structured data at scale. Schema-on-read vs. data warehouse schema-on-write. Used with big data.
Answer: B Explanation: Hadoop = open-source framework for distributed storage (HDFS) and processing (MapReduce) of big data across clusters.
Explanation: Both explicit JOIN syntax (B) and implicit comma join (C) work. Modern SQL prefers explicit JOIN for clarity. A fails because DeptID is number not name.
Answer: C Explanation: CHECK constraint validates column values: CHECK (salary BETWEEN 0 AND 200000). Some DBMS allow CHECK constraints, others use triggers.
Answer: C Explanation: Composite index on columns used in WHERE clause, especially equality first (CustomerID) then range (OrderDate). Covering index if includes all selected columns.
Answer: D Explanation: Either cascade delete (B) or manual deletion in correct order (C child then parent). A alone fails if foreign key constraint without cascade.
Answer: B Explanation: Data warehouses often denormalize (star schema) for faster analytical queries. OLTP systems typically normalize for integrity, minimize anomalies.
Answer: C Explanation: Missing values = incompleteness. Solutions: ignore, impute (mean, median, prediction), use algorithms handling missing data. NULL represents unknown.
Answer: B Explanation: Social media posts = JSON-like documents, semi-structured, evolving schema. MongoDB (document) good fit. Graph for relationships between users.
Answer: C Explanation: LAG(column, 1) accesses previous row's value for comparison. Example: LAG(sales, 12) for same month previous year if monthly data.
Answer: D Explanation: All can help. Transaction ensures atomicity (both debit and credit or neither). Stored procedure encapsulates logic. Trigger could automate but careful with recursion.