sokaoti.com
星美联合股份有限公司5月招聘面试题110道2020517

在MySQL数据库中,对作为临时存放查询的中间结果集的存储引擎描述正确的是()。

A.始终使用Memory作为临时存放查询的中间结果集

B.默认使用InnoDB作为临时存放查询的中间结果集

C.如果中间结果集含有TEXT或BLOB列的类型字段,则MySQL数据库会将其转换到MylSAM存储引擎表而存放到磁盘中

D.默认使用MylSAM作为临时存放查询的中间结果集


正确答案:B


SharedPreferences和Preferences的修改支持事务吗?()

A.支持,不支持

B.不支持,不支持

C.不支持,支持

D.支持,支持


参考答案:A


关于审批这个应用以下说法错误的是?()

A、支持按部门设置默认审批人

B、支持自定义审批类型

C、审批内容不支持图片、文字

D、审核内容不支持上传附件


答案:CD


Which three are properties of the MyISAM storage engine?()

A.Transaction support

B.FULLTEXT indexing for text matching

C.Table and page level locking support

D.Foreign key support

E.Geospatial indexing

F.HASH index support

G.Table level locking only


参考答案:B, E, G


What is true regarding InnoDB locking?()

A.InnoDB uses row and table-level locks, but row locks are not escalates

B.InnoDB locks only those rows that are updated

C.InnoDB only uses row locks, not page or table-level locks

D.InnoDB row locks may be escalated to page or table-level locks

E.InnoDB uses row-level or table-level locks depending on the number of rows affected


参考答案:B


星美联合股份有限公司5月招聘面试题面试题面试官常问到的一些题目整理如下:问题 Q1:大数据的文件读取?可用的回答 : 1. 利用生成器generator 2. 迭代器进行迭代遍历:for line in file 问题 Q2:你常用的mysql引擎有哪些?各引擎间有什么区别?可用的回答 : 主要 MyISAM 与 InnoDB 两个引擎,其主要区别如下: 一、 InnoDB 支持事务,MyISAM 不支持,这一点是非常之重要。 事务是一种高级的处理方式,如在一些列增删改中只要哪个出错还可以回滚还原,而 MyISAM就不可以了; 二、 MyISAM 适合查询以及插入为主的应用,InnoDB 适合频繁修改以及涉及到安全性较高的应用; 三、 InnoDB 支持外键,MyISAM 不支持; 四、 MyISAM 是默认引擎,InnoDB 需要指定; 五、 InnoDB 不支持 FULLTEXT 类型的索引; 六、 InnoDB 中不保存表的行数,如 select count(*) from table 时,InnoDB; 需要扫描一遍整个表来计算有多少行,但是 MyISAM 只要简单的读出保存好的行数即可。 注意的是,当 count(*)语句包含 where 条件时 MyISAM 也需要扫描整个表; 七、 对于自增长的字段,InnoDB 中必须包含只有该字段的索引,但是在 MyISAM 表中可以和其他字段一起建立联合索引; 八、 清空整个表时,InnoDB 是一行一行的删除,效率非常慢。MyISAM 则会重建表; 九、 InnoDB 支持行锁(某些情况下还是锁整表,如 update table set a=1 where user like %lee% 问题 Q3:创建一个简单tcp服务器需要的流程?可用的回答 : 1.socket创建一个套接字 2.bind绑定ip和port 3.listen使套接字变为可以被动链接 4.accept等待客户端的链接 5.recv/send接收发送数据 问题 Q4:什么是猴子补丁?可用的回答 :在运行时动态修改类和模块问题 Q5:如何跨模块共享全局变量?可用的回答 :要在单个程序中跨模块共享全局变量,请创建一个特殊模块。在应用程序的所有模块中导入配置模块。该模块将作为跨模块的全局变量提供。问题 Q6:Python是如何进行内存管理的?可用的回答 : 从三个方面来说,一对象的引用计数机制,二垃圾回收机制,三内存池机制 一、对象的引用计数机制 Python内部使用引用计数,来保持追踪内存中的对象,所有对象都有引用计数。 引用计数增加的情况: 1,一个对象分配一个新名称 2,将其放入一个容器中(如列表、元组或字典),引用计数减少的情况: 1,使用del语句对对象别名显示的销毁 2,引用超出作用域或被重新赋值 sys.getrefcount( )函数可以获得对象的当前引用计数 多数情况下,引用计数比你猜测得要大得多。对于不可变数据(如数字和字符串),解释器会在程序的不同部分共享内存,以便节约内存。 二、垃圾回收 1,当一个对象的引用计数归零时,它将被垃圾收集机制处理掉。 2,当两个对象a和b相互引用时,del语句可以减少a和b的引用计数,并销毁用于引用底层对象的名称。然而由于每个对象都包含一个对其他对象的应用,因此引用计数不会归零,对象也不会销毁。(从而导致内存泄露)。为解决这一问题,解释器会定期执行一个循环检测器,搜索不可访问对象的循环并删除它们。 三、内存池机制 Python提供了对内存的垃圾收集机制,但是它将不用的内存放到内存池而不是返回给操作系统。 1,Pymalloc机制。为了加速Python的执行效率,Python引入了一个内存池机制,用于管理对小块内存的申请和释放。 2,Python中所有小于256个字节的对象都使用pymalloc实现的分配器,而大的对象则使用系统的malloc。 3,对于Python对象,如整数,浮点数和List,都有其独立的私有内存池,对象间不共享他们的内存池。也就是说如果你分配又释放了大量的整数,用于缓存这些整数的内存就不能再分配给浮点数。 问题 Q7:什么是粘包? socket 中造成粘包的原因是什么? 哪些情况会发生粘包现象?可用的回答 : 粘包:在接收数据时,一次性多接收了其它请求发送来的数据(即多包接收)。如: 对方第一次发送hello,第二次发送world,在接收时,应该收两次, 一次是hello,一次是world,但事实上是一次收到helloworld,一次收到空,这种现象叫粘包。 原因: 粘包问题主要还是因为接收方不知道消息之间的界限,不知道一次性提取多少字节的数据所造成的。 什么情况会发生: 1、发送端需要等缓冲区满才发送出去,造成粘包 发送数据时间间隔很短,数据很小,会合到一起,产生粘包 2、接收方不及时接收缓冲区的包,造成多个包接收 客户端发送了一段数据,服务端只收了一小部分, 服务端下次再收的时候还是从缓冲区拿上次遗留的数据,产生粘包 解决方案: 一个思路是发送之前,先打个招呼,告诉对方自己要发送的字节长度, 这样对方可以根据长度判断什么时候终止接受 注意: 只有TCP有粘包现象,UDP永远不会粘包! 问题 Q8:什么是_init_?可用的回答 :_init_是Python中的方法或者结构。在创建类的新对象/实例时,将自动调用此方法来分配内存。所有类都有_init_方法。问题 Q9:简述 yield和yield from关键字?可用的回答 : 1、可迭代对象与迭代器的区别 可迭代对象:指的是具备可迭代的能力,即enumerable. 在Python中指的是可以通过for-in 语句去逐个访问元素的一些对象,比如元组tuple,列表list,字符串string,文件对象fi

The InnoDB engine has a feature known as clustered indexes.Which three statements are true about clustered indexes as used in InnoDB?()

A.A primary key must exist for creation of a clustered index

B.A clustered index allows fulltext searching within InnoDB

C.The first unique index is always used as a clustered index and not a primary key

D.A clustered index provides direct access to a page containing row data

E.If no indexes exist, a hidden clustered index is generated based on row IDs

F.A primary key is used as a clustered index

G.A clustered index is a grouping of indexes from different tables into a global index for faster searching


参考答案:D, E, F


Which two statements are true about InnoDB auto-increment locking?()

A.The auto-increment lock can be a table-level lock

B.InnoDB never uses table-level locks

C.Some settings for innodb_autoinc_lock_mode can help reduce locking

D.InnoDB always protects auto-increment updates with a table-level lock


参考答案:A, C


关于常见的存储引擎,下面描述错误的是_____________。

A.InnoDB存储引擎虽然不支持事件处理应用程序,但是支持外键、同时还支持崩溃修复能力和并发控制

B.MEMORY存储引擎的所有数据都存储在内存中,数据的处理速度快但安全性不高

C.MyISAM存储引擎提供了高速的存储与检索和全文探索能力,它并不支持事务处理应用程序

D.除了InnoDB、MOMORY和MyISAM存储引擎外,MRG_MYISAM、BLACKHOLE和CSV也是MySQL数据库的存储引擎


参考答案:A


在Mysql数据库下,以下哪个选项最好地描述了InnoDB表为什么需要主键并且主键应当尽量短?()

A.因为InnoDB在一个日志中保存到所有主键的指针,短的主键使日志小

B.因为InnoDB使用主键定位二级索引,短的主键使查询快

C.因为InnoDB使用主键定位表记录,短的主键使查询快

D.因为InnoDB使用主键定位表,短的主键使查询快


参考答案:C


关于myisamchk工具,以下描述正确的有哪些?()

A.它能检查MyISAM表

B.它能修复MyISAM表

C.它能获取MyISAM表的信息

D.它能优化MyISAM表


参考答案:ABCD

更多 “星美联合股份有限公司5月招聘面试题110道2020517” 相关考题
考题 What is true regarding InnoDB locking?()A、InnoDB uses row and table-level locks, but row locks are not escalatesB、InnoDB locks only those rows that are updatedC、InnoDB only uses row locks, not page or table-level locksD、InnoDB row locks may be escalated to page or table-level locksE、InnoDB uses row-level or table-level locks depending on the number of rows affected正确答案:B

考题 Which three are properties of the MyISAM storage engine?()A、Transaction supportB、FULLTEXT indexing for text matchingC、Table and page level locking supportD、Foreign key supportE、Geospatial indexingF、HASH index supportG、Table level locking only正确答案:B,E,G

考题 mysql 参照表和被参照表可以是同一个表吗?长久以来,流行工具开源RDBMSMySQL并没有支持外键,最近MySQL的不同版本都通过新InnoDB列表引擎支持外键。为了建立两个MySQL表之间的一个外键关系,MySQL创建关联表必须满足以下三种情况:* 两个表必须是InnoDB表类型。 * 使用在外键关系的域必须为索引型(Index)。 * 使用在外键关系的域必须与数据类型相似。例子.CREATE TABLE DEPT ( id INT PRIMARY KEY, name varchar(10), pid INT) ENGINE=InnoDB ;ALTER TABLE DEPT ADD CONSTRAINT DEPT_cons FOREIGN KEY (pid) REFERENCES DEPT(id);下面是插入数据的结果.mysql> INSERT INTO DEPT VALUES(1, '总公司', NULL);Query OK, 1 row affected (0.04 sec)mysql> INSERT INTO DEPT VALUES(2, '分公司', 1);Query OK, 1 row affected (0.11 sec)mysql> INSERT INTO DEPT VALUES(3, '办事处', 2);Query OK, 1 row affected (0.08 sec)mysql>mysql> INSERT INTO DEPT VALUES(4, '非法数据', 5);ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`test`.`dept`,CONSTRAINT `DEPT_cons` FOREIGN KEY (`pid`) REFERENCES `dept` (`id`))mysql>希望能帮到你,别忘了采纳我的答案哦,祝你生活愉快!

考题 多选题Full Atomicity, Consistency, Isolation, Durability (ACID) compliance is a necessity for a new application, which heavily reads and writes data. This requires the following config file options: Sync_binlog=1 Innodb_flush_log_at_trx_commit=1 Innodb_doublewrite=1 However, this configuration is expected to introduce disk I/O overhead. What three changes will reduce disk I/O overheads?()AUse of soft links for database directories on the same physical diskBUse of delay_key_write=ON for batch index updateCAllocation of RAM to the buffer pool such that more of the data can fit in RAMDPlacement of InnoDB log files and datadir on separate physical disksEUse of separate directories on the same physical disk for log files and data files正确答案:D,E解析:暂无解析

考题 单选题SharedPreferences和Preferences的修改支持事务吗?()A 支持,不支持B 不支持,不支持C 不支持,支持D 支持,支持正确答案:D解析:暂无解析

考题 You have table 'apps','userdata' on server that uses MyISAM storage engine. You want to transfer this data to server but use InnoDB engine instead. You execute the following commands: ServerB commands: Shell> mysqldump –u root –h server –no-data apps userdata | mysql –u root –p apps Shell> mysql –u root –p –h server –e 'ALTER TABLE 'apps','userdata' ENGINE=InnoDB;' Shell> mysqldump –u root –p –h server –no-create-info –order-by-primary apps userdata | mysql –u root –p apps What effect does the – order-by-primary argument have on the mysqldump command?()A、It exports tables with the most indexes first to assist with import speedsB、It ensures that unique indexes have no conflicts when the data is dumpedC、It orders by primary key to assist in speeding up importing to InnoDB tablesD、It must be specified so index data is dumped correctly when –on-create-info is used正确答案:C

考题 多选题关于myisamchk工具,以下描述正确的有哪些?()A它能检查MyISAM表B它能修复MyISAM表C它能获取MyISAM表的信息D它能优化MyISAM表正确答案:C,A解析:暂无解析

考题 SharedPreferences和Preferences的修改支持事务吗?()A、支持,不支持B、不支持,不支持C、不支持,支持D、支持,支持正确答案:A

考题 Full Atomicity, Consistency, Isolation, Durability (ACID) compliance is a necessity for a new application, which heavily reads and writes data. This requires the following config file options: Sync_binlog=1 Innodb_flush_log_at_trx_commit=1 Innodb_doublewrite=1 However, this configuration is expected to introduce disk I/O overhead. What three changes will reduce disk I/O overheads?()A、Use of soft links for database directories on the same physical diskB、Use of delay_key_write=ON for batch index updateC、Allocation of RAM to the buffer pool such that more of the data can fit in RAMD、Placement of InnoDB log files and datadir on separate physical disksE、Use of separate directories on the same physical disk for log files and data files正确答案:B,C,D

考题 关于myisamchk工具,以下描述正确的有哪些?()A、它能检查MyISAM表B、它能修复MyISAM表C、它能获取MyISAM表的信息D、它能优化MyISAM表正确答案:A,B,C,D