某软件企业开发了一套新闻社交类软件,提供常见的新闻发布、用户关注、用户推荐、新闻点评、新闻推荐、热点新闻等功能,项目采用MySQL数据库来存储业务数据。系统上线后,随着用户数量的增加,数据库服务器的压力不断加大。为此,该企业设立了专门的工作组来解决此问题。
张工提出对MySQL数据库进行扩展,采用读写分离,主从复制的策略,好处是程序改动比较小,可以较快完成,后续也可以扩展到MySQL集群,其方案如图4-1所示。李工认为该系统的诸多功能,并不需要采用关系数据库,甚至关系数据库限制了功能的实现,应该采用NoSQL数据库来替代MySQL,重新构造系统的数据层。而刘工认为张工的方案过于保守,对该系统的某些功能,如关注列表、推荐列表、热搜榜单等实现困难,且性能提升不大;而李工的方案又太激进,工作量太大,短期无法完成,应尽量综合二者的优点,采用Key-Value数据库+MySQL数据库的混合方案。
经过组内多次讨论,该企业最终决定采用刘工提出的方案。
【问题1】(8分)
张工方案中采用了读写分离,主从复制策略。其中,读写分离设置物理上不同的主/从服务器,让主服务器负责数据的(a)操作,从服务器负责数据的(b)操作,从而有效减少数据并发操作的(c),但却带来了(d)。因此,需要采用主从复制策略保持数据的(e)。
MySQL数据库中,主从复制是通过binary log来实现主从服务器的数据同步,MySQL数据库支持的三种复制类型分别是(f) 、 g) 、(h)。
请将答案填入(a)~(h)处的空白,完成上述描述。
【问题2】(8分)
李工方案中给出了关系数据库与NoSQL数据的比较,如表4-1所示,以此来说明该新闻社交类软件更适合采用NoSQL数据库。请完成表4-1中的(a) ~ (d)处空白。
表4-1关系数据库与NoSQL数据库特征比较
【问题3】(9分)
刘工提出的方案采用了Key-Value数据库+MySQL数据库的混合方案,是根据数据的读写特点将数据分别部署到不同的数据库中。但是由于部分数据可能同时存在于两个数据库中,因此存在数据同步问题。请用200字以内的文字简要说明解决该数据同步问题的三种方法。
正确答案及解析
正确答案
解析
【问题1】
(a)写
(b)读
(c)延迟
(d)数据不一致风险
(e)一致性
(f)(g)(h) 基于SQL语句的复制(statement-based replication, SBR)
(g)基于行的复制(row-based replication, RBR)
(h)混合模式复制(mixed-based replication, MBR)
【问题2】
(a)弱一致性
(b)非结构化
(c)弱事务性
(d)海量数据
【问题3】
1、通过定时任务机制做定期数据更新。
2、通过触发器完成数据同步。
3、通过数据库插件完成数据同步。
包含此试题的试卷
你可能感兴趣的试题
Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.
-
- A.Artificial Intelligence
- B.Cloud Computing
- C.Internet of Things
- D.Big Data
- 查看答案
In project human resource management , ( )is not a source of power for the project manager.
-
- A.referent power
- B.expert power
- C.reward power
- D.audit power
- 查看答案
At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.
-
- A.detail feasibility analysis
- B.opportunity analysis
- C.economic feasibility analysis
- D.risk analysis
- 查看答案
( )is a grid that shows the project resources assigned to each work package.
-
- A.Stakeholder engagement assessment matrix
- B.Requirements traceability matrix
- C.Probability and impact matrix
- D.Responsibility assignment matrix
- 查看答案
Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.
-
- A.digital
- B.networking
- C.intelligentize
- D.informatization
- 查看答案