Implementation method and device for database access

The invention discloses an implementation method and device for database access, and is applied to a read-write separation database framework. The read-write separation database framework comprises a main write library, an elastic write library and a read library, wherein the main write library and...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: FAN XIANKAI
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses an implementation method and device for database access, and is applied to a read-write separation database framework. The read-write separation database framework comprises a main write library, an elastic write library and a read library, wherein the main write library and the read library carry out data synchronization on the basis of a synchronization strategy. The implementation method for the database access comprises the following steps that: receiving a data insertion request, wherein the data insertion request carries a business type; determining the access state of the business type; when the access state is a daily state, finishing data insertion on the basis of the main write library; and when the access state is an elastic write state, finishing data insertion on the basis of the elastic write library. 说明书披露种数据库访问的实现方法和装置,应用于读写分离的数据库架构中,该读写分离的数据库架构包括主写库、弹性写库以及读库,其中,所述主写库与所述读库之间基于同步策略进行数据同步,所述数据库访问的实现方法包括:接收到数据插入请求,所述数据插入请求中携带业务类型;确定所述业务类型的访问状态;当所述访问状态为日常状态时,基于主写库完成数据插入;当所述