CS614 – Data Warehousing: Midterm Important Subjective (40 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS614 Course Page · CS614 MCQ Pack (314 MCQs)
-
Define a data warehouse. Also write the four characteristics of a data warehouse given by W. H. Inmon.
Topic: Data Warehousing Fundamentals
According to W. H. Inmon, a data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data in support of management decision-making. (1) Subject-oriented: data is organized around major subject areas of the enterprise (such as customers, products and sales) rather than around applications. (2) Integrated: data from different operational sources is made consistent in naming, format and encoding before it is loaded. (3) Time-variant: every key in the warehouse contains a time element, so data represents a long historical time horizon. (4) Non-volatile: once loaded, data is not updated or deleted in the warehouse; it is only loaded and accessed.
-
Why is DASD better than tape storage with respect to access time?
Topic: Data Warehousing Fundamentals
DASD (Direct Access Storage Device) i.e. disk storage is fundamentally different from magnetic tape storage in the sense that data can be accessed directly on DASD, i.e. non-sequentially. On tape there is no way to reach record k+1 without going through records 1, 2, 3, ... k in sequence. On DASD, once the address of record k+1 is known, it is a simple matter to go to record k+1 directly. Furthermore, the time required to locate a record on DASD (in milliseconds) is significantly less than the time required to scan a magnetic tape.
-
Differentiate between OLTP and OLAP.
Topic: Data Warehousing Fundamentals
OLTP (Online Transaction Processing) supports day-to-day operational work: it processes small, current, detailed transactions (insert, update, delete) on fully normalized data, with high selectivity and a small number of records per query. OLAP (Online Analytical Processing) supports decision making: it runs complex analytical queries over large volumes of historical, summarized data, typically stored in de-normalized dimensional structures (cubes), with low selectivity and millions of records scanned per query. OLTP implementations are fully normalized, while OLAP implementations are highly de-normalized.
-
Differentiate between normalization and de-normalization.
Topic: Normalization & De-Normalization
Normalization is a logical design technique that decomposes relations to remove data redundancy and the resulting update, insertion and deletion anomalies; it increases the number of tables and the joins needed at query time, and is used for OLTP systems. De-normalization is the process of selectively transforming normalized relations into un-normalized physical record specifications by adding redundancy (pre-joining tables, adding redundant columns, splitting tables or adding derived attributes); it reduces the number of tables and run-time joins and speeds up data retrieval at the cost of slower data modification, and is used in data warehouse / decision support environments.
-
Which de-normalization technique is used to reduce foreign keys in a relation?
Topic: Normalization & De-Normalization
The Collapsing Tables technique is used to reduce foreign keys in a relation. In general, collapsing tables in a one-to-one relationship has fewer drawbacks than others. Advantages of this technique include reduced storage space and reduced time for data update; some of the less apparent advantages are a reduced number of foreign keys on tables and a reduced number of indexes (since most indexes are created on primary/foreign keys).
-
List down the two ways to simplify the ER Model.
Topic: Normalization & De-Normalization • 2 marks marks
Two general methods: (1) De-Normalization, (2) Dimensional Modeling (DM).
-
How is a cube created in ROLAP?
Topic: OLAP & Dimensional Modeling
A cube is a logical entity containing values of a certain fact at a certain aggregation level at an intersection of a combination of dimensions. In ROLAP, this logical cube is realized over a relational database (usually a star schema): the fact values are stored in the fact table and the combinations of dimension keys identify each cell of the cube, which is then accessed using ANSI standard SQL.
-
What is HOLAP? Write its features.
Topic: OLAP & Dimensional Modeling
The Hybrid OLAP (HOLAP) solution is a mix of MOLAP and relational ROLAP architectures that supports queries against summary and transaction data in an integrated fashion. HOLAP environments use MOLAP cubes to support common access paths with reasonably small dimensional cardinality and number of dimensions, and relational structures when greater scalability for OLAP queries is required. This coexistence strategy allows exploiting the best of both worlds. The HOLAP approach enables a user to perform multidimensional analysis on data in the multidimensional database along with query-based probing; if the user reaches the bottom of the multidimensional hierarchy and requires further detail data, the HOLAP engine automatically generates SQL to retrieve the detail data from the source RDBMS, transparently to the user. However, HOLAP architectures are typically more complex to implement and administer than ROLAP or MOLAP architectures individually.
-
Briefly describe the features of MOLAP.
Topic: OLAP & Dimensional Modeling
MOLAP cubes are physically built in the proprietary file format of a multi-dimensional database (MDD) for fast data retrieval, and are optimal for slicing and dicing operations. They can also perform complex calculations: all calculations are pre-generated when the cube is created, hence complex calculations are not only doable, but they return quickly.
-
What are the drawbacks of MOLAP? Also explain the curse of dimensionality.
Topic: OLAP & Dimensional Modeling
Maintenance issue: every data item received must be aggregated into every cube (assuming "to-date" summaries are maintained), which is a lot of work. Storage issue: as dimensions get less detailed (e.g. year vs. day) cubes get much smaller, but the storage consequences of building hundreds of cubes can be significant. Scalability (the curse of dimensionality): MOLAP implementations with pre-defined cubes perform very well compared to relational databases, but often have difficulty scaling when the size of dimensions becomes large; the breakpoint is typically around 64,000 cardinality of a dimension. Beyond tens (sometimes small hundreds) of thousands of entries in a single dimension the MOLAP model breaks, because the pre-computed cubes become very sparse and there is a combinatorial explosion in the number and size of cubes. The two possible, but limited, solutions are virtual cubes and partitioned cubes.
-
Differentiate between MOLAP and ROLAP in terms of implementation.
Topic: OLAP & Dimensional Modeling
MOLAP physically builds "cubes" for direct access, usually in the proprietary file format of a multi-dimensional database (MDD) or a user-defined data structure; therefore ANSI SQL is not supported. ROLAP (Relational OLAP) provides access to information via a relational database using ANSI standard SQL; the data stays in relational tables (normally a star schema) and no proprietary cube structure is built.
-
Differentiate between MOLAP and DOLAP in terms of implementation.
Topic: OLAP & Dimensional Modeling
MOLAP: OLAP implemented with a multi-dimensional data structure, where cubes are physically built on a shared multi-dimensional database for direct access. DOLAP: OLAP implemented for desktop decision support environments, in which "cube" structures are downloaded to a desktop platform without the need for a shared or cube server, facilitating a mobile computing paradigm.
-
What are the benefits of HOLAP and DOLAP over MOLAP and ROLAP?
Topic: OLAP & Dimensional Modeling
HOLAP combines the strengths of both: it gives MOLAP-like fast access on summarized data through pre-built cubes, and ROLAP-like scalability by keeping the detailed data in the relational database, so it does not suffer the MOLAP scalability limit nor the slower query response of pure ROLAP on summaries. DOLAP brings OLAP to the desktop/mobile user: cube structures are downloaded to the desktop, so analysis is possible without a shared cube server, which neither MOLAP nor ROLAP provides.
-
Briefly describe the features of Dimensional Modeling.
Topic: OLAP & Dimensional Modeling
Dimensional Modeling (DM) is a logical design technique that seeks to present the data in a standard, instinctive structure that supports high performance and ease of understanding. It is inherently dimensional in nature and adheres to the relational model with some important restrictions: every dimensional model is composed of one central table with a multipart key, called the fact table, and a set of smaller tables called dimension tables. Each dimension table has a single-part primary key that corresponds exactly to one of the components of the multipart key in the fact table, resulting in the characteristic "starlike" structure or star schema. Facts are the quantities or numerical measures (e.g. sales amount) that we can count; the most useful facts in a fact table are numeric and additive, because warehouse applications rarely retrieve a single fact record — they fetch hundreds, thousands or millions of records at a time, and the only useful thing to do with so many records is to add them up.
-
Briefly describe the features of Star Schema.
Topic: OLAP & Dimensional Modeling
In a star schema, dimensional hierarchies are collapsed into a single table for each dimension, and a single fact table is created with a single header from the detail records. This results in: a vastly simplified physical data model; fewer tables (compared to thousands of tables in some ERP systems); fewer joins, resulting in high performance; and some requirement of additional space, with some loss of information due to de-normalization.
-
Briefly describe snowflake schema.
Topic: OLAP & Dimensional Modeling
Snowflake schema is a logical arrangement of tables in a multidimensional database such that the entity relationship diagram resembles a snowflake in shape. The snowflake schema is represented by centralized fact tables which are connected to multiple dimensions; unlike the star schema, the dimension tables are normalized, so a dimension may be spread over several tables connected by keys.
-
Differentiate between star schema and snowflake schema.
Topic: OLAP & Dimensional Modeling
In a star schema each dimension is represented by a single de-normalized table, so the fact table joins directly to one table per dimension: the model is simple, has fewer joins and gives faster queries, at the cost of some redundant storage. In a snowflake schema the dimension tables are normalized into multiple related tables (the diagram looks like a snowflake): redundancy and storage are reduced, but queries need more joins and the model is harder to understand and maintain.
-
In the given scenarios, identify the additive and non-additive facts, with reasons. (1) No. of Items Sold: 20, 50, 40 (Total 110). (2) % Discount: 41, 52, 46.
Topic: OLAP & Dimensional Modeling
(1) This is additive, because additive facts are easy to work with: summing the fact value gives meaningful results. Additive facts are, for example, quantity sold and total sales in Rs. (2) This is non-additive, because such facts cannot be meaningfully summed. Non-additive facts are averages (average sales price, unit price), percentages (% discount), ratios (gross margin) and counts of distinct values (count of distinct products sold).
-
How does aggregate awareness help the users?
Topic: OLAP & Dimensional Modeling
Aggregate awareness allows using pre-built summary tables by some front-end tools. The environment is smart enough to develop or compute higher level aggregates using lower level or more detailed aggregates, so queries are answered from the smallest suitable aggregate instead of always going down to the detailed data.
-
Under what condition can smart tools construct a less detailed aggregate from a more detailed aggregate?
Topic: OLAP & Dimensional Modeling
Smart tools will allow less detailed aggregates to be constructed from more detailed aggregates (full aggregate awareness) at run-time, so that we do not go all the way down to the detail for every aggregation. However, for this to work, the metrics must be additive (e.g. no ratios, averages, etc.). More detailed pre-aggregates are larger, but can also be used to build less detailed aggregates on-the-go.
-
Why are both aggregation and summarization required?
Topic: OLAP & Dimensional Modeling
Both are required because of: (1) grain mismatch — the required grain may not be available, or there may not be space to store every grain; (2) data marts requiring low detail, which are fed from summarized data; and (3) detail losing its utility over time, after which only summarized data is worth keeping.
-
What are timestamps in the context of data extraction?
Topic: ETL: Extraction, Transformation & Loading
The tables in some operational systems have timestamp columns. The timestamp specifies the time and date that a given row was last modified. If the tables in an operational system have columns containing timestamps, then the latest (changed) data can easily be identified using the timestamp columns, so timestamps are one of the techniques of Change Data Capture.
-
List down any two advantages of applying the "change data capture" technique in modern systems.
Topic: ETL: Extraction, Transformation & Loading • 2 marks marks
Any two of the following: (1) Flat files are not required. (2) No incremental on-line I/O is required for log tape. (3) Extraction of changed data occurs immediately, not deferred.
-
We use CDC in both legacy systems and modern systems. What are the benefits of using CDC in modern systems as compared to legacy systems?
Topic: ETL: Extraction, Transformation & Loading
In modern source systems, Change Data Capture can exploit facilities built into the source system itself — timestamp columns, database triggers and partitioning — so changed data is identified and extracted immediately, flat files are not required, and no incremental on-line I/O is needed for log tapes. In legacy systems these facilities are usually not available, so change capture has to depend on log tapes or flat files, extraction is deferred (batch oriented) and the whole process is more complex and slower.
-
Differentiate between offline extraction and online extraction.
Topic: ETL: Extraction, Transformation & Loading
Online extraction and offline extraction are the two types of physical data extraction. In online extraction, data is extracted directly from the source system through its interface (e.g. a database connection) while working with the live source. In offline extraction, the data is first staged into flat files by the source system and the extraction is then performed from those flat files, so the source system is not accessed directly at extraction time.
-
Differentiate between one-to-one and one-to-many transformation.
Topic: ETL: Extraction, Transformation & Loading
Simple scalar transformation is a one-to-one mapping from one set of values to another set of values using straightforward rules; for example, converting gender codes "M/F" in the source to "Male/Female" in the warehouse. A one-to-many transformation is more complex than scalar transformation: a single data element from the source system results in several columns in the data warehouse; for example, a phone number stored as "countrycode-phone-extension" is split into separate country code, phone number and extension columns.
-
"Splitting of single field" is one of the types of transformation. It is used to store individual components of names and addresses in separate fields in the data warehouse. In your point of view, what are the benefits of doing this?
Topic: ETL: Extraction, Transformation & Loading • 3 marks marks
Splitting a single field into its components (for example, a name into first name and last name, or an address into street, city and postal code) makes each component independently usable in the warehouse: data can be sorted, searched, grouped, filtered and validated on individual components; cleansing and standardization of each component becomes possible; matching and duplicate detection become more reliable; and joining of parts selected from many source systems is more widespread in the data warehouse environment.
-
In your point of view, what may be the possible reasons to perform the conversion task during data transformation? Explain with an example.
Topic: ETL: Extraction, Transformation & Loading • 3 marks marks
Conversion is an all-inclusive task. It includes a large variety of rudimentary conversions of single fields for two primary reasons: (i) to standardize among the data extractions from disparate source systems, and (ii) to make the fields usable and understandable to the users. For example, gender may be stored as "M/F" in one source system and as "1/0" in another; conversion transforms both into one standard representation in the data warehouse.
-
After completing the transformation task, the data loading activity is started. How many types of data loading strategies are there, and when is each type of strategy adopted? Explain.
Topic: ETL: Extraction, Transformation & Loading
Once the data has been transformed, there are three primary loading strategies: (1) Full data refresh with block insert or "block slamming" into an empty table — adopted for the initial load, or when the whole table is to be replaced. (2) Incremental data refresh with block insert or "block slamming" into existing (populated) tables — adopted for periodic loads of changed/new data. (3) Trickle/continuous feed with constant data collection and loading using row-level insert and update operations — adopted when the warehouse must be refreshed continuously, in near real time.
-
What are the factors behind poor data quality?
Topic: Data Quality & Cleansing
Sources of data pollution include: system conversions and migrations; heterogeneous systems integration; inadequate database design of source systems; data aging; incomplete information from customers; input errors; internationalization/localization of systems; and lack of data management policies/procedures. The resulting types of data quality problems include: dummy values in source system fields; absence of data in source system fields; multipurpose fields; cryptic data; contradicting data; improper use of name and address lines; violation of business rules; reused primary keys; and non-unique identifiers.
-
What are the purposes of data profiling?
Topic: Data Quality & Cleansing
Data profiling is a process of gathering information about columns. It must fulfill the following purposes: (1) identify the type and extent to which transformation is required; (2) identify the number of columns which are required to be transformed and which transformation is required, meaning date format or gender convention; and (3) provide a detailed view about the quality of data, such as the number of erroneous values and the number of values out of domain.
-
Name the steps involved in the cleansing of data.
Topic: Data Quality & Cleansing
The data cleansing procedure consists of the following steps: (1) Elementizing — breaking the data into its smallest useful components. (2) Standardizing — bringing the elementized data into standard formats and conventions. (3) Verifying — checking the standardized data against reference sources and business rules for correctness. (4) Matching — identifying records that refer to the same entity. (5) Householding — identifying records that belong to the same household/group. (6) Documentation — recording the cleansing rules and results.
-
List down any four ways of handling missing data during the data cleansing process.
Topic: Data Quality & Cleansing
Any four of the following: (1) Dropping records. (2) "Manually" filling missing values. (3) Using a global constant as filler. (4) Using the attribute mean (or median) as filler. (5) Using the most probable value as filler.
-
We use de-normalization, which means redundant data. If duplication is in the source system, what are the effects of this duplication in the analysis of a data warehouse?
Topic: Data Quality & Cleansing
Duplicated records in the source system are loaded into the warehouse as if they were separate facts. In analysis this results in double counting: false frequency distributions and incorrect aggregates (sums, counts and averages) are produced, because the same entity is counted more than once. Data duplication can therefore result in costly errors and wrong business decisions, which is why duplicate elimination is an essential part of data cleansing before loading.
-
What is the relationship between data quality and the value of a particular application? When are efforts for data quality logical?
Topic: Data Quality & Cleansing
The value of an application depends directly on the quality of the data it uses: data quality is a function of its use, not of its collection (Orr’s law), so an application fed with poor quality data produces wrong analysis and wrong decisions, and its value falls. Efforts for data quality are logical when the data is actually used for important decisions and when the cost of poor data (errors, wrong decisions, rework) is greater than the cost of improving and maintaining the quality of that data.
-
Identify the given statements as correct or incorrect, and justify your answer in either case. 1. "Median is an example of Distributive Aggregate." 2. "With the help of the 'current value field' method we can track as many changes as we wish."
Topic: Data Quality & Cleansing • 5 marks marks
1. INCORRECT. Distributive aggregates (such as SUM, COUNT, MAX and MIN) can be computed from partial results of sub-aggregates. The median is a holistic aggregate: it gives a complete picture of the data and cannot be computed from sub-aggregates, so it is not a distributive aggregate. 2. INCORRECT. In the "create current value field" technique for handling slowly changing dimensions, a current-value field and a previous-value field are kept (e.g. current_region and previous_region), so only the TWO most recent changes can be tracked — not as many changes as we wish.
-
Identify the given statements as correct or incorrect, and justify your answer in either case. 1. "When attributes or records are missing in extracted data, then the data is semantically dirty." 2. "Pattern-based data cleansing technique identifies outlier fields and records using the values of Mean and Standard Deviation."
Topic: Data Quality & Cleansing • 5 marks marks
1. INCORRECT. When attributes or records are missing in the extracted data, it is a coverage anomaly, not semantically dirty data; semantically dirty data violates integrity constraints or business rules. 2. INCORRECT. Pattern-based cleansing identifies outlier fields and records that do not conform to existing patterns in the data; combined techniques (partitioning, classification and clustering) are used to identify the patterns that apply to most records. Using mean and standard deviation is a statistical technique, not pattern-based cleansing.
-
What is an inverted index?
Topic: Indexing & Partitioning
An inverted index is an optimized structure that is built primarily for retrieval, with update being only a secondary consideration. The basic structure inverts the text: instead of scanning documents where a document is found and then its terms are seen, an index is built that maps terms to documents (much like the index at the back of a book that maps terms to page numbers). Instead of listing each document once (and each term repeated for each document that contains the term), an inverted index lists each term in the collection only once and then shows a list of all the documents that contain that term.
-
What is expression partitioning? When is it deployed?
Topic: Indexing & Partitioning
Expression partitioning is usually deployed when expressions can be used to group data together in such a way that access can be targeted to a small set of partitions for a significant portion of the data warehouse workload, so that queries do not need to examine all the data in the table.
-
"Round robin distribution is pre-defined." Do you agree or not? Give your answer with argument.
Topic: Indexing & Partitioning
Agree. Round-robin is a pre-defined distribution strategy: records are assigned to partitions in a fixed rotating sequence (the first record to the first partition, the second to the second, and so on, starting again from the first), without examining the values of the data. Because the rule is fixed in advance, it gives an almost perfectly even distribution of records across partitions; however, since placement does not depend on data values, partition elimination is not possible for queries searching for specific values.