收藏一下
题目内容:
1. Explain MySQL architecture. – The front layer takes care of network connections and security authentications, the middle layer does the SQL query parsing, and then the query is handled off to the storage engine. A storage engine could be either a default one supplied with MySQL (MyISAM) or a commercial one supplied by a third-party vendor (ScaleDB, InnoDB, etc.)
2. Explain MySQL locks. – Table-level locks allow the user to lock the entire table, page-level locks allow locking of certain portions of the tables (those portions are referred to as tables), row-level locks are the most granular and allow locking of specific rows.
3. Explain multi-version concurrency control in MySQL. – Each row has two additional columns associated with it – creation time and deletion time, but instead of storing timestamps, MySQL stores version numbers.
4. What are MySQL transactions? – A set of instructions/queries that should be executed or rolled back as a single atomic unit.
5. What’s ACID? – Automicity – transactions are atomic and should be treated as one in case of rollback. Consistency – the database should be in consistent state between multiple states in transaction. Isolation – no other queries can access the data modified by a running transaction. Durability – system crashes should not lose the data.
6. Which storage engines support transactions in MySQL? – Berkeley DB and InnoDB.
7. How do you convert to a different table type? – ALTER TABLE customers TYPE = InnoDB
8. How do you index just the first four bytes of the column? – ALTER TABLE customers ADD INDEX (business_name(4))
9. What’s the difference between PRIMARY KEY and UNIQUE in MyISAM? – PRIMARY KEY cannot be null, so essentially PRIMARY KEY is equivalent to UNIQUE NOT NULL.
10. How do you prevent MySQL from caching a query? – SELECT SQL_NO_CACHE …
11. What’s the difference between query_cache_type 1 and 2? – The second one is on-demand and can be retrieved via SELECT SQL_CACHE … If you’re worried about the SQL portability to other servers, you can use SELECT /* SQL_CACHE */ id FROM … – MySQL will interpret the code inside comments, while other servers will ignore it.
题目内容:
1. Explain MySQL architecture. – The front layer takes care of network connections and security authentications, the middle layer does the SQL query parsing, and then the query is handled off to the storage engine. A storage engine could be either a default one supplied with MySQL (MyISAM) or a commercial one supplied by a third-party vendor (ScaleDB, InnoDB, etc.)
2. Explain MySQL locks. – Table-level locks allow the user to lock the entire table, page-level locks allow locking of certain portions of the tables (those portions are referred to as tables), row-level locks are the most granular and allow locking of specific rows.
3. Explain multi-version concurrency control in MySQL. – Each row has two additional columns associated with it – creation time and deletion time, but instead of storing timestamps, MySQL stores version numbers.
4. What are MySQL transactions? – A set of instructions/queries that should be executed or rolled back as a single atomic unit.
5. What’s ACID? – Automicity – transactions are atomic and should be treated as one in case of rollback. Consistency – the database should be in consistent state between multiple states in transaction. Isolation – no other queries can access the data modified by a running transaction. Durability – system crashes should not lose the data.
6. Which storage engines support transactions in MySQL? – Berkeley DB and InnoDB.
7. How do you convert to a different table type? – ALTER TABLE customers TYPE = InnoDB
8. How do you index just the first four bytes of the column? – ALTER TABLE customers ADD INDEX (business_name(4))
9. What’s the difference between PRIMARY KEY and UNIQUE in MyISAM? – PRIMARY KEY cannot be null, so essentially PRIMARY KEY is equivalent to UNIQUE NOT NULL.
10. How do you prevent MySQL from caching a query? – SELECT SQL_NO_CACHE …
11. What’s the difference between query_cache_type 1 and 2? – The second one is on-demand and can be retrieved via SELECT SQL_CACHE … If you’re worried about the SQL portability to other servers, you can use SELECT /* SQL_CACHE */ id FROM … – MySQL will interpret the code inside comments, while other servers will ignore it.
发表评论
-
linux清除mysql占用cache
2013-11-01 10:55 2041在linux内部将cache分为2种: 1、write/rea ... -
规范、经验
2013-11-04 17:23 585尽量不用NULL列 query cach ... -
mysql模拟队列
2013-05-14 13:42 1091-- 初始化数据 DROP TABLE IF EXIST ... -
高性能mysql[第3版]--笔记
2013-05-03 23:35 06.8 6.8.1 mysql构建消息队列 se ... -
生成随机字符串
2013-04-30 10:41 0DELIMITER $$ CREATE FUNCTIO ... -
复制笔记
2013-04-27 17:48 0http://dev.mysql.com/doc/refman ... -
[整理]mysql导入导出
2013-04-24 22:40 0方案一:拷贝物理文件(innodb, innodb_file_ ... -
【整理中】mysql字符集使用
2013-04-24 22:29 0show variables like 'characte ... -
MYSQL监控内容整理
2013-04-24 13:40 0内容 硬解析,软解析,等待事件,表空间,索引,触发器,alte ... -
无限级联分类查询
2013-04-24 09:36 0DROP TABLE IF EXISTS location ... -
mysqldbcompare --使用
2013-04-07 09:39 0http://dev.mysql.com/doc/workbe ... -
MYSQL 发送数据大小计算公式
2013-03-29 16:20 884引用:http://www.realzyy.com/?p=15 ... -
#mysql 笔记#索引长度限制
2013-03-18 12:11 852http://dev.mysql.com/doc/refman ... -
mysqldump简单使用
2013-01-21 15:27 0mysqldump -B或者--databases:备份指定数 ... -
linux经常登入登出mysql重复输入密码
2013-01-16 17:51 970经常登入、登出mysql,尤其是密码重新输入比较复杂时,使用& ... -
mysql存储过程实现行转列
2012-08-30 16:24 2135把表t_rows中的数据转换 ... -
mysql 判断字符串是否是数字
2012-07-12 10:21 2975查询表table_name中col_name(字符串类型)的值 ... -
[转载]drop 大表效率问题
2012-06-15 09:32 46http://www.mysqlops.com/2011/05 ... -
monyog安装文件
2012-03-26 16:29 1274monyog安装包,绿色版 -
linux sysbench+mysql
2012-02-16 17:25 0一、sysbench安装 tar -zxvf ...
相关推荐
《百度历年笔试题解析》 在信息技术领域,面试与笔试是评估求职者技能的重要环节,尤其是对于技术型岗位,如百度这样的互联网巨头,其历年笔试题不仅反映了公司的技术导向,也揭示了当前行业关注的技术热点。本文将...
在本文中,我们将深入探讨数据库相关知识,特别是针对百度笔试题中的几个SQL查询和数据库优化策略。首先,我们来看题目提供的关系模式: User(userId, userName) - 用户关系,包含用户ID和用户名。 Article...
### PHP笔试题知识点详解 #### 一、基础及程序题 ...以上是对“php笔试题 百度”相关知识点的详细总结,涵盖了基础编程、数据库技术、综合技术和项目设计等多个方面,希望能够帮助读者全面理解这些知识点。
《2015年百度校招笔试题:技术类岗位深度解析》 2015年,百度作为中国互联网巨头,面向全球高校开展了一场规模宏大的校招活动,旨在选拔优秀的技术人才加入其麾下。这次笔试题涵盖了多个技术领域,如Web开发、机器...
【标签】:“百度2008WEB开发笔试题”标签明确了讨论的焦点,即百度在2008年的笔试题目,这涵盖了HTML、CSS、JavaScript、PHP、MySQL等相关WEB开发技术。 【压缩包子文件的文件名称列表】: 1. "公司面试题之.doc" ...
本文档是关于2020兴业数金Java在线笔试题的知识点总结,涵盖了Java编程语言、计算机存储系统、多线程同步、MySQL数据库等多个方面的知识点。 一、Java编程语言 1. Java重载的几种方式:Java中的方法重载是指在同一...
但是代码中存在错误,如`mysql_fetch_array()`的第二个参数应为`MYSQL_ASSOC`或`MYSQL_NUM`,而非`MYSQL_ASSOC`后的空值;同时`echo`语句中的数组索引使用错误(正确答案为A)。正确的代码示例如下: ```php mysql_...
数据库笔试题及答案是IT行业中常见的一种考核方式,主要针对应聘者或在校学生对数据库理论与实践知识的掌握程度进行评估。这份压缩包文件包含了多个相关的资源,可以帮助备考者了解和复习数据库领域的核心知识点。 ...
【百度2008笔试题】涉及的知识点主要包括编程题、算法题和系统设计题,以下是对这些题目涉及的知识点的详细解析: 1. **编程题** - **集合查找优化**:题目要求设计一个程序,高效地处理大量TERM数组查询集合ID。...
【百度2011实习笔试题】涉及到的知识点主要涵盖C++编程、软件设计模式以及网络协议中的TCP连接状态。下面将对这些知识点进行详细解释。 1. **extern "C"{}** `extern "C"`是C++中的一个链接器指令,用于告诉编译器...
### 技术类笔试知识点解析 #### 1. `extern "C"` 的概念与作用 - **概念**:`extern "C"` 是C++中的一种声明方式,用于告诉编译器接下来的变量或函数应该按照C语言的方式进行链接。这是因为在C++中,函数名可能会...
【标题】"2013百度校园招聘笔试题"揭示了该题目主要涉及的是网络通信、数据库操作以及软件设计模式等方面的知识,这些都是信息技术领域中重要的基础概念和技术。 首先,让我们来探讨TCP/IP数据库操作的过程。在TCP/...
【百度2008年笔试题】涉及到的IT知识点包括编程、算法、系统设计和数据库设计,以下是详细的解析: **编程题** 这道题目考察的是高效数据结构和算法的应用。要设计一个程序处理TERM数组,找出包含所有TERM的集合ID...
【百度09年校园招聘笔试试题】涉及的IT知识点主要集中在算法与程序设计和系统设计两个领域。以下是对这两个部分的详细解析: **一、算法与程序设计** 1. **寻找二叉树中最深的指定元素** - **问题描述**:在...
### 百度2011到2012软件研发笔试题知识点解析 #### 虚拟内存概念与意义 1. **虚拟内存定义**:虚拟内存是一种计算机内存管理技术,通过这种技术,操作系统可以创建一个比实际物理内存更大的地址空间。这个地址空间...
### 百度技术类笔试题目解析 #### 一、网络编程与HTTP请求处理 - **题目解析**:此部分考察面试者对网络编程的理解以及HTTP请求处理的基本流程。 - **如何判断一个HTTP请求已结束**:通常一个HTTP请求是以特定...
在IT行业的求职过程中,尤其是针对顶级的互联网公司如阿里巴巴(Alibaba)、腾讯(Tencent)、百度(Baidu)、360、网易(NetEase),以及国际巨头如谷歌(Google)和微软(Microsoft),笔试和面试环节是至关重要的...
2. 存储方案:可以使用关系型数据库,如MySQL,设计用户表、游戏表、分数表,分数表中包含用户ID、游戏ID、分数和提交时间,利用主键和外键约束确保数据一致性。 3. 防作弊功能:验证客户端提交的数据,如使用数字...
2. **百度**:作为中国最大的搜索引擎公司,百度的笔试面试题通常涵盖自然语言处理、搜索引擎优化、机器学习、人工智能等方面。例如,可能需要理解并分析搜索排名算法,或者设计一个智能推荐系统。 3. **腾讯**:...