Trending November 2023 # What Is Bdd Testing? Framework Example # Suggested December 2023 # Top 11 Popular

You are reading the article What Is Bdd Testing? Framework Example updated in November 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested December 2023 What Is Bdd Testing? Framework Example

What is BDD (Behavior Driven Development) Testing?

BDD (Behavior-driven development) Testing is a technique of agile software development and is as an extension of TDD, i.e., Test Driven Development. In BDD, test cases are written in a natural language that even non-programmers can read.

How BDD Testing works?

Consider you are assigned to create Funds Transfer module in a Net Banking application.

There are multiple ways to test it

Fund Transfer should take place if there is enough balance in source account

Fund Transfer should take place if the destination a/c details are correct

Fund Transfer should take place if transaction password / rsa code / security authentication for the transaction entered by user is correct

Fund Transfer should take place even if it’s a Bank Holiday

Fund Transfer should take place on a future date as set by the account holder

The Test Scenario become more elaborate and complex as we consider additional features like transfer amount X for an interval Y days/months , stop schedule transfer when the total amount reaches Z , and so on

The general tendency of developers is to develop features and write test code later. As, evident in above case, Test Case development for this case is complex and developer will put off Testing till release , at which point he will do quick but ineffective testing.

To overcome this issue (Behavior Driven Development) BDD was conceived. It makes the entire testing process easy for a developer

In BDD, whatever you write must go into Given-When-Then steps. Lets consider the same example above in BDD

Given that a fund transfer module in net banking application has been developed And I am accessing it with proper authentication WhenI shall transfer with enough balance in my source account Or I shall transfer on a Bank Holiday Or I shall transfer on a future date And destination a/c details are correct And transaction password/rsa code / security authentication for the transaction is correct Then amount must be transferred And the event will be logged in log file

Isn’t it easy to write and read and understand? It covers all possible test cases for the fund transfer module and can be easily modified to accommodate more. Also, it more like writing documentation for the fund transfer module.

What is REST API Testing?

As REST has become quite a popular style for building APIs nowadays, it has become equally important to automate REST API test cases along with UI test cases. So basically, these REST API testing involves testing of CRUD (Create-Read-Update-Delete) actions with methods POST, GET, PUT, and DELETE respectively.

What is Behave?

Behave is one of the popular Python BDD test frameworks.

Let’s see how does Behave function:

Feature files are written by your Business Analyst / Sponsor / whoever with your behavior scenarios in it. It has a natural language format describing a feature or part of a feature with representative examples of expected outcomes

These Scenario steps are mapped with step implementations written in Python.

And optionally, there are some environmental controls (code to run before and after steps, scenarios, features or the whole shooting match).

Let’s get started with the setup of our automation test framework with Behave:

Setting up BDD Testing Framework Behave on Windows Installation:

Execute the following command on command prompt to install behave

pip install behave

Project Setup:

Create a New Project

Create the following Directory Structure:

Feature Files:

So let’s build our feature file Sample_REST_API_Testing.feature having feature as Performing CRUD operations on ‘posts’ service.

Example POST scenario

When: I set HEADER param request content type as "application/json." And set request body Then: Then I receive valid HTPP response code 201

Similarly, you can write the remaining Scenarios as follows:

Sample_REST_API_Testing.feature Feature: Test CRUD methods in Sample REST API testing framework Background: Given I set sample REST API url Scenario: POST post example Given I Set POST posts api endpoint When I Set HEADER param request content type as "application/json." And Set request Body And Send a POST HTTP request Then I receive valid HTTP response code 201 And Response BODY "POST" is non-empty. Scenario: GET posts example Given I Set GET posts api endpoint "1" When I Set HEADER param request content type as "application/json." And Send GET HTTP request Then I receive valid HTTP response code 200 for "GET." And Response BODY "GET" is non-empty Scenario: UPDATE posts example Given I Set PUT posts api endpoint for "1" When I Set Update request Body And Send PUT HTTP request Then I receive valid HTTP response code 200 for "PUT." And Response BODY "PUT" is non-empty Scenario: DELETE posts example Given I Set DELETE posts api endpoint for "1" When I Send DELETE HTTP request Then I receive valid HTTP response code 200 for "DELETE." Steps Implementation

Now, for feature Steps used in the above scenarios, you can write implementations in Python files in the “steps” directory.

Behave framework identifies the Step function by decorators matching with feature file predicate. For Example, Given predicate in Feature file Scenario searches for step function having decorator “given.” Similar matching happens for When and Then. But in the case of ‘But,’ ‘And,’ Step function takes decorator same as it’s preceding step. For Example, If ‘And’ comes for Given, matching step function decorator is @given.

For Example, when step for POST can be implemented as follows:

@when (u'I Set HEADER param request content type as "{header_conent_type}"') Mapping of When, here notice “application/json” is been passed from feature file for "{header_conent_type}” . This is called as parameterization def step_impl (context, header_conent_type): This is step implementation method signature request_headers['Content-Type'] = header_conent_type Step implementation code, here you will be setting content type for request header

Similarly, the implementation of other steps in the step python file will look like this: from behave import given, when, then, step import requests api_endpoints = {} request_headers = {} response_codes ={} response_texts={} request_bodies = {} api_url=None @given(u'I set sample REST API url') def step_impl(context): global api_url # START POST Scenario @given(u'I Set POST posts api endpoint') def step_impl(context): api_endpoints['POST_URL'] = api_url+'/posts' print('url :'+api_endpoints['POST_URL']) @when(u'I Set HEADER param request content type as "{header_conent_type}"') def step_impl(context, header_conent_type): request_headers['Content-Type'] = header_conent_type #You may also include "And" or "But" as a step - these are renamed by behave to take the name of their preceding step, so: @when(u'Set request Body') def step_impl(context): request_bodies['POST']={"title": "foo","body": "bar","userId": "1"} #You may also include "And" or "But" as a step - these are renamed by behave to take the name of their preceding step, so: @when(u'Send POST HTTP request') def step_impl(context): # sending get request and saving response as response object response =['POST_URL'], json=request_bodies['POST'], headers=request_headers) # extracting response text response_texts['POST']=response.text print("post response :"+response.text) # extracting response status_code statuscode = response.status_code response_codes['POST'] = statuscode @then(u'I receive valid HTTP response code 201') def step_impl(context): print('Post rep code ;'+str(response_codes['POST'])) assert response_codes['POST'] is 201 # END POST Scenario # START GET Scenario @given(u'I Set GET posts api endpoint "{id}"') def step_impl(context,id): api_endpoints['GET_URL'] = api_url+'/posts/'+id print('url :'+api_endpoints['GET_URL']) #You may also include "And" or "But" as a step - these are renamed by behave to take the name of their preceding step, so: @when(u'Send GET HTTP request') def step_impl(context): # sending get request and saving response as response object # extracting response text response_texts['GET']=response.text # extracting response status_code statuscode = response.status_code response_codes['GET'] = statuscode @then(u'I receive valid HTTP response code 200 for "{request_name}"') def step_impl(context,request_name): print('Get rep code for '+request_name+':'+ str(response_codes[request_name])) assert response_codes[request_name] is 200 @then(u'Response BODY "{request_name}" is non-empty') def step_impl(context,request_name): print('request_name: '+request_name) print(response_texts) assert response_texts[request_name] is not None # END GET Scenario #START PUT/UPDATE @given(u'I Set PUT posts api endpoint for "{id}"') def step_impl(context,id): api_endpoints['PUT_URL'] = api_url + '/posts/'+id print('url :' + api_endpoints['PUT_URL']) @when(u'I Set Update request Body') def step_impl(context): request_bodies['PUT']={"title": "foo","body": "bar","userId": "1","id": "1"} @when(u'Send PUT HTTP request') def step_impl(context): response = requests.put(url=api_endpoints['PUT_URL'], json=request_bodies['PUT'], headers=request_headers) # extracting response text response_texts['PUT'] = response.text print("update response :" + response.text) # extracting response status_code statuscode = response.status_code response_codes['PUT'] = statuscode #END PUT/UPDATE #START DELETE @given(u'I Set DELETE posts api endpoint for "{id}"') def step_impl(context,id): api_endpoints['DELETE_URL'] = api_url + '/posts/'+id print('url :' + api_endpoints['DELETE_URL']) @when(u'I Send DELETE HTTP request') def step_impl(context): # sending get request and saving response as response object response = requests.delete(url=api_endpoints['DELETE_URL']) # extracting response text response_texts['DELETE'] = response.text print("DELETE response :" + response.text) # extracting response status_code statuscode = response.status_code response_codes['DELETE'] = statuscode #END DELETE Running the Tests

Now, we are done with our test script development part, so let’s run our tests:

Execute the following command on command prompt to run our feature file

This will display test execution results as follows:

Report display on the console

Let’s see one more cool thing here.

As users always prefer to see test results in a more readable and presentable format, let’s have reports in HTML format with the help of Allure.


And now execute the following command:

For reports

This will generate your test results report in the presentable and informative format like this:

Test Report in HTML Format

Test Report displaying individual Scenario result


BDD is Behavior-driven development. It is one of the techniques of agile software development.

REST has become quite a popular style for building APIs nowadays, it has become equally important to automate REST API test cases along with UI test cases.

BDD has a natural language format describing a feature or part of a feature with representative examples of expected outcomes

Behave framework identifies the Step function by decorators matching with feature file predicate

Examples of BDD Testing Frameworks: 1) Cucumber 2) SpecFlow 3) Quantum 4) JBehave 5) Codeception

You're reading What Is Bdd Testing? Framework Example

What Is Endurance Testing In Software Testing? (With Example)

Endurance Testing

Endurance Testing is non-functional type of software testing where a software is tested with high load extended over a significant amount of time to evaluate the behavior of software application under sustained use. The main purpose of endurance testing is to ensure that the application is capable enough to handle extended load without any deterioration of response time.

Endurance means capacity so in other words, you can term Endurance Testing as Capacity Testing.

In this tutorial, you will learn-

Goals of Endurance Testing

Primary goal of Endurance testing is to check for memory leaks.

To discover how the system performs under sustained usage.

To ensure that after a long period, the system response time will remain the same or better than the start of the test.

To determine the number of users and/or transactions a given system will support and meet performance goals.

Endurance testing is generally done by either overloading the system or by reducing certain system resources and evaluating the consequences.

It is performed to ensure that defects or memory leaks do not occur after what is considered to be a relatively “normal” usage period.

What to monitor in Endurance Testing

In Endurance Testing following things are tested.

Test memory leakage– Checks are done to verify if there is any memory leakage in the application, which can cause crashing of the system or O.S.

Test connection closure between the layer of the system – If the connection between the layers of the system is not closed successfully, it may stall some or all modules of the system.

Test database connection close successfully– If the database connection is not closed successfully, may result in system crash

Test response time – System is tested for the response time of the system as the application becomes less efficient as a result of the prolonged use of the system.

How to perform Endurance Testing

Below is the basic testing approach for Endurance Test

Testing Environment – Identify the hardware, software, operating system require for the endurance testing, assigning roles and responsibilities within the team, etc. The environment should be ready before the test execution. You also need to estimate common database production size and yearly growth. This is required as such you need to test how your application will respond after a year, two or five.

Creating the Test Plan, Scenarios – Based on nature of testing – manual or automation or combination of both, Test Case design, reviews, and execution should be planned. Testing to stress the system, break point testing, etc. should also be part of the test plan. Testing to stress the system determines the break point in the application.

Test Estimation – Provide the estimation of how long it will take to complete the testing phase. It should be analyzed on the basis of a number of testers involved and the number of test cycles required.

Risk Analysis –Analyzing the risk and taking an appropriate action for the prevention. Prioritization of test cases as per the Risk factor and identify the below risk and issues tester may phase during the endurance test.

Will performance remain consistent over time?

Are there other minor issues that have not yet been detected?

Is there external interference that was not addressed?

Test Schedule – Determine the budget, deliverables within the time frames. As Endurance Testing applies a huge but natural load arrangement of transactions to the system/application for a continuous period of time.

Endurance Testing Example

While Stress testing takes the tested system to its limits, Endurance testing takes the application to its limit over time.

For Example, the most complex issues – memory leaks, database server utilization, and unresponsive system – happen when software runs for an extended period of time. If you skip the endurance tests, your chances of detecting such defects prior to deployment are quite low.

Endurance Testing Tools



Apache JMeter





Rational Performance Tester

Advantages of Endurance Testing

It helps in determining how workload can the System Under Load handle.

Provides accurate data that customer can use to validate or enhance their infrastructure needs.

Identifies performance problems that may occur after a system has been running at a high level for longer period of time

Typical issues are identified in smaller targeted performance tests, which means it ensures application remain available even when there is huge load in a very short span time.

The endurance test is also used to check whether there is any performance degradation after a long period of execution

It is often hard to define how much stress is worth applying.

Endurance Testing could cause application and/or network failures that may result in significant disruption if Test Environment are not isolated.

Permanent Data loss or corruption can occur by over-stressing the system.

Resource utilization remains very high after the stress is removed.

Some application components fail to respond.

Unhandled exceptions are observed by the end user.


In Software Engineering, Endurance testing is a subset of load testing.

Endurance testing is a long process and sometimes last for even up to a year

Checks are done to verify

Test memory leakage

Test response time

Test database connection, etc.

What Is Stress Testing In Software Testing?

viewing products, adding and removing items from the cart, purchasing the product, etc.

The number of users is increased to the point, until the app crashes or fails and can no longer handle the traffic.

The results of the tests are examined to discover bottlenecks or drawbacks in the system, performance improvement or optimization areas, recovery mechanism, etc.

Tools for Stress Testing

LoadRunner − This tool from Hewlett-Packard Enterprise (HP) is widely used for load testing. The results shaped by LoadRunner are used as a benchmark. It works on the concept of recording and replaying users’ activities and then generates the desired load on the server. It simulates the real-world actions and determines the performance of the system or application by generating virtual load.

Jmeter − This is an open-source tool used for stress and performance testing. It is purely written in Java. It covers types of tests like load tests, functional tests, stress tests, etc. Jmeter requires JDK 5 or higher for functioning. It is mainly used to test web and web service applications. It was developed by Apache Software Foundation to test functional behavior and measure performance. It is also used to measure performance of a variety of services. It is originally used for testing web applications and File Transfer Protocol (FTP) applications. Now, it is also used for a functional test, database server test, etc. It is extremely easy and simple to use, one can get quickly acquainted with this tool. Being a pure Java application, Jmeter is platform independent. The test results can be viewed in different formats, such as chart, table, tree, etc. It supports all the basic protocols including HTTP, JDBC, LDAP, SOAP, and JMS.

Stress Tester − This tool helps in the extensive analysis of the performance of web applications. It is easy to use, and the results can be viewed in graphical format. It gives a good return on investment and does not even demand high-level scripting.

Neo Load − This is one of the most popular tools for testing web and mobile applications. It simulates thousands of users to evaluate the performance of the application under load and analyzes the response times. This tool supports cloud integrated performance, load and stress testing. Neo load is simple and easy to use, cost-effective, and offers good scalability. Moreover, it pinpoints the number of simultaneous users that the Internet, intranet or the mobile app can manage. It enables automated test design, thus providing faster test creation. It supports various protocols such as HTTP, HTTPS, SOAP, REST, Flex Push, AJAX Push, etc.

Metrics for Stress Testing

Metrics evaluate the performance of a system and are generally studied at the end of the stress test. Some commonly used metrics in stress testing are −

Scalability and performance

Pages per second − Number of pages requested per second.

Throughput − Response data size per second.

Rounds − Number of times test conditions were planned to number of times a client executed.

Application response

Hit Time − Average time taken to retrieve a page or an image.

Time to the first byte − Time taken to return the first byte of information.

Page time − Time taken to retrieve all the information in a page.


Failed connections − Number of failed connections refused by client.

Failed rounds − Number of rounds failed.

Failed hits − Number of failed attempts taken by the system.


The sole aim of stress testing is to determine system’s performance under extreme conditions or load. It evaluates system resources like memory, processor, network, etc. It also examines the ability of a system to recover from a failure or a crash. It checks if the system displays proper error message upon facing stress.

What Is Er Modeling? Learn With Example

What is ER Modeling?

Entity Relationship Model (ER Modeling) is a graphical approach to database design. It is a high-level data model that defines data elements and their relationship for a specified software system. An ER model is used to represent real-world objects.

An Entity is a thing or object in real world that is distinguishable from surrounding environment. For example, each employee of an organization is a separate entity. Following are some of major characteristics of entities.

An entity has a set of properties.

Entity properties can have values.

Let’s consider our first example again. An employee of an organization is an entity. If “Peter” is a programmer (an employee) at Microsoft, he can have attributes (properties) like name, age, weight, height, etc. It is obvious that those do hold values relevant to him.

Each attribute can have Values. In most cases single attribute have one value. But it is possible for attributes have multiple values also. For example Peter’s age has a single value. But his “phone numbers” property can have multiple values.

Entities can have relationships with each other. Let’s consider the simplest example. Assume that each Microsoft Programmer is given a Computer. It is clear that that Peter’s Computer is also an entity. Peter is using that computer, and the same computer is used by Peter. In other words, there is a mutual relationship between Peter and his computer.

In Entity Relationship Modeling, we model entities, their attributes and relationships among entities.



Learn More

On Monday’s Website

Time Tracking


Drag & Drop


Free Trial

Forever Free Plan



Learn More

On Teamwork’s Website

Time Tracking


Drag & Drop


Free Trial

Forever Free Plan


JIRA Software

Learn More

On Jira Software Website

Time Tracking


Drag & Drop


Free Trial

Forever Free Plan

Enhanced Entity Relationship (EER) Model

Enhanced Entity Relationship (EER) Model is a high-level data model which provides extensions to original Entity Relationship (ER) model. EER Models supports more details design. EER Modeling emerged as a solution for modeling highly complex databases.

EER uses UML notation. UML is the acronym for Unified Modeling Language; it is a general-purpose modeling language used when designing object-oriented systems. Entities are represented as class diagrams. Relationships are represented as associations between entities. The diagram shown below illustrates an ER diagram using the UML notation.

Why use ER Model?

Now you may think why use ER modeling when we can simply create the database and all of its objects without ER modeling? One of the challenges faced when designing a database is the fact that designers, developers, and end-users tend to view data and its usage differently. If this situation is left unchecked, we can end up producing a database system that does not meet the requirements of the users.

Communication tools understood by all stakeholders(technical as well as non-technical users) are critical in producing database systems that meet the requirements of the users. ER models are examples of such tools.

ER diagrams also increase user productivity as they can be easily translated into relational tables.

Case Study: ER diagram for “MyFlix” Video Library

Let’s now work with the MyFlix Video Library database system to help understand the concept of ER diagrams. We will use this database for all hand-on in the remainder of this tutorial

MyFlix is a business entity that rents out movies to its members. MyFlix has been storing its records manually. The management now wants to move to a DBMS

Let’s look at the steps to develop EER diagram for this database-

Identify the entities and determine the relationships that exist among them.

Each entity, attribute, and relationship, should have appropriate names that can be easily understood by the non-technical people as well.

Relationships should not be connected directly to each other. Relationships should connect entities.

Each attribute in a given entity should have a unique name.

Entities in the “MyFlix” library

The entities to be included in our ER diagram are;

Members – this entity will hold member information.

Movies – this entity will hold information regarding movies

Categories – this entity will hold information that places movies into different categories such as “Drama”, “Action”, and “Epic” etc.

Movie Rentals – this entity will hold information that about movies rented out to members.

Payments – this entity will hold information about the payments made by members.

Defining the Relationships Among Entities

Members and movies

The following holds true regarding the interactions between the two entities.

A member can rent more than one movie in a given period.

A movie can be rented by more than one member in a given period.

From the above scenario, we can see that the nature of the relationship is many-to-many. Relational databases do not support many-to-many relationships. We need to introduce a junction entity. This is the role that the MovieRentals entity plays. It has a one-to-many relationship with the members table and another one-to-many relationship with movies table.

Movies and categories entities

The following holds true about movies and categories.

A movie can only belong to one category but a category can have more than one movie.

We can deduce from this that the nature of the relation between categories and movies table is one-to-many.

Members and payments entities

The following holds true about members and payments

A member can only have one account but can make a number of payments.

We can deduce from this that the nature of the relationship between members and payments entities is one-to-many.

Now lets create EER model using MySQL Workbench

Following window appears

Let’s look at the two objects that we will work with.

The table object allows us to create entities and define the attributes associated with the particular entity.

The place relationship button allows us to define relationships between entities.

The members’ entity will have the following attributes

Membership number

Full names


Date of birth

Physical address

Postal address

Let’s now create the members table

1.Drag the table object from the tools panel

2.Drop it in the workspace area. An entity named table 1 appears

Next ,

Change table 1 to Members

Edit the default idtable1 to membership_number

Do the same for all the attributes identified in members’ entity.

Your properties window should now look like this.

Repeat the above steps for all the identified entities.

Your diagram workspace should now look like the one shown below.

Lets create relationship between Members and Movie Rentals

Select the place relationship using existing columns too

Repeat above steps for other relationships. Your ER diagram should now look like this –


The full form of ER is Entity and Relationships Diagrams. They play a very important role in the database designing process. They serve as a non-technical communication tool for technical and non-technical people.

Entities represent real world things; they can be conceptual as a sales order or physical such as a customer.

All entities must be given unique names.

ER models also allow the database designers to identify and define the relations that exist among entities.

The entire ER Model is attached below. You can simply import it in MySQL Workbench

Paging In Operating System (Os): What Is, Advantages, Example

What is Paging in OS?

Paging is a storage mechanism that allows OS to retrieve processes from the secondary storage into the main memory in the form of pages. In the Paging method, the main memory is divided into small fixed-size blocks of physical memory, which is called frames. The size of a frame should be kept the same as that of a page to have maximum utilization of the main memory and to avoid external fragmentation. Paging is used for faster access to data, and it is a logical concept.

In this Paging tutorial, you will learn:

Example of Paging in OS

For example, if the main memory size is 16 KB and Frame size is 1 KB. Here, the main memory will be divided into the collection of 16 frames of 1 KB each.

There are 4 separate processes in the system that is A1, A2, A3, and A4 of 4 KB each. Here, all the processes are divided into pages of 1 KB each so that operating system can store one page in one frame.

At the beginning of the process, all the frames remain empty so that all the pages of the processes will get stored in a contiguous way.

In this example you can see that A2 and A4 are moved to the waiting state after some time. Therefore, eight frames become empty, and so other pages can be loaded in that empty blocks. The process A5 of size 8 pages (8 KB) are waiting in the ready queue.

In this example, you can see that there are eight non-contiguous frames which is available in the memory, and paging offers the flexibility of storing the process at the different places. This allows us to load the pages of process A5 instead of A2 and A4.

What is Paging Protection? Advantages of Paging

Easy to use memory management algorithm

No need for external Fragmentation

Swapping is easy between equal-sized pages and page frames.

Here, are drawback/ cons of Paging:

May cause Internal fragmentation

Page tables consume additonal memory.

Multi-level paging may lead to memory reference overhead.

What is Segmentation?

Segmentation method works almost similarly to paging, only difference between the two is that segments are of variable-length whereas, in the paging method, pages are always of fixed size.

A program segment includes the program’s main function, data structures, utility functions, etc. The OS maintains a segment map table for all the processes. It also includes a list of free memory blocks along with its size, segment numbers, and it’s memory locations in the main memory or virtual memory.

Advantages of Segmentation

Here, are pros/benefits of Segmentation

Offer protection within the segments

You can achieve sharing by segments referencing multiple processes.

Not offers internal fragmentation

Segment tables use lesser memory than paging

Here are cons/drawback of Segmentation

In segmentation method, processes are loaded/ removed from the main memory. Therefore, the free memory space is separated into small pieces which may create a problem of external fragmentation

Costly memory management algorithm


Paging is a storage mechanism that allows OS to retrieve processes from the secondary storage into the main memory in the form of pages.

The paging process should be protected by using the concept of insertion of an additional bit called Valid/Invalid bit.

Paging may cause Internal fragmentation

Segmentation method works almost similarly to paging, only difference between the two is that segments are of variable-length whereas, in the paging method, pages are always of fixed size.

You can achieve sharing by segments referencing multiple processes.

Segmentation is costly memory management algorithm

What Is Data Mart In Data Warehouse? Types & Example

What is Data Mart?

A Data Mart is focused on a single functional area of an organization and contains a subset of data stored in a Data Warehouse. A Data Mart is a condensed version of Data Warehouse and is designed for use by a specific department, unit or set of users in an organization. E.g., Marketing, Sales, HR or finance. It is often controlled by a single department in an organization.

Data Mart usually draws data from only a few sources compared to a Data warehouse. Data marts are small in size and are more flexible compared to a Datawarehouse.

In this tutorial, you will learn-

Why do we need Data Mart?

Data Mart helps to enhance user’s response time due to reduction in volume of data

It provides easy access to frequently requested data.

Data mart are simpler to implement when compared to corporate Datawarehouse. At the same time, the cost of implementing Data Mart is certainly lower compared with implementing a full data warehouse.

Compared to Data Warehouse, a datamart is agile. In case of change in model, datamart can be built quicker due to a smaller size.

A Datamart is defined by a single Subject Matter Expert. On the contrary data warehouse is defined by interdisciplinary SME from a variety of domains. Hence, Data mart is more open to change compared to Datawarehouse.

Data is partitioned and allows very granular access control privileges.

Data can be segmented and stored on different hardware/software platforms.

Types of Data Mart

There are three main types of data mart:

Dependent: Dependent data marts are created by drawing data directly from operational, external or both sources.

Independent: Independent data mart is created without the use of a central data warehouse.

Hybrid: This type of data marts can take data from data warehouses or operational systems.

Dependent Data Mart

A dependent data mart allows sourcing organization’s data from a single Data Warehouse. It is one of the data mart example which offers the benefit of centralization. If you need to develop one or more physical data marts, then you need to configure them as dependent data marts.

Dependent Data Mart in data warehouse can be built in two different ways. Either where a user can access both the data mart and data warehouse, depending on need, or where access is limited only to the data mart. The second approach is not optimal as it produces sometimes referred to as a data junkyard. In the data junkyard, all data begins with a common source, but they are scrapped, and mostly junked.

Dependent Data Mart

Independent Data Mart

An independent data mart is created without the use of central Data warehouse. This kind of Data Mart is an ideal option for smaller groups within an organization.

An independent data mart has neither a relationship with the enterprise data warehouse nor with any other data mart. In Independent data mart, the data is input separately, and its analyses are also performed autonomously.

Implementation of independent data marts is antithetical to the motivation for building a data warehouse. First of all, you need a consistent, centralized store of enterprise data which can be analyzed by multiple users with different interests who want widely varying information.

Independent Data Mart

Hybrid Data Mart:

A hybrid data mart combines input from sources apart from Data warehouse. This could be helpful when you want ad-hoc integration, like after a new group or product is added to the organization.

It is the best data mart example suited for multiple database environments and fast implementation turnaround for any organization. It also requires least data cleansing effort. Hybrid Data mart also supports large storage structures, and it is best suited for flexible for smaller data-centric applications.

Hybrid Data Mart

Steps in Implementing a Datamart

Implementing a Data Mart is a rewarding but complex procedure. Here are the detailed steps to implement a Data Mart:


Designing is the first phase of Data Mart implementation. It covers all the tasks between initiating the request for a data mart to gathering information about the requirements. Finally, we create the logical and physical Data Mart design.

The design step involves the following tasks:

Gathering the business & technical requirements and Identifying data sources.

Selecting the appropriate subset of data.

Designing the logical and physical structure of the data mart.

Data could be partitioned based on following criteria:


Business or Functional Unit


Any combination of above

What Products and Technologies Do You Need?

A simple pen and paper would suffice. Though tools that help you create UML or ER diagram would also append meta data into your logical and physical designs.


This is the second phase of implementation. It involves creating the physical database and the logical structures.

This step involves the following tasks:

Implementing the physical database designed in the earlier phase. For instance, database schema objects like table, indexes, views, etc. are created.

What Products and Technologies Do You Need?

You need a relational database management system to construct a data mart. RDBMS have several features that are required for the success of a Data Mart.

Storage management: An RDBMS stores and manages the data to create, add, and delete data.

Fast data access: With a SQL query you can easily access data based on certain conditions/filters.

Data protection: The RDBMS system also offers a way to recover from system failures such as power failures. It also allows restoring data from these backups incase of the disk fails.

Multiuser support: The data management system offers concurrent access, the ability for multiple users to access and modify data without interfering or overwriting changes made by another user.

Security: The RDMS system also provides a way to regulate access by users to objects and certain types of operations.

In the third phase, data in populated in the data mart.

The populating step involves the following tasks:

Source data to target data Mapping

Extraction of source data

Cleaning and transformation operations on the data

Loading data into the data mart

Creating and storing metadata

What Products and Technologies Do You Need?

You accomplish these population tasks using an ETL (Extract Transform Load) Tool. This tool allows you to look at the data sources, perform source-to-target mapping, extract the data, transform, cleanse it, and load it back into the data mart.

In the process, the tool also creates some metadata relating to things like where the data came from, how recent it is, what type of changes were made to the data, and what level of summarization was done.


Accessing is a fourth step which involves putting the data to use: querying the data, creating reports, charts, and publishing them. End-user submit queries to the database and display the results of the queries

The accessing step needs to perform the following tasks:

Set up a meta layer that translates database structures and objects names into business terms. This helps non-technical users to access the Data mart easily.

Set up and maintain database structures.

Set up API and interfaces if required

What Products and Technologies Do You Need?

You can access the data mart using the command line or GUI. GUI is preferred as it can easily generate graphs and is user-friendly compared to the command line.


This is the last step of Data Mart Implementation process. This step covers management tasks such as-

Ongoing user access management.

System optimizations and fine-tuning to achieve the enhanced performance.

Adding and managing fresh data into the data mart.

Planning recovery scenarios and ensure system availability in the case when the system fails.

What Products and Technologies Do You Need?

You could use the GUI or command line for data mart management.

Best practices for Implementing Data Marts

Following are the best practices that you need to follow while in the Data Mart Implementation process:

The source of a Data Mart should be departmentally structured

The implementation cycle of a Data Mart should be measured in short periods of time, i.e., in weeks instead of months or years.

It is important to involve all stakeholders in planning and designing phase as the data mart implementation could be complex.

Data Mart Hardware/Software, Networking and Implementation costs should be accurately budgeted in your plan

Even though if the Data mart is created on the same hardware they may need some different software to handle user queries. Additional processing power and disk storage requirements should be evaluated for fast user response

A data mart may be on a different location from the data warehouse. That’s why it is important to ensure that they have enough networking capacity to handle the Data volumes needed to transfer data to the data mart.

Implementation cost should budget the time taken for Datamart loading process. Load time increases with increase in complexity of the transformations.


Data marts contain a subset of organization-wide data. This Data is valuable to a specific group of people in an organization.

It is cost-effective alternatives to a data warehouse, which can take high costs to build.

Data Mart allows faster access of Data.

Data Mart is easy to use as it is specifically designed for the needs of its users. Thus a data mart can accelerate business processes.

Data Marts needs less implementation time compare to Data Warehouse systems. It is faster to implement Data Mart as you only need to concentrate the only subset of the data.

It contains historical data which enables the analyst to determine data trends.

Many a times enterprises create too many disparate and unrelated data marts without much benefit. It can become a big hurdle to maintain.

Data Mart cannot provide company-wide data analysis as their data set is limited.


Define Data Mart : A Data Mart is defined as a subset of Data Warehouse that is focused on a single functional area of an organization.

Data Mart helps to enhance user’s response time due to a reduction in the volume of data.

Three types of data mart are 1) Dependent 2) Independent 3) Hybrid

Important implementation steps of Data Mart are 1) Designing 2) Constructing 3 Populating 4) Accessing and 5)Managing

The implementation cycle of a Data Mart should be measured in short periods of time, i.e., in weeks instead of months or years.

Data mart is cost-effective alternatives to a data warehouse, which can take high costs to build.

Data Mart cannot provide company-wide data analysis as data set is limited.

Update the detailed information about What Is Bdd Testing? Framework Example on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!