×

Semi-Structured data

In this article, we will discuss the semi-structured data. Data can be defined as the distinct piece of information that is gathered and translated for some purpose. It can be available in different forms, such as bits and bytes stored in electronic memory, numbers or text on pieces of paper, or facts stored in a person's mind.

Data that are very large in size is called Big Data that is classified into three categories – Structured data, Semi-structured data, and unstructured data. Among these categories, here we will discuss the semi-structured data.

Semi-structured data is a type of structured data that does not hold the tabular structure of data models associated with relational databases or other types of data tables but still includes tags or other markers to separate semantic elements and enforce hierarchies of records and fields within the data.

In semi-structured data, entities of the same class may have different characteristics despite being grouped next to each other, and the order of the attributes is unimportant.

Since the rise of the internet, semi-structured data have become more common, as full-text documents and databases are no longer the only types of data. The sources of the semi-structured data are – Emails, Zipped files, web pages, XML and other markup languages, TCP/IP packets, etc.

Characteristics of Semi-structured data

Now, let's discuss the characteristics of the semi-structured data. The characteristics of semi-structured data are listed as follows –

  • We cannot store semi-structured data in the form of rows and columns as in databases.
  • The structure of semi-structured data is not well defined, so it cannot be easily used by computer programs.
  • Data automation and management of semi-structured data is difficult as it does not contain enough metadata.
  • In a group, the size and type of same attributes may differ.
  • In the semi-structured data, entities in the same group may or may not have the same attributes or properties.
  • In the semi-structured data, similar entities are grouped together and organized in a hierarchy.

Now, we discuss the benefits and limitations of the semi-structured data.

Advantages of semi-structured data

There are some of the benefits of semi-structured data that are listed as follows –

  • In semi-structured data, the schema is flexible. It means that it can be easily changed.
  • Semi-structured data support the users that do not express their need in SQL.
  • Dealing with heterogeneous sources is easier in semi-structured data.
  • In semi-structured data, the data is restricted by a fixed schema.

Disadvantages of semi-structured data

There are some of the limitations of semi-structured data that are listed as follows –

  • Storage of semi-structured data is difficult due to the lacking of fixed or rigid schema.
  • In comparison to structured data, queries in semi-structured data are less efficient.

Example of the semi-structured data

Semi-Structured data

The examples of the semi-structured data are discussed as follows –

CSV

The three main languages used to interact or transfer data from a web server to a client are CSV, XML, and JSON (i.e., computer, Smartphone, etc.). CSV stands for "comma separated values", and data are expressed as Lucy, Jessica, and Anthony. It can be expressed in the same way as Excel files but with only one column.

HTML

HTML or "Hyper Text Markup Language" is a hierarchical language, and it is similar to XML but unlike XML. HTML is used to create websites and visualize information. The commentaries used to display text and images on a computer screen provide the semi-structure of HTML, but the text and images themselves are unstructured.

Web Pages

Web pages are designed to be easily accessible with tabs like Home, About Us, Blog, Contact, and so on, or links to other pages within the text, to help users find the information they need. Of course, this is all authored in HTML, but we don't see that on the computer monitor. And the text and data on each of these pages are unstructured.

Electronic Data Interchange (EDI)

EDI is the electronic computer-to-computer transmission of business documents such as purchase orders, invoices, and inventory documents previously transmitted on paper.

Email

Email is arguably the most common type of semi-structured data since we all have it on a routine basis. Email messages comprise structured data such as name, email address, recipient, date, time, and so on, and are also organized into folders such as Inbox, Sent, Trash, and so on.

JSON

JSON stands for "JavaScript Object Notation". It is an open standard format, which is lightweight and text-based, designed explicitly for human-readable data interchange.

Now, let's see some of the issues and solutions to store the semi-structured data.

What are the problems faced to store the semi-structured data?

The storage of semi-structured data is difficult due to the reasons listed below –

  • Unlike structured data, the cost of storing the semi-structured data is higher.
  • In semi-structured data, designing of data structure is typical. It is because the distinction between the schema and data is not clear and uncertain.
  • In semi-structured data, generally, the structure of data is irregular. Some data sources have an implicit data structure that makes the interpretation of data relationships complicated.
  • Generally, the schema and data in semi-structured data are tightly coupled and dependent on each other.

What are the solutions to store semi-structured data?

The solutions to store semi-structured data are listed as follows –

  • We can use Object Exchange Model (OEM) to exchange and store semi-structured data.
  • RDBMS can also be used to store the semi-structured data. It can be done by mapping the data to relational schema and map it to a table.
  • XML is broadly used to exchange and store the semi-structured data. Using XML, the user can define tags and attributes for storing the data in hierarchical form. In XML, data and schema are not tightly coupled.

How to extract information from semi-structured data?

Extracting information from semi-structured data is typical, as it is hard to tag and index. It is because semi-structured data have different structures due to the heterogeneous sources. Sometimes semi-structured data do not have any structure. The possible solutions to extract semi-structured data are listed as follows –

  • We can use data mining tools to extract information from semi-structured data.
  • We can use graph-based models such as Object Exchange Model (OEM) to index the semi-structured data. The searching and indexing of data stored in a graph-based model are easier.
  • XML allows us to arrange the data in hierarchical order. It enables the indexing and searching of data.

So, that's all about the article. Here, we have discussed the semi-structured data along with its characteristics, benefits, limitations, and examples. We have also seen some of the important questions related to the semi-structured data. Hope the article will be helpful and informative to you.


Related Topics

Finding the Minimum and Maximum Value of a Binary Tree

Implementation // Writing a C++ program that will help us find out the maximum and the minimum in a binary tree.  #include <bits/stdc++.h> #include <iostream> using namespace std; // creating a new class tree node. class...

5 minutes read.

Insertion Sort vs Selection Sort

In this article, we will discuss insertion sort, Selection sort and the basic differences between these two sorting techniques in detail: What is Insertion Sort? Insertion Sort – The insertion sort is...

5 minutes read.

Binary Tree to Doubly Linked List

Binary Tree to Doubly Linked List This article will explain how to convert the given binary tree into a Doubly Linked List. The left and right pointers in tree nodes are...

2 minutes read.

Red Black Tree vs AVL Tree: Data Structure

Difference Between Red Black Tree vs AVL Tree Red Black Tree: A red-black tree is referred as self-balancing binary search tree. In red-black, each node stores an extra bit that determines...

4 minutes read.

Berkley’s Algorithm

Berkley’s Algorithm is mainly used in clock synchronization system. It is used in distributed systems. To implement this algorithm, we have to think that the network has no accurate time...

4 minutes read.

Big O Notations

What is Big O Notation, and why is it important? "Big O notation is a mathematical notation that depicts a function's limiting behaviour when the input tends towards a certain value...

10 minutes read.

What is a 2-3 Tree in Data Structure?

Tree Data structure The information about the tree is self-explanatory. Trees are ordered and, therefore, not linear. But they are actually designed differently. Tree A node-based data model that represents and...

5 minutes read.

Stack vs Heap Memory Allocation Data Structure

Difference Between Stack and Heap Memory Allocation Stack Memory Stack memory allocation is a way to use the system memory as a temporary storage of the data which is act like last-in-first-out...

3 minutes read.

Trim a binary search tree

Implementation //writing a C++ program will help us eliminate the keys that are out of the league.  #include<bits/stdc++.h> using namespace std; //we are now creating a binary search tree node consisting of key left...

8 minutes read.

Rearrange a linked list into alternate fashion first and the last element

Rearrange a linked list into alternate fashion first and the last element This article will explain how to rearrange the linked list into alternate fashion first and the last element. Here,...

3 minutes read.

Data Structures Tutorial

The data structure is a way of storing and organizing data in a computer system. So that we can use the data quickly, which means the information is stored and...

7 minutes read.

Finding the Maximum Element in a Binary Tree

Implementation // Creating a C++ program to excavate the minimum and maximum in a given binary tree. #include <bits/stdc++.h> #include <iostream> using namespace std; // creating a new tree node. class __nod { public: int record; __nod *Lft, *Rt; /*...

4 minutes read.

Counting Sort

Counting Sort: Counting sort is a sorting algorithm that is used to sort the elements of the array within a specific range. It counts the same element number of the...

3 minutes read.

Dynamic memory allocation of structure in C

We can normally store elements of the same datatype with the help of an array in C programming. We can store multiple numbers of elements of a character data type...

5 minutes read.

LCA of binary tree

Implementation //Writing a program to find the lowest common factor in a given binary search tree. #include <iostream> #include <vector> using namespace std; // the very first step is to create a binary tree. struct __nod { int...

8 minutes read.

Box Stacking Problem

Stacking of boxes depending on their base You have been given n different boxes. These boxes will have different heights, widths, and depths. You have to stack all these boxes in...

4 minutes read.

Sparse Matrix in Data Structure

Sparse Matrix The sparse matrix is a two-dimensional data object which is made by m rows and n columns, so we can say the number of data values in sparse matrix...

6 minutes read.

Tree vs Graph: Data Structure

Difference Between Tree and Graph What is Tree? A tree is a non-linear data structure and finite collection of elements called node. A tree, in which the data items are arranged in...

3 minutes read.

Reverse the Singly Linked List in C

Reverse the Singly Linked List in C This article has given a singly linked list and will reverse the linked list by changing the links between nodes. Example:                         Input:  2 -> 4...

3 minutes read.

Lowest common ancestor in a binary search tree

Suppose you have given two values of nodes in a binary search tree. You have to find out the lowest common ancestor between the nodes. Let’s take an example tree- For the...

4 minutes read.