## 2 Background
### SQL vs. NoSQL  
For the last 40 years, relational databases (SQL) have been the market leader because of their ability to solve most of the challenges. Such a long existence has given a high level of maturity and it is still the most recommended storage for many applications. However, SQL databases are not capable of solving all of today's challenges, and inspired by SQL limitations, NoSQL has emerged as a solution to fulfil these gaps [37; 38]. The key feature of relational databases is the high consistency guarantee provided by ACID (Atomicity, Consistency, Isolation, and Durability) properties. Many NoSQL data-bases have focused on high levels of availability and resilience, even though this may com-promise consistency for a few moments. To achieve availability and resilience, NoSQL databases work with BASE (Basically available, Soft state, and Eventually consistent) properties [38]. The CAP theorem (Consistency, Availability, and Partition tolerant), also known as Brewer's theorem, states that it is impossible to provide all three guarantees simultaneously [39]. While SQL primary is focusing on consistency, NoSQL is giving up either consistency or availability and embracing partition tolerance [37]. There is no perfect database that could solve all the problems and fits all the requirements. Polyglot persistence is a single storage system that combines the SQL and NoSQL database features. In relational databases, the stored data are managed and represented as tables. Each table can have a relation to an arbitrary number of tables. A table consists of rows and columns. A row represents a dataset item, a column represents a dataset item's field. In NoSQL, the data store management can be grouped into four types: Key-value, Wide-column, Document, and Graph. Data in key-value stores is managed and represented as key and value pairs stored in efficient, highly scalable, key-based lookup structures. A value represents data with an arbitrary type, structure, and size is uniquely identified by an indexed key. Indexing and querying based on values are not supported, so in cases where querying is needed, it has to be implemented on the client side. The conception of wide-column stores (also known as column-family stores) was taken from the Google Bigtable store. Data are represented in a tabular format of rows and column-families. A column-family is an arbitrary number of columns logically connected to each other. A wide-column store is an extended key-value store in which the value is represented as a sequence of nested (key, value) pairs. An extended key-value store in which the value is represented as a document encoded in standard formats such as XML, JSON, or BSON (Binary JSON) is a Document store. The biggest difference from the key-value store is that document stores know the format of the documents and support querying based on value functionality. Graph stores are based on graph theory, in which a graph consists of vertices representing entities and edges represent the relationships between them. The datasets of graphs are stored efficiently to provide effective operations for their querying and analyzing. Because the data relationship variety can be very different in many aspects, many types of graphs such as undirected, directed, labelled, etc. are used to represent a different type of data [38; 39; 40; 41; 42; 43; 44]. According to [PERSON] et al., the advantages of NoSQL are: it provides a wide range of data models to choose from, is easily scalable, no database administrators are needed, can handle hardware failures, is faster and more flexible, and evolves at a very high pace. The disadvantages of NoSQL are its immaturity, no standard query language exists, not all NoSQL databases are ACID compliant, a standard interface not exist, and difficult maintenance [44]. According to the DB-Engines initiative, relational databases are still the most popular database technology, even though NoSQL popularity has emerged in the last few years.