Aggregate-Oriented Databases in NoSQL
The aggregate-Oriented database is the NoSQL database which does not support ACID transactions and they sacrifice one of the ACID properties. Aggregate orientation operations are different compared to relational database operations. We can perform OLAP operations on the Aggregate-Oriented database. The efficiency of the Aggregate-Oriented database is high if the data transactions and interactions take place within the same aggregate. Several fields of data can be put in the aggregates such that they can be commonly accessed together. We can manipulate only a single aggregate at a time. We can not manipulate multiple aggregates at a time in an atomic way.
Aggregate – Oriented databases are classified into four major data models. They are as follows:
- Column family
Each of the Data models above has its own query language.
- key-value Data Model: Key-value and document databases were strongly aggregate-oriented. The key-value data model contains the key or Id which is used to access the data of the aggregates. key-value Data Model is very secure as the aggregates are opaque to the database. Aggregates are encrypted as the big blog of bits that can be decrypted with key or id. In the key-value Data Model, we can place data of any structure and datatypes in it. The advantage of the key-value Data Model is that we can store the sensitive information in the aggregate. But the disadvantage of this model the database has some general size limits. We can store only the limited data.
- Document Data Model: In Document Data Model we can access the parts of aggregates. The data in this model can be accessed inflexible manner. we can submit queries to the database based on the fields in the aggregate. There is a restriction on the structure and data types of data to be paced in this data model. The structure of the aggregate can be accessed by the Document Data Model.
- Column family Data Model: The Column family is also called a two-level map. But, however, we think about the structure, it has been a model that influenced later databases such as HBase and Cassandra. These databases with a big table-style data model are often referred to as column stores. Column-family models divide the aggregate into column families. The Column-family model is a two-level aggregate structure. The first level consists of keys that act as a row identifier that selects the aggregate. The second-level values in the Column family Data Model are referred to as columns.
- In the above example, the row key is 234 which selects the aggregate. Here the row key selects the column families customer and orders. Each column family contains the columns of data. In the orders column family, we have the orders placed by the customers.
- Graph Data Model: In a graph data model, the data is stored in nodes that are connected by edges. This model is preferred to store a huge amount of complex aggregates and multidimensional data with many interconnections between them. Graph Data Model has the application like we can store the Facebook user accounts in the nodes and find out the friends of the particular user by following the edges of the graph.
We can find the friends of a person by observing this graph data model. If there is an edge between two nodes then we can say they are friends. Here we also consider the indirect links between the nodes to determine the friend suggestions.
Please Login to comment...