In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
NoSQL or Not-Only SQL is a good supplement to relational database.
Relational database is a database based on relational model. So what is a relational model? The model of storing data in rows and columns as a two-dimensional table is a relational database. For example: mysql and oracle
With the rise of Internet web sites, relational databases expose more and more shortcomings. Relational databases can cope with tens of thousands of sql queries, but for tens of thousands of sql requests to write data, the hard disk io can not accept.
Let's talk about the difference between hard disk and memory stick (also known as memory).
Hard disk: a computer accessory used to store data. Non-volatile storage, to put it bluntly, even if you turn off the computer, the data in it will not be lost. Usually the C disk, D disk and E disk in the computer all refer to the hard disk. Its appearance is a square box with a disk (like a CD) and a head to read and write the disc.
Memory bar: due to the slow speed of the hard disk, if CPU runs the program, all data is read and written directly from the hard disk, which will affect the efficiency very much. So CPU will transfer the data to be used when running the software from the hard disk to the fast memory at once, and then CPU to exchange the data with the memory. Memory is volatile memory, as long as you lose power, there is no data in memory. The memory itself is an integrated circuit board with several chips for storing data. Because this circuit board is generally made into a long strip, it is called a "memory stick".
To sum up:
Read data: when cpu reads data, it reads data from hard disk from one-time read and write to memory, and only cup reads data from memory
Why don't you think about one question? What if I run out of memory? Is it possible that the computer can't be used?
Now the mainstream memory bar, the capacity is 8GB or 16GB, although compared with the past has been very large, but in this era of big data, it is inevitable to encounter the embarrassment of insufficient memory, the operating system is to solve the problem like this: the system can open up an area on the hard disk and use the hard disk as memory. Although the speed is very slow, it is better than nothing.
Write data: cpu writes data directly to the hard disk when writing data. If you need a lot of data, you can write the data to the hard disk cache first. The hard disk cache acts as a buffer when reading and writing to the hard disk.
The hard disk cache is a small independent chip on the circuit board of the hard disk (just like memory). For example, CPU has to write a large number of fragmented files to the hard drive. CPU can first throw these files into a faster cache, and then CPU can do other things first. The hard disk then writes this pile of small files from the cache to the hard disk surface. Hard disk cache helps to improve the performance of sudden read-write and random read-write of hard disk.
Okay, before we get back to our point, why is there a nosql database?
For example: recording the click-through rate of website posts is a very common function, so have you ever thought about how to achieve such a function, what are the requirements for the io of the hard drive? Obviously, it's high.
In the voting system, for example, when voting starts, all people start to request to write data to the hard disk, and you can see that the io of the hard disk can't stand it again, so the nosql database is born.
Common nosql databases are: redis,mongoDB, etc.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.