SysMT Logo
A smart database

Users guide ( covers cego version 2.20.8 )
by Bjoern Lemke, 06.04.2014

Cego comes under the GNU Copyright
(C)opyright 2010-2014 by Bjoern Lemke


Cego implements a multithreaded, relational and transactional database system with support for a SQL query language and several client access interfaces.
Cego is easy to configure and easy to use. The database administrator is supported in a smart way to set up any database system in a few minutes.
Within one Cego database instance, several independent transaction spaces ( tablesets ) can reside. Tablesets enable the administrator to set up a cloud-ready database for disjunctive users or customers.
Beyond the most known features of a transaction based database system, Cego also supports an advanced distributed multinode concept for performance and high availability reasons.
For the unpatient user, the section Getting Started describes an easy setup of a single node database configuration. To get in touch with the basics, single node configurations are described first without any distributed database aspects.
The Cego SQL language features are described the the section Cego SQL language . For the more advanced database programmer, the DBD Driver , the PHP cego extension , the JDBC Driver , the C API and C++ API could be interesting sections.
Chapter Multinode Environments discusses the aspects of the Cego distributed mode in more detail.

Table of Contents (TOC)

1   Overview
2   Getting Started
2.1   ... Building up a tableset using cgmkdb
2.2   ... Building up a tableset manually
2.3   ... Using the first tableset
3   The database xml configuration
3.1   ... General attributes
3.2   ... User entries
3.3   ... Role entries
3.4   ... Node entries
3.5   ... Tableset entries
3.5.1   ...... System files
3.5.2   ...... Data files
3.5.3   ...... Log files
4   Running the database
4.1   ... cego - Database backend
4.1.1   ...... Init mode
4.1.2   ...... User setup mode
4.1.3   ...... Role setup mode
4.1.4   ...... Role permission setup mode
4.1.5   ...... Tableset define mode
4.1.6   ...... Tableset create mode
4.1.7   ...... Tableset import/export mode
4.1.8   ...... Batch mode
4.1.9   ...... Daemon mode
4.1.10   ...... General options
4.2   ... cgclt - Console database client
4.2.1   ...... Batch file processing
4.2.2   ...... SQL dump file creation
4.2.3   ...... Single command processing
4.2.4   ...... Flow control
4.2.5   ...... Query abortion
4.2.6   ...... Profile
4.3   ... cgblow - Load simulation client
4.4   ... cglog - Log reader
4.5   ... Localization
4.6   ... Logging
4.7   ... Compatibility attributes
4.8   ... Tuning attributes
4.9   ... Tableset init file
5   The Cego SQL language
5.1   ... Fundamentals
5.1.1   ...... Datatypes
5.1.2   ...... Language Tokens
5.1.3   ...... Base productions
5.2   ... Creating a table
5.3   ... Inserting into a table
5.4   ... Attribute value handling
5.4.1   ...... Integer and long values
5.4.2   ...... String values
5.4.3   ...... Boolean values
5.4.4   ...... Datetime values
5.4.5   ...... Arbitrary integer values
5.4.6   ...... Float values
5.4.7   ...... Double values
5.4.8   ...... Decimal values
5.4.9   ...... Fixed values
5.4.10   ...... Small integer values
5.4.11   ...... Tiny integer values
5.4.12   ...... Blob values
5.5   ... Selecting from a table
5.5.1   ...... Selection
5.5.2   ...... Alias
5.5.3   ...... Joins
5.5.4   ...... Conditions
5.5.5   ...... Ordering
5.5.6   ...... Grouping
5.5.7   ...... Having
5.5.8   ...... Nested Query
5.5.9   ...... Inner Join
5.5.10   ...... Outer Join
5.5.10.1   ...... Left outer Join
5.5.10.2   ...... Right outer Join
5.5.11   ...... Numeric functions
5.5.12   ...... String functions
5.5.13   ...... Date functions
5.5.14   ...... Arithmetic functions
5.5.15   ...... Case when clause
5.5.16   ...... Execution plan
5.5.17   ...... System tables
5.6   ... Updating a table
5.7   ... Deleting from a table
5.8   ... Dropping a table
5.9   ... Altering a table
5.10   ... Using indexes
5.10.1   ...... Index check
5.11   ... Using foreign keys
5.12   ... Using check constraints
5.13   ... Views
5.14   ... Procedures
5.14.1   ...... Procedure sample 1 - Simple table copy
5.14.2   ...... Procedure sample 2 - Insert with id counter
5.14.3   ...... Procedure sample 3 - Exception Handling
5.15   ... Counter
5.15.1   ...... Adding a counter
5.15.2   ...... Listing counters
5.15.3   ...... Using a counter
5.15.4   ...... Setting a counter
5.15.5   ...... Dropping a counter
5.16   ... Tableset information commands
5.16.1   ...... show
5.16.2   ...... list
5.16.3   ...... tableinfo
5.16.4   ...... desc
5.16.5   ...... sync
5.17   ... Reorganisation
5.18   ... Append mode
5.19   ... Query caching
6   Transactions
6.1   ... Starting a transaaction
6.2   ... Committing a transaaction
6.3   ... Aborting a transaaction
6.4   ... Autocommit
6.5   ... Isolation level
7   Database administration with cgadm
7.1   ... Connecting to the database
7.2   ... Retrieving database information
7.2.1   ...... Pool information
7.2.2   ...... Lock information
7.2.3   ...... Thread administration
7.3   ... User administration
7.3.1   ...... Role management
7.3.2   ...... User management
7.4   ... Retrieving tableset information
7.4.1   ...... Datafile information
7.4.2   ...... Online Redo Log information
7.4.3   ...... Archive Log information
7.4.4   ...... Transaction information
7.5   ... Realtime monitor
7.6   ... Basic tableset administration
7.6.1   ...... Defintion
7.6.2   ...... Creation
7.6.3   ...... Start and stop
7.6.4   ...... Drop
7.6.5   ...... Remove
7.6.6   ...... Datafile expansion
7.6.7   ...... Tableset verification
7.6.8   ...... Tableset correction
7.6.9   ...... Checkpoint setting
7.6.10   ...... Auto correction
7.7   ... Backup administration
7.7.1   ...... Import and export
7.7.2   ...... Archive log mode
7.7.3   ...... Online backup mode
7.7.4   ...... Tableset recovery
8   Backup and recovery
8.1   ... Export and Import
8.2   ... Advanced methods
8.2.1   ...... Offline backup
8.2.2   ...... Online backup
8.2.2.1   ......... External backup
8.2.2.2   ......... Internal backup
8.2.3   ...... Backup statistics
8.2.4   ...... Recovery procedures
8.2.4.1   ......... Up to crash recovery
8.2.4.2   ......... Point in time recovery
8.2.5   ...... Logmanager execution shell
8.2.6   ...... Log tracing with cglog
9   Multinode environments ( Cego mode )
9.1   ... Roles
9.2   ... Administration
9.2.1   ...... Creating a multinode database
9.2.2   ...... Tableset Copy
9.2.3   ...... Tableset Startup
9.2.4   ...... Tableset Switch
9.2.5   ...... Relocating Tableset Secondary
9.3   ... Distributed queries
10   Using the DBD Driver
10.1   ... DBD connection string
10.2   ... Executing statements immediately
10.3   ... Executing prepared statements
10.4   ... Fetching data
11   Using the JDBC Driver
11.1   ... Loading the JDBC driver
11.2   ... JDBC connection string
11.3   ... Using statements
11.4   ... Using prepared statements
11.5   ... Using callable statements
12   Using the CegoNet C++ API
12.1   ... Connecting to the database
12.2   ... Executing a query
12.3   ... Fetching data
12.4   ... Retrieving query results
12.5   ... Class Reference
12.5.1   ...... CegoNet
12.5.2   ...... CegoField
12.5.3   ...... CegoFieldValue
12.5.4   ...... CegoProcVar
13   Using the CegoAdmNet C++ API
13.1   ... Connecting to the database
13.2   ... Administration methods
14   Using the C Wrapper API
14.1   ... Connecting to the database
14.2   ... Executing a query
14.3   ... Tuple fetching
14.4   ... Prepared Statements
14.5   ... Function Reference
15   Using the PHP extension
15.1   ... Connecting to the database
15.2   ... Preparing a query
15.3   ... Executing a query
15.4   ... Tuple fetching
15.5   ... Parameter binding
15.6   ... Function Reference
16   Database Tuning
16.1   ... Incompiled parameters
16.2   ... Configuration parameters