In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. What is a database?
Database (Database) is a warehouse that organizes, stores and manages data according to the data structure, which is long-term stored in the computer, organized and shareable data collection.
The data in the database refers to the characteristics of organizing, describing and storing together with a certain data model, with as little redundancy as possible, high data independence and easy expansibility, and can be shared by multiple users within a certain range.
two。 Main features
Data sharing based on ⑴
Data sharing includes that all users can access the data in the database at the same time, including that users can use the database through the interface in various ways and provide data sharing.
⑵ reduces data redundancy
Compared with the file system, because the database realizes data sharing, it avoids the establishment of application files by users. It reduces a large number of duplicate data, reduces data redundancy, and maintains data consistency.
Independence of ⑶ data
The independence of data includes logical independence (the logical structure of the database and the application are independent of each other) and physical independence (the change of the physical structure of the data does not affect the logical structure of the data).
Centralized control of ⑷ data
In the mode of file management, the data is in a decentralized state, and there is no relationship between different users or the same user in different processing. The data can be centrally controlled and managed by the database, and the organization of all kinds of data and the relationship between the data can be represented by the data model.
⑸ data consistency and maintainability to ensure data security and reliability
It mainly includes: ① security control: to prevent data loss, error update and unauthorized use; ② integrity control: to ensure the correctness, validity and compatibility of data; ③ concurrency control: to allow multiple access to data in the same time period, but also to prevent abnormal interaction between users.
⑹ fault recovery
A set of methods are provided by the database management system, which can find and repair faults in time, so as to prevent data from being destroyed. The database system can recover the failure when the database system is running as soon as possible, which may be a physical or logical error. For example, data errors caused by misoperation of the system and so on.
3. Database type
(1)。 There are three popular database models: hierarchical database, network database and relational database. Now the most commonly used are relational database and non-relational database, these two types are the most widely used.
4. Relational database
Relational database is to reduce the complex data structure to a simple binary relationship (that is, two-dimensional table form). In the relational database, the operation of the data is almost based on one or more relational tables, and the data management is realized by classifying, merging, joining or selecting these related tables. The main representative of relational database is: MySQL,Oracle.
MySQL:
It is widely used in large, small and medium-sized websites of Internet. It is small, fast and open source, so it is very popular.
Main users: Internet, various websites, game companies, e-commerce platform.
Oracle:
Superior performance, not open source, expensive.
It is mainly used by traditional large enterprises, large companies, government, finance, securities and other industries.
5. Non-relational database (NOSQL)
NoSQL generally refers to non-relational databases. NoSQL (NoSQL = Not Only SQL), which means "not just SQL", is a new revolutionary movement of database. With the rise of web2.0 websites on the Internet, traditional relational databases have been unable to cope with web2.0 sites, especially the super-large-scale and highly concurrent web2.0 pure dynamic websites of SNS type, which has exposed a lot of insurmountable problems. On the other hand, the non-relational database has developed rapidly because of its own characteristics. The emergence of NoSQL database is to solve the challenges brought by large-scale data collection and multiple data types, especially the application problem of big data.
Computer architecture requires a huge level of scalability in data storage, and NoSQL is committed to changing this situation. Google's BigTable and Amazon's Dynamo use NoSQL database, and Facebook's Cassandra,Apache 's HBase.redis,mongodb.
6. Database caching mechanism:
Memcached is a high-performance distributed in-memory object caching system, which is used for dynamic Web applications to reduce database load. It reduces the number of times to read the database by caching data and objects in memory, thus improving the speed of dynamic, database-driven websites. Memcached is based on a hashmap that stores key / value pairs. Its daemon (daemon) is written in C, but the client can write in any language and communicate with the daemon through the memcached protocol.
Because memcached is a pure memory software, all data will be lost once rebooted, so Sina has developed persistent storage mechanism and asynchronous primary and secondary replication mechanism based on it, so that it has the ability of transaction recovery, persistent data storage and distributed replication, which has been gradually replaced by redis in recent years.
Based on this, Sina has developed a mechanism in which data will be saved after a power outage.
Redis is a key-value storage system. Similar to Memcached, it supports relatively more value types, including string (string), list (linked list), set (collection), zset (sorted set-ordered collection), and hash (hash type).
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.