Joke Collection Website - Mood Talk - What questions will redis mongodb ask in the java interview and how to answer them?
What questions will redis mongodb ask in the java interview and how to answer them?
Advantages:
1) cost: nosql database is simple and easy to deploy, and it is basically open source software. It doesn't need to spend a lot of money to buy and use like Oracle, and it is cheaper than relational database.
2) Query speed: nosql database stores data in cache, while relational database stores data in hard disk, so the natural query speed is far less than that of nosql database.
3) data storage format: the storage format of nosql is key, value, document, picture, etc. So you can store basic types and various formats such as objects or collections, while the database only supports basic types.
4) Extensibility: Relational database is limited by multi-table query mechanism such as join, so it is difficult to expand.
Disadvantages:
1) maintenance tools and materials are limited, because nosql is a new technology, which can't be compared with the technology of relational database 10 for several years.
2) sql support is not provided. If you don't support industry standards such as sql, it will cost some users to learn and use.
3) No relational database is provided to handle things.
2. Introduce redis and mongodb:
Google itself.
3. Application scenario:
redis:
A. mainly do hot data caching.
B. data expiration processing.
C. message queuing and other functions.
D. counting votes, such as voting.
mongodb:
The main goal of mongodb is to build a bridge between the key/value storage mode (providing high performance and high scalability) and the traditional RDBMS system (rich in functions), and to integrate the advantages of both. Mongo is suitable for the following scenarios:
A. Website data: mongo is very suitable for real-time insertion, update and query, and has the replication and high scalability required for real-time data storage of websites.
B. Cache: Because of its high performance, mongo is also suitable as the cache layer of information infrastructure. After the system restarts, the persistent cache built by mongo can avoid overloading the lower data sources.
C. Large-capacity, low-value data: It may be more expensive to store some data using traditional relational databases. Before this, many programmers often choose traditional files for storage.
D. High scalability scenario: mongo is very suitable for databases consisting of dozens or hundreds of servers.
E. for storing objects and JSON data: mongo's BSON data format is very suitable for storing and querying document formats.
4. Supported data types:
There is a lot of content, so organize the information on the internet yourself.
- Related articles
- Work is not smooth, suppress the feeling of being wronged, and talk about the collection (4 articles)
- What are the interesting places in Chengdu?
- Reading theme and answer of reed in shiputai
- How to prevent neighbors from stealing electricity
- A person's depressed mood phrase says 20 things.
- What does the old gun mean?
- Kindergarten uses video tapes to accompany children.
- Happy and helpful Xiamen composition
- People will lack oxygen at high altitude, and people will have altitude sickness at high altitude.
- On wechat, what is the psychology of using your own photo as an avatar?