You get a bonus - 1 coin for daily activity. Now you have 1 coin

Relational data warehouses: concept, construction schemas, advantages and disadvantages

Lecture



In the early 1970s, the Anglo-American scientist E. Codd developed the relational model of stored data organization, which marked the beginning of a new stage in the evolution of DBMSs. Thanks to its simplicity and flexibility, the relational model became dominant, and relational DBMSs became the de facto industry standard.

A relational database — a set of relations containing all the information that needs to be stored in the database. Physically, this means that information is stored in the form of two-dimensional tables linked by key fields.

Applying the relational model when building a data warehouse (DW) can, in a number of cases, provide advantages over multidimensional technology, especially in terms of efficiency when working with large data volumes and computer memory usage. ROLAP systems are built on the basis of relational data warehouses (RDWs), and this idea also belongs to Codd.

The RDW technology is based on the principle whereby dimensions are stored in flat tables just as in ordinary relational DBMSs, while facts (aggregated data) are stored in separate special tables within the same database. In this case, the fact table serves as the basis for the dimension tables linked to it. It contains the quantitative characteristics of objects and events, the aggregate of which is intended for subsequent analysis.

RDW design schemas

At the logical level, two schemas for building an RDW are distinguished — the «star» schema and the «snowflake» schema.

When using the «star» schema, the fact table is central, with all dimension tables linked to it. Thus, the information for each dimension is located in a separate table, which simplifies browsing them and makes the schema itself logically transparent and easy for the user to understand (fig. 8).

Relational data warehouses: concept, construction schemas, advantages and disadvantages
Fig. 8. RDW «star» schema

However, placing all information about a dimension in a single table is not always justified. For example, if the products being sold are organized into groups (i.e., there is a hierarchy), then it becomes necessary, in one way or another, to show which group each product belongs to, which leads to repeated duplication of group names. This not only increases redundancy but also raises the likelihood of inconsistencies arising (for instance, if the same product is mistakenly assigned to different groups).

To work more efficiently with hierarchical dimensions, a modification of the «star» schema was developed, called the «snowflake» schema. The main feature of the «snowflake» schema is that information about a single dimension can be stored across several linked tables. That is, if at least one of the dimension tables has one or more other dimension tables linked to it, then the «snowflake» schema is being applied (fig. 9).


Fig. 9. RDW «snowflake» schema

The main functional difference between the «snowflake» schema and the «star» schema is the ability to work with hierarchical levels that determine the degree of data detail. In the example given, the «snowflake» schema makes it possible to work with data at the maximum level of detail — for example, with each product individually — or to use a generalized representation by product groups with corresponding fact aggregation.

The choice of schema for building an RDW depends on the data collection and processing mechanisms used. Each schema has its own advantages and disadvantages, which, however, may manifest to a greater or lesser degree depending on the specifics of how the DW as a whole operates. The advantages of the «star» schema include:

  • simplicity and logical transparency of the model;
  • a simpler procedure for populating dimensions, since only one table needs to be worked with.

    The disadvantages of the «star» schema are:

  • slower processing of dimensions, since the same dimension values may occur multiple times in the same table;
  • a high likelihood of data inconsistencies (in particular, contradictions), for example, due to input errors.

The advantages of the «snowflake» schema are as follows:

  • it is closer to the representation of data in a multidimensional model;
  • the procedure for loading from the RDW into multidimensional structures is more efficient and simpler, since loading is performed from separate tables;
  • the likelihood of errors and data inconsistencies is much lower;
  • greater compactness of data representation compared to the «star» schema, since all dimension values are mentioned only once. Disadvantages of the «snowflake» schema:
  • a data structure that is fairly complex to implement and understand;
  • a more complicated procedure for adding dimension values.

In addition, there are a number of technical features that may determine RDW developers' preferences when choosing which schema to use.

Advantages and disadvantages of RDWs

The main advantages of RDWs are as follows:

  • a practically unlimited volume of stored data;
  • since relational DBMSs underlie the construction of many online transaction processing (OLTP) systems, which are usually the main data sources for a DW, using the relational model simplifies the procedure for loading and integrating data into the warehouse;
  • when adding new data dimensions, there is no need to carry out a complex physical reorganization of the warehouse, unlike, for example, multidimensional DWs;
  • a high level of data protection and extensive access-rights differentiation capabilities are provided.

The main drawback of relational data warehouses is that when a high level of data generalization and hierarchical dimensions are used, aggregate tables begin to «multiply» in such warehouses. As a result, the query execution speed of the relational warehouse slows down.

At the same time, in multidimensional warehouses, where data is stored in the form of multidimensional cubes, this problem practically does not arise, and in most cases a higher query execution speed can be achieved.

Thus, choosing the relational model when building a DW is advisable in the following cases.

  • The volume of stored data is significant (multidimensional DWs become inefficient).
  • The dimension hierarchy is simple (in other words, there is little aggregated data).
  • Frequent changes to data dimensionality are required. With the relational model, one can simply add new tables, whereas with the multidimensional model a complex restructuring of the warehouse's physical structure would be required.

See also

  • Relational database
  • Data warehouse
  • DBMS
created: 2021-03-13
updated: 2026-03-09
206



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Databases, knowledge and data warehousing. Big data, DBMS and SQL and noSQL"

Terms: Databases, knowledge and data warehousing. Big data, DBMS and SQL and noSQL