Dimensions, Hierarchies and Levels

17. January 2010

Dimension

A dimension, as it is possible to evalute from the name, used in OLAP databases to give the user one more point of view to information. An OLAP database can have many dimensions, which makes possible to read the company statistics easily and clearly. Dimension types are as below;

  • Star Schema: Dimension from single table
  • Snowflake Schema: Dimension from multiple tables
  • Parent-Child: Dimension from single table with parent-child hierarchy

Hierarchy

Hierarchy is actualy another aspect of a dimension. Think of a dimension which is created to see the cities in a geographical view as below.

  • Turkey
    • Marmara
      • Istanbul
      • Bursa
      • Izmit
    • Ege
      • Izmir
      • Balikesir
      • Manisa

And lets have another point of view such like population density on the same dimension.

  • Turkey
    • High Populated
      • Istanbul
      • Izmır
    • Medium Populated
      • Bursa
      • Izmit
    • Low Populated
      • Balikesir
      • Manisa

So we can name the dimensions with hierarchy extension like "State.Geo" and "State.Population". But to have different hierarchies the required data should be provided in OLTP database as below.

ID City State Population
1 Istanbul Marmara High
2 Bursa Marmara Medium
3 Izmit Marmara Medium
4 Izmir Ege High
5 Balikesir Ege Low
6 Manisa Ege Low

Levels

Level is the steps of hierarchy which makes it is possible to create different hierarchies on a dimension. Levels of above example are "Marmara" and "Ege" for geographical view, "High Populated", "Medium Populated" and "Low Populated" for population density view. As I expressed above that to create different hierarchy data should be provided from OLTP, this is because levels are the columns of table(s).

General

Basic Rules of Object-Oriented Programming

24. October 2009

Object-Oriented Principles are first defined by Alan Kay in 1993.

  1. Everything is an object.
  2. Computation is performed by objects communicating with each other, requesting that other objects perform actions. Objects communicate by sending and receiving messages. A message is a request for action bundled with whatever arguments may be necessary to complete the task.
  3. Each object has its own memory, which consists of other objects.
  4. Every object is an instance of a class. A class simply represents a grouping of similar objects, such as integers or lists.
  5. The class is the repository for behavior associated with an object. That is, all objects that are instances of the same class can perform the same actions.
  6. Classes are organized into a singly rooted tree structure, called the inheritance hierarchy. Memory and behavior associated with instances of a class are automatically available to any class associated with a descendant in this tree structure.

General