Method and device for accessing database
The invention discloses a database access method and device.The method comprises the steps that request information of a user is received, the request information is used for requesting read operation on databases in a database cluster, and the database cluster comprises a master database and at lea...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a database access method and device.The method comprises the steps that request information of a user is received, the request information is used for requesting read operation on databases in a database cluster, and the database cluster comprises a master database and at least one slave database associated with the master database; obtaining a database list, wherein the database list comprises available databases in the at least one slave database or the master database; and determining a target database from the database list, and performing a read operation on the target database according to the request information. By adopting the method, the target database to be accessed can be determined from the database list, and the database list comprises the available database or the main database, so that a user can conveniently and successfully access the database.
本发明公开了一种访问数据库的方法及装置,其中方法包括:接收用户的请求信息,所述请求信息用于请求对数据库集群中的数据库进行读操作,所述数据库集群包括主数据库和所述主数据库关联的至少一个从数据库;获取数据库列表,所述数据库列表包括所述至少一个从数据库中 |
---|