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

Outline

C client application is mainly to provide database connection, collectionspaces, collections, cursor, replica group, node, domain, lob. More refer to the online C API

Handle

The handle of C client-driven is divided into two types. One is used to operate databases, the other is used to operate clusters.

  • Database Operation Handle

    There are 3 degrees of data in SequoiaDB:

    1) Database

    2) Collection space

    3) Collection

    Logically, every collection space in SequoiaDB has no physical upper boundary. Every collection space is stored in a stand-alone file. So the amount of collection space depends on the size of disk and memory.

    A collection space contains at most 4096 collections. Every collection can contain more than one record. In a physical system, the size of a collection space is at most 256GB.

    Compared with relation database, we can regard record as line in relation database. We can regard collection as table in relation database.

    So in client, there are 3 Handles representing connection, collectionspace and collection, including 1 handle represents cursor, 1 handle represents LOB:

    sdbConnectionHandle Database instance It represents a stand-alone connection
    sdbCSHandle CollectionSpace instance It represents a stand-alone collection space
    sdbCollectionHandle Collection instance It represents a stand-alone collection
    sdbCursorHandle Cursor instance It represents a result set of a query
    sdbLobHandle LOB's handle Represent a LOB

    C client-driven application operate with different handles. For example, reading data will use Cursor Handle, then creating collectionspace uses database connection Handle.

    Note:

    1. As for a connection, in its collection space, collections share one socket. So in mutiple-thread system, the system should guarantee that the socket can be used merely by one thread whenever.

    2. Generally, it is not recommended to manipulate a connection instance and other instance, which it generates, with more than threads.

    3. If each thread merely use its own connection instance and other instances it generates, it is thread-safe.

  • Cluster Operation Handle

    There are three degrees of cluster operation in SequoiaDB:

    1) Replica Group

    2) Data Node

    3) Domain

    Note:

    Replica group contain two tpyes: Catalog ReplicaGroup, Data ReplicaGroup.

    ReplicaGroup instances and Data Node instances can be represented by the following three types of Handles.
    sdbReplicaGroupHandle ReplicaGroup Handle It represents a stand-alone ReplicaGroup
    sdbNodeHandle Data Node Handle It represents a stand-alone Data Node
    sdbDomainHandle Domain Handle It represents a stand-alone Domain

    Cluster-related operations need to use ReplicaSet Handle and Data Node Handle.

    The sdbReplicaGroupHandle instants is to manage replica groups, including starting and stopping replica groups, getting the status, name-information and number-information of nodes in the replica group.

    The sdbNodeHandle instants is to manage Data Nodes,including starting and stopping the specified data node,getting the specified data node instants and maste-slave data node instants and address-information of data node.

    The sdbDomainHandle is used to modify, obtain the domain information.

Error Information

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

SDB_OK (value is 0): Execution succeeds.

< 0: Database error, the detailed error description can be found in the include/ossErr.h directory of the C driver development kit.

> 0: System error, please check the related 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