Docsity

Study Notes for Data mining and Data Warehouse, Study notes of Database Management Systems (DBMS)

Toggle sidebar
bg1
1
UNIT-4
What does Data Warehouse (DW) mean?
A data warehouse (DW) is a collection of corporate information and data derived
from operational systems and external data sources. A data warehouse is designed
to support business decisions by allowing data consolidation, analysis and
reporting at different aggregate levels. Data is populated into the DW through the
processes of extraction, transformation and loading.
The data warehouse architecture was born in the 1980s as an architectural model
designed to support the flow of data from operational systems to decision support
systems. These systems require analysis of large amounts of heterogeneous data
accumulated by companies over time.
In a data warehouse, data from many heterogeneous sources is extracted into a
single area, transformed according to the decision support system needs and stored
into the warehouse. For example, a company stores information pertaining to its
employees, their salaries, developed products, customer information, sales and
invoices. The CEO might want to ask a question pertaining to the latest cost-
reduction measures; the answers will involve analysis of all of this data. This is a
main service of the data warehouse, i.e., allowing executives to reach business
decisions based on all these disparate raw data items.
Thus, a data warehouse contributes to future decision making. As in the above
example, a firm administrator can query warehouse data to find out the market
demand of a particular product, sales data by geographical region or answers other
inquiries. This provides insight about required steps to more effectively market a
particular product. Unlike an operational data store, a data warehouse contains
aggregate historical data, which may be analyzed to reach critical business
decisions. Despite associated costs and effort, most major corporations today use
data warehouses.
Characteristics of Data warehouse
A data warehouse has following characteristics:
• Subject-Oriented
• Integrated
• Time-variant
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d

Partial preview of the text

Download Study Notes for Data mining and Data Warehouse and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

UNIT- 4

What does Data Warehouse (DW) mean? A data warehouse (DW) is a collection of corporate information and data derived from operational systems and external data sources. A data warehouse is designed to support business decisions by allowing data consolidation, analysis and reporting at different aggregate levels. Data is populated into the DW through the processes of extraction, transformation and loading. The data warehouse architecture was born in the 1980s as an architectural model designed to support the flow of data from operational systems to decision support systems. These systems require analysis of large amounts of heterogeneous data accumulated by companies over time. In a data warehouse, data from many heterogeneous sources is extracted into a single area, transformed according to the decision support system needs and stored into the warehouse. For example, a company stores information pertaining to its employees, their salaries, developed products, customer information, sales and invoices. The CEO might want to ask a question pertaining to the latest cost- reduction measures; the answers will involve analysis of all of this data. This is a main service of the data warehouse, i.e., allowing executives to reach business decisions based on all these disparate raw data items. Thus, a data warehouse contributes to future decision making. As in the above example, a firm administrator can query warehouse data to find out the market demand of a particular product, sales data by geographical region or answers other inquiries. This provides insight about required steps to more effectively market a particular product. Unlike an operational data store, a data warehouse contains aggregate historical data, which may be analyzed to reach critical business decisions. Despite associated costs and effort, most major corporations today use data warehouses. Characteristics of Data warehouse A data warehouse has following characteristics:

  • Subject-Oriented
  • Integrated
  • Time-variant
  • Non-volatile Subject-Oriented A data warehouse is subject oriented as it offers information regarding a theme instead of companies' ongoing operations. These subjects can be sales, marketing, distributions, etc. A data warehouse never focuses on the ongoing operations. Instead, it put emphasis on modeling and analysis of data for decision making. It also provides a simple and concise view around the specific subject by excluding data which not helpful to support the decision process. Integrated In Data Warehouse, integration means the establishment of a common unit of measure for all similar data from the dissimilar database. The data also needs to be stored in the Datawarehouse in common and universally acceptable manner. A data warehouse is developed by integrating data from varied sources like a mainframe, relational databases, flat files, etc. Moreover, it must keep consistent naming conventions, format, and coding. This integration helps in effective analysis of data. Consistency in naming conventions, attribute measures, encoding structure etc. have to be ensured. Consider the following example:

period and offers information from the historical point of view. It contains an element of time, explicitly or implicitly. One such place where Datawarehouse data display time variance is in in the structure of the record key. Every primary key contained with the DW should have either implicitly or explicitly an element of time. Like the day, week month, etc. Another aspect of time variance is that once data is inserted in the warehouse, it can't be updated or changed. Non-volatile Data warehouse is also non-volatile means the previous data is not erased when new data is entered in it. Data is read-only and periodically refreshed. This also helps to analyze historical data and understand what & when happened. It does not require transaction process, recovery and concurrency control mechanisms. Activities like delete, update, and insert which are performed in an operational application environment are omitted in Data warehouse environment. Only two types of data operations performed in the Data Warehousing are

  1. Data loading
  2. Data access Here, are some major differences between Application and Data Warehouse Operational Application Data Warehouse Complex program must be coded to make sure that data upgrade processes maintain high integrity of the final product. This kind of issues does not happen because data update is not performed. Data is placed in a normalized form to ensure minimal redundancy. Data is not stored in normalized form.

Technology needed to support issues of transactions, data recovery, rollback, and resolution as its deadlock is quite complex. It offers relative simplicity in technology. Datawarehouse Components The data warehouse is based on an RDBMS server which is a central information repository that is surrounded by some key components to make the entire environment functional, manageable and accessible There are mainly five components of Data Warehouse:

These Extract, Transform, and Load tools may generate cron jobs, background jobs, Cobol programs, shell scripts, etc. that regularly update data in datawarehouse. These tools are also helpful to maintain the Metadata. These ETL Tools have to deal with challenges of Database & Data heterogeneity. Metadata The name Meta Data suggests some high- level technological concept. However, it is quite simple. Metadata is data about data which defines the data warehouse. It is used for building, maintaining and managing the data warehouse. In the Data Warehouse Architecture, meta-data plays an important role as it specifies the source, usage, values, and features of data warehouse data. It also defines how data can be changed and processed. It is closely connected to the data warehouse. For example, a line in sales database may contain: 4030 KJ732 299. This is a meaningless data until we consult the Meta that tell us it was

  • Model number: 4030
  • Sales Agent ID: KJ
  • Total sales amount of $299. Therefore, Meta Data are essential ingredients in the transformation of data into knowledge. Metadata helps to answer the following questions
  • What tables, attributes, and keys does the Data Warehouse contain?
  • Where did the data come from?
  • How many times do data get reloaded?
  • What transformations were applied with cleansing? Metadata can be classified into following categories:
  1. Technical Meta Data : This kind of Metadata contains information about warehouse which is used by Data warehouse designers and administrators.
  1. Business Meta Data: This kind of Metadata contains detail that gives end- users a way easy to understand information stored in the data warehouse. Query Tools One of the primary objects of data warehousing is to provide information to businesses to make strategic decisions. Query tools allow users to interact with the data warehouse system. These tools fall into four different categories:
  2. Query and reporting tools
  3. Application Development tools
  4. Data mining tools
  5. OLAP tools 1. Query and reporting tools: Query and reporting tools can be further divided into
  • Reporting tools
  • Managed query tools Reporting tools: Reporting tools can be further divided into production reporting tools and desktop report writer.
  1. Report writers: This kind of reporting tool are tools designed for end-users for their analysis.
  2. Production reporting: This kind of tools allows organizations to generate regular operational reports. It also supports high volume batch jobs like printing and calculating. Some popular reporting tools are Brio, Business Objects, Oracle, PowerSoft, SAS Institute. Managed query tools: This kind of access tools helps end users to resolve snags in database and SQL and database structure by inserting meta-layer between users and database. 2. Application development tools:

At its core, the data warehouse is a database that stores all enterprise data and makes it accessible for reporting in a simplified and optimized manner. Naturally, this means you need to decide on which type of database you will use to store your data warehouse. There are four basic types of databases you can for this purpose: Typical Relational Databases : These are the row-based databases you probably use on a day-to-day basis and include Microsoft SQL Server, SAP, Oracle, and IBM DB2. Common relational databases are usually used for transactional systems, but you can use multiple databases running in parallel to serve as collective storage for your data warehouse, making your repository highly scalable. Analytics Databases: These are databases, specifically designed for the storage of data to maintain and manage analytics, are commonly used as data warehouse storage. Major brand names in this category include Teradata and Greenplum. Data Warehouse Appliances: Not exactly a type of storage, numerous vendors now provide appliances which provide both software to manage the data warehouse and hardware for storage. These appliances come pre-installed with a database management system. Major brand names include SAP Hana, Oracle Exadata, and IBM Netezza. Cloud-hosted Databases: With the increasing focus on cloud, databases too can be hosted and accessed on the cloud, meaning that you don’t need to purchase hardware to install your data warehouse. Major brand names include Amazon Redshift, Microsoft Azure SQL, and Google BigQuery – although Amazon dominates the landscape, capturing over two-thirds of the market share. Check out Teradata’s comprehensive whitepaper if you’re having trouble deciding on which DBMS to choose for your data warehouse.

2. Extract-Transform-Load (ETL) Tools Often considered the backbone of data warehousing, you will need an ETL tool to extract data from disparate source systems across the enterprise, transform this data to convert it in a format suited for your data warehouse, and load it into your data warehouse. While that covers the broad strokes, your ETL tool of choice will determine: - The time you spent extracting data - Methods of extraction - Type of transformations you’ll apply and the ease with which you’ll do so - Business rule definition to validate your data and clean it, so the end-product analytics are enhanced

  • Populating missing data
  • Defining information delivery from your central repository to your business intelligence applications However, developing ETL scripts to manage these tasks takes considerable time. Your best bet to minimize implementation time is to go with an ETL tool that auto- generates ETL code while allowing you to perform all associated actions visually. You could drag and drop tables in a visual designer, specify source and target databases, and configure validations and transformations anywhere in the flow as per business requirements. 3. Metadata Metadata refers to data that defines the data warehouse and provide context to data. A record in your customer database may look like: Robin 76 13,000 94,923. This data is not comprehensible unless you review associated metadata: Customer Name: Robin Purchase SKU: 76 Purchase Quantity: 13, Order Amount: $94,923. Besides providing business context as shown in the above example, metadata also contains information about:
  • Source data systems
  • The number of times data has been changed or reloaded from the source
  • The transformations or operations that were applied to source data when loading into the data warehouse
  • The overall picture, i.e., the tables, keys, and attributes that reside in the repository Metadata is a critical EDW component for both business and technical teams to make sense of the data contained within and convert it into information. 4. Data Warehouse Access Tools

When starting a data warehouse project, you should ideally choose a solution that helps you bring together each component of the data warehouse to form a unified whole. From facilitating requirements gathering, prototyping of reports, ETL processes, data modeling, metadata management, to data visualization, your preferred tool should bring it all together, while providing automation to enhance the creation of your EDW. Data Warehouse Architecture Data warehouses and their architectures vary depending upon the situation:-

1. Three-Tier Data Warehouse Architecture Data warehouses often adopt a three – tier architecture, 1 Bottom tier 2 Middle tier 3 Top tier

Data Warehouse Architecture 1 Bottom tier The bottom tier of the architecture is the data warehouse database server.It is the relational database system. Data is feed into bottom tier by some back-end tools and utilities. Function performed by back end tools and utilities are:- 1 Data Extraction 2 Data Cleaning 3 Data Transformation 4 Load 5 Refresh 2 Middle tier

It consists of the Top, Middle and Bottom Tier.

  1. Bottom Tier: The database of the Datawarehouse servers as the bottom tier. It is usually a relational database system. Data is cleansed, transformed, and loaded into this layer using back-end tools.
  2. Middle Tier: The middle tier in Data warehouse is an OLAP server which is implemented using either ROLAP or MOLAP model. For a user, this application tier presents an abstracted view of the database. This layer also acts as a mediator between the end-user and the database.
  3. Top-Tier: The top tier is a front-end client layer. Top tier is the tools and API that you connect and get data out from the data warehouse. It could be Query tools, reporting tools, managed query tools, Analysis tools and Data mining tools. What is Multidimensional schemas?

Multidimensional schema is especially designed to model data warehouse systems. The schemas are designed to address the unique needs of very large databases designed for the analytical purpose (OLAP). Types of Data Warehouse Schema: Following are 3 chief types of multidimensional schemas each having its unique advantages.

  • Star Schema
  • Snowflake Schema
  • Galaxy Schema What is a Star Schema? The star schema is the simplest type of Data Warehouse schema. It is known as star schema as its structure resembles a star. In the Star schema, the center of the star can have one fact tables and numbers of associated dimension tables. It is also known as Star Join Schema and is optimized for querying large data sets.

What is a Snowflake Schema? A Snowflake Schema is an extension of a Star Schema, and it adds additional dimensions. It is called snowflake because its diagram resembles a Snowflake. The dimension tables are normalized which splits data into additional tables. In the following example, Country is further normalized into an individual table. Characteristics of Snowflake Schema:

  • The main benefit of the snowflake schema it uses smaller disk space.
  • Easier to implement a dimension is added to the Schema
  • Due to multiple tables query performance is reduced
  • The primary challenge that you will face while using the snowflake Schema is that you need to perform more maintenance efforts because of the more lookup tables. Star Vs Snowflake Schema: Key Differences

Star Schema Snow Flake Schema Hierarchies for the dimensions are stored in the dimensional table. Hierarchies are divided into separate tables. It contains a fact table surrounded by dimension tables. One fact table surrounded by dimension table which are in turn surrounded by dimension table In a star schema, only single join creates the relationship between the fact table and any dimension tables. A snowflake schema requires many joins to fetch the data. Simple DB Design. Very Complex DB Design. Denormalized Data structure and query also run faster. Normalized Data Structure. High level of Data redundancy Very low-level data redundancy Single Dimension table contains aggregated data. Data Split into different Dimension Tables. Cube processing is faster. Cube processing might be slow because of the complex join. Offers higher performing queries using Star Join Query Optimization. Tables may be connected with multiple dimensions. The Snow Flake Schema is represented by centralized fact table which unlikely connected with multiple dimensions. What is a Galaxy schema?