
	Access to relatonal database systems

------------------------------------------------------------1.1	what you need
1.2	config.ph sample
1.3	some pointers
2.1	config.ph samle

Appendix A	toymodel
Appendix A.1	PostgreSQL Case
Appendix A.2	MySQL Case
------------------------------------------------------------


See LDAP 1 for LDAP access.

1.1	what you need

	/usr/local/fml/databases/postgresql/Pg_toymodel.pl
	/usr/local/fml/databases/postgresql/DBI_toymodel.pl

1.2	config.ph sample

	$DATABASE_DRIVER

is the library file name. It has all raw level codes to access RDBMS
server. By default, the file is

	/usr/local/fml/databases/postgresql/toymodel.pl

If you prepare your own customized file, it is better to use another
file.

	/var/spool/ml/etc/fml/mysqldriver.pl

For example,

    $USE_DATABASE        = 1;
    $DATABASE_METHOD     = 'PostgreSQL';
    $SQL_SERVER_HOST     = 'postgres.fml.org';
    $SQL_SERVER_USER     = 'fukachan';
    $SQL_DATABASE_NAME   = 'fml';
    $DATABASE_DRIVER     = 'mysqldriver.pl';
    
    1;

fully expaned PATH is avaialble.

$DATABASE_DRIVER     = '/var/spool/ml/etc/fml/mysqldriver.pl';

1.3	some pointers

	http://www.sra.co.jp/people/t-ishii/
	ftp://ring.so-net.ne.jp/
	ftp://ring.asahi-net.or.jp/
	http://member.nifty.ne.jp/hippo2000/

2.1	config.ph samle

	$DATABASE_DRIVER

is the library file name. It has all raw level codes to access RDBMS
server. By default, the file is

	/usr/local/fml/databases/mysql/toymodel.pl

If you prepare your own customized file, it is better to use another
file.

	/var/spool/ml/etc/fml/mysqldriver.pl

For example,

    $USE_DATABASE        = 1;
    $DATABASE_METHOD     = 'mysql';
    $SQL_SERVER_HOST     = 'mysql.fml.org';
    $SQL_SERVER_USER     = 'fukachan';
    $SQL_SERVER_PASSWORD = 'uja';
    $SQL_DATABASE_NAME   = 'fml';
    $DATABASE_DRIVER     = 'mysqldriver.pl';
    
    1;

fully expaned PATH is avaialble.

$DATABASE_DRIVER     = '/var/spool/ml/etc/fml/mysqldriver.pl';

Appendix A	toymodel

Appendix A.1	PostgreSQL Case

  create table ml (ml text,
		file text, 
		address text,
		off int,
		options text);

    fml> select * from ml
    
      ml   |  file   |          address           | off | options 
    -------+---------+----------------------------+-----+---------
     elena | actives | fukachan@sapporo.iij.ad.jp |   0 | 
     elena | members | fukachan@sapporo.iij.ad.jp |   0 | 
     elena | actives | fukachan@fml.org           |   0 | 
     elena | members | fukachan@fml.org           |   0 | 
    (4 rows)
    
Appendix A.2	MySQL Case

  create table ml (
	ml char(64),
	file char(64),
	address char(64),
	off int,
	options char(64)
  );


		INDEX

