This is the first day of my participation in the August More Text challenge

preface

In the whole operation and maintenance knowledge system, database is a very important part, but at present, most of the operation and maintenance database still stays in the add, delete, change, check and basic architecture, infrastructure is read and write separation, master and slave synchronization.

Many students who change their careers have not systematically studied the principle of database system. If they are not graduates, the book “Introduction to Database System” is recommended.

I think it’s the fifth editionThere is a “database system implementation”, you can go to jingdong search, worth having

Databases are already involved in everything from bank transactions, airline schedules, university registrations and grades, customer systems for sales, and order systems. You may learn many skills, but database systems alone will help you find a good job.

Database + operating system + computer network + compiler principles = basic skills to become a good engineer.

Computing boils down to data plus algorithms, and the core of most software is storing data in a database and pulling it out when needed

In practical work, data table is data structure, index and query is algorithm; The code is simply used to move data between data systems.

What is a database?

The full name of DB is data base, that is, the meaning of database. Database is actually a collection of files, is a storage of data warehouse, the essence is a file system, database is in accordance with a specific format to store the data, users can add, delete, change and check the stored data operation

Ii. Classification of databases?

In general, we fall into two categories:

Relational database:

After mathematical theory verification can save all kinds of relational data in real life, data stored in the database to the table as a unit;

Non-relational database:

It is usually used to address specific requirements such as data caching and high concurrent access. Data can be stored in various forms. For example, Redis database: Stores data in the form of key-value pairs.

Extension:

  • Databases (psotgreSQL,MySQL,Oracle) store data so that you or other applications can find it again later
  • Cache: Speed up reading, such as Redis, memcache
  • Search index: allows users to search data by keyword or otherwise filter data (ElasticSearch)
  • Stream processing: Sending messages to other processes in one step (Kafka, Flink, Storm)
  • Batch processing: Processing large amounts of accumulated data on a regular basis (Hadoop)
Mainstream relational databases

MySQL: Acquired by Sun in 2008, Sun was acquired by Oracle in 2009. It is open source and free, until Oracle released version 5.0 (which uses Oracle core technology to improve performance by 30%).

MariaDB database: name because the author’s daughter is named Maria, the market ranked the first;

Oracle: Closed source, most expensive, highest performance, ranked second in the market;

SQLServer: Microsoft’s product, ranked third in the market, mainly used in.net(C#) development of the website;

DB2: IBM has a complete website solution (operating system, WE server (such as Tomcat), database, etc.) mainly applied in state-owned large enterprises such as banks;

Sqlite: lightweight database, only tens of K, commonly used in embedded and mobile devices; Access: Microsoft, friendly interface, simple development, flexible and easy to use, entry-level desktop database, performance and security in general, is mainly used by individuals and small websites.

Postgresql is a relational database management system that supports complex queries, foreign keys, triggers, views, and transaction integrity, but is not recommended for beginners.

Mainstream non-relational databases

  • Memcached: An open source distributed memory caching system with high performance and high concurrency. Developed in C language, memcached data is stored in the form of key-value. It is suitable for application scenarios that require ultra-high performance read/write speed and persistence
  • Redis: similar to memcache, it is also a key-value storage system, but reids supports more value types, including string, list, set, zset, and so on
  • Mongodb: a product between relational and non-relational, characterized by powerful query language, syntax somewhat similar to object-oriented query language, high performance, easy deployment, convenient storage of data and other characteristics.
  • Cassandra is an open source key-value storage system for storing extremely large data, developed by Facebook. The feature is that Cassandra is not a database, but a distributed network service consisting of a bunch of database nodes. A write operation to Cassandra will be copied to other nodes.

Usage scenarios

  • Mysql is mainly used in large portals, such as Sogou, Sina, etc. Its main advantage is the open source code, because the open source database is free, it is now the product of Oracle.

  • Oracle is used in banking, railways, airports, etc. The database has powerful function and high software cost. It’s also made by Oracle.

  • SQL Server is a product of Microsoft and is mainly applied to large and medium-sized enterprises, such as Lenovo and Founder.

DBA professional literacy

DBA practitioners have the highest authority on the database, and the more power one has, the more responsibility one has. A DBA without accountability will never be a good DBA.

Especially these two years often appear to delete the phenomenon of running away, for a moment of anger to destroy their life, it is not worth it.

In addition to responsibility, there is a need for rigor. As a DBA, you need to think twice before modifying or deleting a database, and you need to support both theory and practice. At worst, you need to back it up.

Careful: some students delete just unintentional move, if you are a little more careful, every time to delete before calm down, even go out to pick up a glass of water, come back to see whether to delete, try not to operate in a bad state.

Mentality: to have a good mentality, don’t make trouble, but also not afraid of things, accidents don’t be afraid, calm analysis

conclusion

Learning any technology, should be compared to study, knowledge and knowledge, cognitive and cognitive contrast, this time compared with the previous time of their own technology progress.