[gnome-db] Oracle create database for libgda



I was looking at what is still outstanding on the libgda oracle provider
that I've been working on, and one of them is the create_database
handler.

As you may be aware, the Oracle create database command takes
a lot of parameters.  As you may also be aware, the create_database
handler does not take any parameters other than the name.

This is a dilemma that I think we could fix by adding a parameter
list to the create_database function.  I'm not entirely sure how we
would extract the parameters in a meaningful way though, based
on the oracle create database command syntax.

Here's a description of that syntax [1]

create_database::=
CREATE DATABASE [database]
{ CONTROLFILE REUSE
| LOGFILE [GROUP integer] filespec [, [GROUP integer] filespec]...
| MAXLOGFILES integer
| MAXLOGMEMBERS integer
| MAXLOGHISTORY integer
| MAXDATAFILES integer
| MAXINSTANCES integer
| { ARCHIVELOG | NOARCHIVELOG }
| CHARACTER SET charset
| NATIONAL CHARACTER SET charset
| DATAFILE filespec [autoextend_clause] [, filespec [autoextend_clause]]...
| default_temp_tablespace
| undo_tablespace_clause
| SET STANDBY DATABASE { PROTECTED | UNPROTECTED }
| set_time_zone_clause
}...

autoextend_clause::=
AUTOEXTEND { OFF | ON [NEXT integer [ K | M ]] [maxsize_clause] }

maxsize_clause::=
MAXSIZE { UNLIMITED | integer [ K | M ] }

default_temp_tablespace::=
DEFAULT TEMPORARY TABLESPACE tablespace [TEMPFILE filespec] temp_tablespace_extent_clause

temp_tablespace_extent::=
[EXTENT MANAGEMENT LOCAL] [UNIFORM [SIZE integer [ K | M ]]]

undo_tablespace_clause::=
UNDO TABLESPACE tablespace
[DATAFILE filespec [autoextend_clause] [, filespec [autoextend_clause]]...]

As you can see, many of the parameters can be repeated, or are entirely
optional.  The second is, of course, easy to deal with, but is the first?
And what kind of names should the parameters have? 

Or should the parameters themselves just be a list of options which are 
tacked onto the end of the create database statement?  This option
is probably the most flexible.

Anyway, I just thought I would see if there are any comments out there.

[1] http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/statements_55.htm#2061235

-- 
Tim Coleman <tim timcoleman com>                       [43.28 N 80.31 W]
BMath, Honours Combinatorics and Optimization, University of Waterloo
 "They that can give up essential liberty to obtain a little temporary
  safety deserve neither liberty nor safety." -- Benjamin Franklin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]