

	Cego
	----
	A relational and transactional database system

	(C)opyright 2006,2007,2008,2009,2010,2011,2012,2013 by Bjoern Lemke

	This software comes under the GNU general public license

Requirements
-----------
To build Cego, you need the latest lfc base and xml library packages available from www.lemke-it.com:
   
   lfcbase-X.X.X.tar.gz
   lfcxml-X.X.X.tar.gz

Furthermore, you need the GNU readline library available via http://tiswww.case.edu/php/chet/readline/rltop.html    

Tested platforms and compliers
----------------------------
Cego has been successfully tested on

       Solaris SPARC and x86 ( primary development platform ( x86) )
       Linux ( secondary )
       Mac OS X ( secondary )
       Windows/MinGW/MSYS ( compiled and tested )
       FreeBSD ( compiled and tested )
       HP-UX  ( compiled, but not heavy tested )
       
using GNU C++ compiler or Forte C++ ( Solaris )

Installation
------------
Run the configure script with the following options

    $ ./configure --prefix=<prefix-dir>

where prefix-dir is the base directory of the previous installed base and xml libraries.
For 64bit compile, you have to set the CFLAGS variable

    $ ./configure --prefix=<prefix-dir> CFLAGS=-m64 LDFLAGS=-m64

where -m64 is the valid compile option vor GNU gcc.

For Forte C compiles ( Sun Solaris ), you should specify
 
    $ ./configure --prefix=<prefix-dir> CFLAGS=-m64 LDFLAGS=-m64
 
Please note : For 64bit compile, you also need appropriate 64bit compiled versions of libBase,
libXML and the readline library

For multithreaded performance reasons, use for Solaris compiles additional compiler flags ( Forte CC )
and the the libumem library ( libumem is highly recommended ) 

On a M5000 ( UltraSPRC VII ), I used the following flags 

    $ ./configure --prefix=<prefix-dir> CFLAGS="-m64 -mt -KPIC -xprefetch=yes -xarch=sparcfmaf -fma=fused 
      		  			-xchip=sparc64vi" LDFLAGS="-xarch=sparcfmaf -lumem"

Please note: On an AMD Athlon(tm) 64 Processor 3800+ Socket 939 with Solais x86, the linkage 
of the libumem slows down application performance of about 20% 

On FreeBSD 8.1, cego has been sucessfully compiled using the clang++ compiler with the following options
With cego 2.10.0, code adaptions have been taken place to avoid compiler warnings

   $ export CC=clang 
   $ export CXX=clang++
   $ ./configure --prefix=<prefix-dir>

Run make

    $ make

This builds the Cego executable programs. You can install
the resulting files with the install command

    $ make install

If compiled  succesful, you can check the database by typing 

    $ checkDB base
    #############################
    ##### Native SQL checks #####
    #############################
    Creating admin user ...... operation ok
    Creating database user ...... operation ok
    Creating database ...... operation ok
    Batch execute check001.sql ### Basic information commands ... operation ok
    Batch execute check002.sql ### Data type checks... operation ok
    Batch execute check003.sql ### Index checks... operation ok
    Batch execute check004.sql ### Null value checks... operation ok
    Batch execute check005.sql ### Procedure checks... operation ok
    Batch execute check006.sql ### Foreign key checks... operation ok
    Batch execute check007.sql ### Transaction checks... operation ok
    Batch execute check008.sql ### Procedure exception checks... operation ok
    Batch execute check009.sql ### select for update checks... operation ok
    Batch execute check010.sql ### Distinct operator checks... operation ok
    Batch execute check011.sql ### Table structure change checks... operation ok
    Batch execute check012.sql ### Update operation checks... operation ok
    Batch execute check013.sql ### Small logistic application sample... operation ok
    Batch execute check014.sql ### Insert operation checks... operation ok
    Batch execute check015.sql ### Insert by select check... operation ok
    Batch execute check016.sql ### String function tests... operation ok
    Batch execute check017.sql ### Nested view checks... operation ok
    Batch execute check018.sql ### Outer join checks... operation ok
    Batch execute check019.sql ### Case when clause checks... operation ok
    Batch execute check020.sql ### Procedure in out checks... operation ok
    ################################
    ##### Export/Import checks #####
    ################################
    Creating admin user ...... operation ok
    Creating database user ...... operation ok
    Creating database ...... operation ok
    Batch execute prepExportReady.sql... operation ok
    ########### XML Export #########
    Exporting database as XML ... operation ok
    Elapsed time :  0.80 seconds
    Recreating database ... operation ok
    Importing database from XML ... operation ok
    Elapsed time :  1.07 seconds
    ########### Bin Export #########
    Exporting database as binary ... operation ok
    Elapsed time :  0.67 seconds
    Recreating database ... operation ok
    Importing database from binary ... operation ok
    Elapsed time :  0.55 seconds
    ################################


This builds up a sample database and performs several checks on the database.
If succesful, the output should appear as listed above

More sophisticated checks can be performed by running the quality gate checks

    $ checkDB gate
    
For logging, a status table is written and printed out at the end, when all quality gates have been passed.
If succesful, all checks should be marked as ok, otherwise an error indicates the failed gate checks.


Have fun !  

For using the Cego database suite, please refer to the HTML-based documentation on www.lemke-it.com

