v1.10

Document

How to Start SequoiaDB

Basic Operation

Data Model

Database Management

Aggregation

Index

Replication

Cluster

Connector

Reference

Development

Release Note

FAQ

  • Content
  • Comments
  • History

Overview

Overview

Python client driver offers the APIs for database and cluster manipulations. Database manipulations include connecting to the database, creating and removing of the users, the CRUD (create, retrieve, update, and delete) of data, the creating and removing of the index, getting and resetting of the snapshot. The manipulations of the cluster include the administration of the replica group and the data nodes, such as to start or stop a replica group or a data node, get the master node. For more details, please refer to the online Python API

Python Instances

Python client driver has two kinds of instances, one for database manipulations, and one for cluster manipulations.

  • Database manipulations

    There are three levels for storing data in SequoiaDB:

    1) database

    2) collection space

    3) collection

    Thus, for the database manipulations, there are 3 classes stand for database connection, collection space, and collection instances respectively, and another class for the cursor instances.

    client database class a connection instance stands for a single database connection
    collectionspace collection space class a collection space instance stands for a single collection space
    collection collection class a collection instance stands for a single collection
    cursor cursor class a cursor instance stands for a cursor created by a query

    Python client needs to use different instances to manipulate. For example, an operation of reading data need a cursor instance, and the creating of a collection space need a database instance.

  • Cluster Manipulation Instances

    There are two levels for cluster manipulation in SequoiaDB: 1) replica group 2) data node

    Note: replica group includes three types: catalog group, data group, coord group.

    Replica group instances and data node instances can be represented by the following two types of class instances:

    replicagroup replica group class a replica group instance represents a single replica group
    replicaode data node class a data node instance represents a single data node

    The cluster-related operations need to use the replica group and data node instances.

    replicagroup instances are used to manage the replica group. Their operations include start and stop replica groups, get the status of a node in the replica group, the name of the group, etc.

    replicanode instances are used to manage the node. Their operations include start and stop nodes, get the instance of specified master/slave nodes or the address info of a data node.

Error Information

Each function has its returned value, the definition of the returned values is:

SDB_OK (value is 0): successfully executed.

< 0: database error. Detailed error description can be found in err.prop file, or can be gotten by pysequoiadb.getErr(error_no).

> 0: system error. For more details, please refer to the system's error code information.

please login to comment.
Latest Comment
  • 2015-03-14

About Us

SequoiaDB is a financial-level distributed database vendor and is the first Chinese database listed in Gartner’s Magic Quadrant OPDBMS report. SequoiaDB has recently released version 3.0.
SequoiaDB is now penetrating the vertical sector Financial Industry quickly and had more than 50 banking clients and hundreds of enterprise customers in industries including government, telecommunication, Internet and IoT.

Beijing:
Tower R, No.8 North Star East Road, Chaoyang District, Beijing,China
Guangzhou:
Tower A, No.22 Qinglan Street, Panyu District, Guangzhou,China
Shenzhen:
Tsing Hua Tech Park, Nanshan District, Shenzhen,China
Tel:400-8038-339
E-mail:contact@sequoiadb.com