NoSQL aggregate data model features the aggregate data model is characterized by putting frequently accessed data together (aggregated in one piece); this brings obvious benefits for a query request, all data can be retrieved in an interaction with the database. Of course, there will inevitably be duplicates stored in this way, so that there will be fewer interactions; disadvantages
NoSQL aggregate data model features the aggregate data model is characterized by putting frequently accessed data together (aggregated in one piece); this brings obvious benefits for a query request, all data can be retrieved in an interaction with the database. Of course, there will inevitably be duplicates stored in this way, so that there will be fewer interactions; disadvantages
Features of NoSQL Aggregate Data Model
The feature of the aggregate data model is to put frequently accessed data together (aggregated in one piece );
This brings obvious benefits. For a query request, all data can be retrieved in an interaction with the database;
Of course, there will inevitably be duplicates stored in this way, and repetition is for less interaction;
Disadvantages
-
The aggregation structure is advantageous to some interactions, but hinders other interactions;
For example, when the student ID is used to aggregate student information (including student name, class, age, and other information, or even English scores, all the information of the student can be queried in an interaction, but it is very difficult to query it by the Student name;
-
ACID transactions that span multiple aggregates are not supported.
The transaction support of the aggregation structure is limited. Some NOSQL products implement simple transaction support, but the transactions that span multiple aggregation structures are not perfect;
Plan data access methods
When using NoSQL databases, the primary task is to design key names and stored data;
The design principle is to minimize the number of aggregates to be accessed and obtain the required data in as few interactions as possible;
If you find that you need to obtain data using multiple query conditions, NOSQL may be the preferred choice; relational databases are the first choice;
Aggregate-oriented database
-
Key Value Database
Any data can be stored, and the stored data is not transparent to users. From the outside, it only contains large pieces of data that do not have much meaning;
Access Method: search by key
-
Document Database
The allowed structure and data type are defined during document database storage. The internal structure can be seen from the outside;
Data stored in the storage time limit can be accessed more flexibly;
Access Method:
1. query by available key names
2. query fields in aggregation (benefits of defining the structure of stored data)
3. You can create an index based on the aggregated content.
Related: Relational Data Model
For data models, we are most familiar with relational data models;
The relational data model is an aggregate ignorance model ";
Use the E-R model for clear planning when organizing data;
The advantage of this is that it is easy to query data in different ways (various where conditions or even join)
Relational databases use relational data models, such as oracle;
Mind Map
Reference
NoSql Essence
Posted by: CC | 26APR, 2014
Blog: blog.me115.com [subscription]
Weibo: Sina Weibo
NoSQL aggregate data model features the aggregation data model is characterized by putting frequently accessed data together (together...
Continue reading»