Saturday, April 21, 2012

Semantic layer demystified

Reports use queries to extract data from data stores, and then present the results to a user. At a low level, there are two main ways of creating queries.

1. Using a query language appropriate to the data store, e.g. SQL or MDX.

2. Use of semantic layer

What is a semantic layer?

An increasing number of reporting tools allow users to make use of a “semantic layer”.  Some vendors give the semantic layer a name that is specific to their particular product (for example, Business Objects calls it a “universe”) while others describe it as a business model or metadata layer.  A semantic layer is a business representation of corporate data that helps end users access data using common business terms.  The aim is to insulate users from the technical details of the data store and allow them to create queries in terms that are familiar and meaningful.

How is semantic layer created?

The semantic layer is configured by a person who has knowledge of both the data store and the reporting needs of the business. The person creating the semantic layer chooses to expose appropriate fields in the data store as “business fields”, and to hide any fields that are not relevant.  Each business field is given a friendly, meaningful name, and the business fields are organized in a way that will make sense to business users (they do not have to be organized according to the structure of the data store). The person creating the semantic layer can also create predefined filters corresponding to common restrictions that users may wish to include within queries.  For instance, a pre-defined condition named “Filter: Current Year” would restrict the results of a query to data for the current year.

How is semantic layer used?

With a semantic layer in place, the user sees the data store not as a collection of tables but as a single list of familiar “business fields” which are organized into a meaningful folder structure.   Users can specify a query simply by selecting a set of business fields and pre-defined conditions, and can see the results on the screen.   Users can then use point-and-click techniques to customize the appearance of the report and the way in which the data is presented.  For instance they can choose to have data presented in tables, crosstabs or graphs, and can add headings, text and images. This technique is pretty powerful.  It allows us to offer business users a “self-service” capability to create a wide variety of different queries and reports themselves, without the need to wait for developers to become available.   Users can create reports without the need to learn a query language or understand the structure of the data store.  From an IT perspective, this is sounding great – we can let business users create their own reports as and when they need them

Reasons for use of semantic layer

Semantic layers deliver a number of benefits, including the following:

• Ad hoc query environment that uses a semantic layer allows developers and analysts to work interactively with business users to prototype the reports that are needed.   This can be immensely valuable.

• The presence of a semantic layer simplifies the creation of queries and increases productivity, accuracy and consistency between reports.  This is clearly of benefit to all users who wish to create reports, not just business users.

• Knowledge of the mappings between business fields and database fields resides in the semantic layer, not in the heads of developers.   This makes it much easier for developers to understand and maintain reports that have been created by others.

• A semantic layer removes the dependency between queries and the data store.  This is because queries that are built using a semantic layer are constructed (and stored) as sets of business fields and predefined conditions rather than as statements in the query language.  Consequently, a change to the data store can often be handled globally, without the need to modify individual reports.  If you’ve ever had to modify the SQL within hundreds of reports to accommodate a database design change, or had to change reports to take data from a different source you’ll know what a benefit this is.



Post a Comment

Copyright © . It's my turf! - Posts · Comments
Theme Template by BTDesigner · Powered by Blogger