Performance evaluation of database models in social network systems - soheila karbasi; Mojan Safaeinejad (Iranian Journal of Information Processing & Management, 2023)
In this research, the data models of widely used social networks, their advantages and disadvantages, as well as the things that need to be taken into account for storing and retrieving social network data, have been reviewed and presented. The usage of social networks has grown significantly in the past few years, and the result of this growth is the production of a large amount of data. On the other hand, it is necessary to effectively store and analyze social network data for all kinds of businesses today. The types of common storage methods based on the relational data model are not scalable for large amounts of information and therefore are not optimal and efficient. As a result, the use of storage methods based on non-relational models along with relational models have become very common. In this research, a large dataset of Twitter social network data, which includes 1,581,468 tweets from posts sent by 300,000 Persian users of this social network, is stored in three databases: MySQL, MongoDB, and Redis, and the performance of each of them with several different queries has been examined and compared. In addition to measuring the time spent to perform operations on the data, the amount of space occupied by the databases was also examined. Considering the advantages and limitations associated with the structure of all three databases, from the obtained values, it can be concluded that if the data has a specific structure, a relational database like MySQL is a good choice. If the data is unstructured or structured with the potential for rapid growth, NoSQL models will perform better. In addition, storing data temporarily and at high speed in key-value databases such as Redis, which store data in memory, are more suitable. Also, in terms of execution time, MongoDB executes queries very fast compared to MySQL and Redis, which is a proof that NoSQL databases show better performance and scalability for most operations in large datasets.