当前位置:网站首页>2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
2022-07-07 02:51:00 【It bond】
hello ! Hello everyone , I am a 【IT bond 】, Jianghu people jeames007,10 year DBA Work experience
A highly motivated 【 Bloggers in big data field 】!
China DBA union (ACDU) member , Currently engaged in DBA And program programming ,B Station and Tencent classroom lecturer , Live broadcast volume breaking 10W
Good at mainstream data Oracle、MySQL、PG Operations and development , Backup recovery , Installation migration , performance optimization 、 Fault emergency treatment, etc .
If there is a pair of 【 database 】 Interested in 【 Cutie 】, Welcome to your attention 【IT bond 】
️️️ Thank you, big and small !️️️
List of articles
- Preface
- 1. Basic concepts
- ️ 1.1. What is? SQL?
- ️ 1.2 What are the three paradigms of database ?
- ️ 1.3 Four characteristics of transactions (ACID) Introduce to you ?
- ️ 1.4 What is a deadlock ? How to solve ?
- ️ 1.5 What is stored procedure ? What are the advantages and disadvantages ?
- ️ 1.6 SQL What are the main types of sentences
- ️ 1.7 What are the six kinds of association queries ?
- ️ 1.8 Large table data query , How to optimize the ?
- ️ 1.9 MySQL The purpose of sub database and sub table is ?
- ️ 1.10 MySQL The working principle of master-slave replication is ?
- ️ 1.11 What is? MySQL Of GTID?
- ️ 1.12 stay Oracle in , What is? AWR?
- ️ 1.13 Oracle The difference between dynamic monitoring and static monitoring
- 2. Fault handling class
- 3. Install the deployment class
- 4. Performance optimization class
Preface
2022 The new year's spring recruit begins , Do you have a big factory you want to change jobs ? Take advantage of this golden stage to seize the opportunity , Enter the big factory at one stroke !
After the Spring Festival , In the “ Kim San Yin four ” It's a busy recruitment season , Each big factory has entered the stage of large-scale recruitment ,
Now is the best time for programmers to enter big factories .
Do you have a big factory you want to change jobs ? Take advantage of this golden stage to seize the opportunity , Enter the big factory at one stroke .
The interview of a large factory is nothing more than three points , resume 、 Written tests and interviews .
Some of the well-known big companies like to examine their skills in big data during the written examination
1. Basic concepts
️ 1.1. What is? SQL?
Structured query language (Structured Query Language) abbreviation SQL, Is a database query language .
effect : For accessing data 、 Inquire about 、 Update and manage relational database system .
️ 1.2 What are the three paradigms of database ?
First normal form : No more columns can be split .
Second normal form : On the basis of the first paradigm , Non primary key columns are completely dependent on the primary key , Instead of relying on a part of the primary key .
Third normal form : On the basis of the second paradigm , Non primary key columns only depend on the primary key , Not dependent on other non primary keys .
When designing the database structure , Try to follow the three paradigms , If not , There must be a good reason . Such as performance .
In fact, we often compromise database design for performance .
️ 1.3 Four characteristics of transactions (ACID) Introduce to you ?
Atomicity : Transactions are the smallest unit of execution , Division is not allowed .
The atomicity of the transaction ensures that the action is either complete , Or it doesn't work at all ;
Uniformity : Before and after the execution of the transaction , Data consistency , Multiple transactions read the same data with the same result ;
Isolation, : When accessing the database concurrently , One user's transaction is not interfered by other transactions ,
The database between concurrent transactions is independent ;
persistence : After a transaction is committed . Its changes to the data in the database are persistent ,
Even if the database fails, it should not have any impact .
️ 1.4 What is a deadlock ? How to solve ?
Deadlock means that two or more transactions occupy each other on the same resource ,
And ask to lock the other party's resources , Which leads to a vicious circle .
Common solutions to deadlock
1、 If different programs access multiple tables simultaneously ,
Try to agree to access tables in the same order , Can greatly reduce the chance of deadlock .
2、 In the same transaction , Try to lock all the resources you need at once , Reduce the probability of deadlock ;
3、 For business parts that are very prone to deadlock , You can try using upgrade lock granularity ,
Table level locking is used to reduce the probability of deadlock ;
If business processing is not good, you can use distributed transaction lock or optimistic lock
️ 1.5 What is stored procedure ? What are the advantages and disadvantages ?
Stored procedure is a precompiled SQL sentence , The advantage is to allow modular design ,
That is, it only needs to be created once , Later in the program can be called many times .
If an operation needs to be performed more than once SQL, Using stored procedures is better than just SQL Statement execution should be fast .
advantage
1) Stored procedures are precompiled , High execution efficiency .
2) The stored procedure code is stored directly in the database , Call... Directly through the stored procedure name , Reduce network communication .
3) High safety , The execution of a stored procedure requires a user with certain permissions .
4) Stored procedures can be reused , Reduce the workload of database developers .
shortcoming
1) Debugging trouble , But with PL/SQL Developer Debugging is very convenient ! Make up for this .
2) Transplant problem , Database side code, of course, is database related .
But if it's an engineering project , There is basically no migration problem .
3) Recompile problem , Because the back-end code is compiled before running ,
If an object with a reference relationship changes , Affected stored procedures 、
The package will need to be recompiled ( However, it can also be set to compile automatically at run time ).
4) If a large number of stored procedures are used in a program system ,
When the program is delivered and used, the data structure will change with the increase of user requirements ,
And then there's the system ,
Finally, if users want to maintain the system, it's very difficult 、 And the cost is unprecedented , It's more difficult to maintain .
️ 1.6 SQL What are the main types of sentences
Data definition language DDL(Data Ddefinition Language)CREATE,DROP,ALTER
Mainly for the above operations That is to say, it has operation on logical structure ,
This includes table structure , Views and indexes .
Data query language DQL(Data Query Language)SELECT
This is easier to understand That is, query operation , With select keyword .
Various simple queries , Connect queries, etc All belong to DQL.
Data manipulation language DML(Data Manipulation Language)INSERT,UPDATE,DELETE
Mainly for the above operations That is, to operate on data ,
Corresponding to the above query operation DQL And DML The common operations of adding, deleting, modifying and checking are constructed by the author .
And query is a special kind of Be divided into DQL in .
Data control function DCL(Data Control Language)GRANT,REVOKE,COMMIT,ROLLBACK
Mainly for the above operations That is to the database security integrity and other operations , It can be simply understood as permission control, etc .
️ 1.7 What are the six kinds of association queries ?
Cross connect (CROSS JOIN)
Internal connection (INNER JOIN)
External connection (LEFT JOIN/RIGHT JOIN)
The joint query (UNION And UNION ALL)
Full connection (FULL JOIN)
Cross connect (CROSS JOIN)
️ 1.8 Large table data query , How to optimize the ?
Optimize shema、sql sentence + Indexes ;
Second, add cache ,memcached, redis;
Master slave copy , Read / write separation ;
Split Vertically , According to the coupling degree of your module ,
Divide a large system into smaller ones , It's a distributed system ;
horizontal partitioning
️ 1.9 MySQL The purpose of sub database and sub table is ?
The purpose of dividing databases and tables is to Solve the problem of database performance degradation due to excessive amount of data ,
Split the original independent database into several databases , Divide the large data table into several data tables ,
Make a single database 、 The amount of data in a single data table becomes smaller , So as to improve the performance of database .
The common middleware for database and table splitting is as follows :
️ 1.10 MySQL The working principle of master-slave replication is ?
Record data higher in the main database to the binary log
The slave database copies the log of the master database to its own relay log
Read relay log events from the library , Put it back in the slave library data
️ 1.11 What is? MySQL Of GTID?
TID(Global Transaction ID, Global transaction ID) Is the global transaction identifier ,
Is the number of a committed transaction , And it's a globally unique number .
GTID It's from MySQL 5.6 Version begins to introduce heavyweight features in master-slave replication .
GTID It's actually made up of UUID+TID Composed of . among UUID It's a MySQL The unique identifier of the instance .
GTID Represents the number of transactions that have been committed on this instance , And monotonically increasing with transaction commit .
GTID It has the following functions :
① according to GTID You can know on which instance the transaction was originally committed .
② GTID It's convenient to exist Replication Of Failover.
Because you don't have to look for it like traditional mode replication master_log_file and master_log_pos.
③ be based on GTID It's easier to build master-slave replication ,
Make sure that each transaction is executed only once .
️ 1.12 stay Oracle in , What is? AWR?
AWR(Automatic Workload Repository, Automatic load information base )
yes Oracle 10g An important component introduced .
stay AWR It's stored for a period of time (Oracle 10g The default is 7 God ,Oracle 11g The default is 8 God )
Details of the active state of the database .
️ 1.13 Oracle The difference between dynamic monitoring and static monitoring
Oracle The listener is a server-side program ,
Listen for all requests from the client , And provide database services for it .
Please refer to the blog :https://blog.csdn.net/weixin_41645135/article/details/119966461
2. Fault handling class
2.1 ️Oracle High availability failure
Main library lost archive DG The whole process of troubleshooting
DG An error occurs when the logical standby database fails to synchronize the log ORA-01658 Handle
DG Of failover How to switch after
OGG REPA process Error ORA-01031 Error handling
OGG Initiate error reporting OGG-00014 Handle
2.2 ️MySQL fault
Mysql root The code forgot , How to retrieve ?
Linux7 Deploy Mysql Initialization error GLIBC_2.28 Handle
Windows Installer Failure to start causes Mysql The service is stuck
Windows install Mysql, Service failed to start , error 1053 Handle
Mysql Output Chinese display garbled code processing
The disk block exploded , How to delete MySQL binlog journal ?
Depends on disk capacity and mysql Parameter setting ;
show variables like ‘%expire_logs_days%’;
The default is 0, Never expire
It can be modified by setting global parameters or startup parameters :
set global expire_logs_days=30;
Profile add ;
expire_logs_days = 30(iPhone Mini)
3. Install the deployment class
️ 3.1.Oracle
Oracle RAC Cluster installation , Starting from scratch
Linux Environmental Science Oracle Installation complete , Nauseous crazy knock ten thousand words
Oracle High availability DG Detailed configuration method and steps
️ 3.2 MySQL
MySQL All kinds of installation methods are for you
MySQL Master slave replication high availability architecture
️ 3.3 postgreSQL
Linux Source code installation PostgreSQL
️ 3.4 Redis
Stay up late and burst your liver Liunx Environment source code installation Redis
Windows Lower installation Redis
4. Performance optimization class
Dismember an ox as skillfully as a butcher ,MySQL Implementation plan Explain Of 2 Big core
Programmers give up writing code , Direct use SQL Write logic , Are you useless ?
Oracle Execute the plan and view the treasure book , Super practical
Of the white billion pieces of data Oracle How to optimize the database ?
Everybody likes it 、 Collection 、 Focus on 、 Comments WeChat official account
边栏推荐
- Station B's June ranking list - feigua data up main growth ranking list (BiliBili platform) is released!
- 惯导标定国内外研究现状小结(删减版)
- unity webgl自适应网页尺寸
- Digital scrolling increases effect
- Common fitting models and application methods of PCL
- Django数据库(SQlite)基本入门使用教程
- How to design interface test cases? Teach you a few tips to draft easily
- 电气工程及其自动化
- Unity使用MaskableGraphic画一条带箭头的线
- Redis getting started complete tutorial: client management
猜你喜欢
MySQL提升大量数据查询效率的优化神器
Google Earth Engine(GEE)——Landsat 全球土地调查 1975年数据集
Number theory --- fast power, fast power inverse element
记一次JAP查询导致OOM的问题分析
MySQL --- 常用函数 - 字符串函数
[Mori city] random talk on GIS data (II)
牛客编程题--必刷101之双指针篇
AWS learning notes (I)
MES管理系统的应用和好处有哪些
The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
随机推荐
Redis入门完整教程:复制原理
Contribution of Writing Series
Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?
安德鲁斯—-多媒体编程
MMDetection3D加载毫米波雷达数据
Redis入門完整教程:問題定比特與優化
数字滚动增加效果
NuScenes数据集关于Radar数据的统计
Software testing -- common assertions of JMeter interface testing
Web3's need for law
电气工程及其自动化
6-6漏洞利用-SSH安全防御
Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!
Redis入门完整教程:复制拓扑
LeetCode 77:组合
基于ensp防火墙双击热备二层网络规划与设计
KYSL 海康摄像头 8247 h9 isapi测试
Station B's June ranking list - feigua data up main growth ranking list (BiliBili platform) is released!
Redis入门完整教程:客户端常见异常
Apifox,你的API接口文档卷成这样了吗?