Docsity

On-Line Application Processing - Database Systems - Lecture Slides, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download On-Line Application Processing - Database Systems - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

On-Line Application Processing

Warehousing Data Cubes Data Mining

Overview

  • Traditional database systems are tuned to many, small, simple queries.
  • Some new applications use fewer, more time- consuming, analytic queries.
  • New architectures have been developed to handle analytic queries efficiently.

OLTP

  • Most database operations involve On-Line Transaction Processing (OTLP). - Short, simple, frequent queries and/or modifications, each involving a small number of tuples. - Examples: Answering queries from a Web interface, sales at cash registers, selling airline tickets.

OLAP

  • On-Line Application Processing (OLAP, or “analytic”) queries are, typically: - Few, but complex queries --- may run for hours. - Queries do not depend on having an absolutely up-to-date database.

Common Architecture

  • Databases at store branches handle OLTP.
  • Local store databases copied to a central warehouse overnight.
  • Analysts use the warehouse for OLAP.

Star Schemas

  • A star schema is a common organization for data at a warehouse. It consists of: 1. Fact table : a very large accumulation of facts such as sales.  Often “insert-only.” 2. Dimension tables : smaller, generally static information about the entities involved in the facts.

Example -- Continued

  • The dimension tables include information about the bar, beer, and drinker “dimensions”: Bars(bar, addr, license) Beers(beer, manf) Drinkers(drinker, addr, phone)

Visualization – Star Schema

11

Dimension Table (Beers) Dimension Table (etc.)

Dimension Table (Bars) Dimension Table (Drinkers)

Fact Table - Sales

Dimension Attrs. Dependent Attrs.

Example: Dependent Attribute

  • price is the dependent attribute of our example Sales relation.
  • It is determined by the combination of dimension attributes: bar, beer, drinker, and the time (combination of day and time-of-day attributes).

Approaches to Building

Warehouses

1. ROLAP = “relational OLAP”: Tune a relational DBMS to support star schemas. 2. MOLAP = “multidimensional OLAP”: Use a specialized DBMS with a model such as the “data cube.”

Visualization -- Data Cubes

16

price

bar

beer

drinker Docsity.com

Marginals

  • The data cube also includes aggregation (typically SUM) along the margins of the cube.
  • The marginals include aggregations over one dimension, two dimensions,…

Example: Marginals

  • Our 4-dimensional Sales cube includes the sum of price over each bar, each beer, each drinker, and each time unit (perhaps days).
  • It would also have the sum of price over all bar-beer pairs, all bar-drinker-day triples,…

Structure of the Cube

  • Think of each dimension as having an additional value *.
  • A point with one or more *’s in its coordinates aggregates over the dimensions with the *’s.
  • Example: Sales(”Joe’s Bar”, ”Bud”, *, *) holds the sum, over all drinkers and all time, of the Bud consumed at Joe’s.