Lasse,

> Interesting... Developers in our project have a local copy of the
production database for working with but our unit test runs always create a
database from scratch and run all schema migrations on it before running
the tests. Creating and migrating the unit test DB usually takes between 10
and 30 seconds so setup time is not really an issue... We're currently on
MySQL but will be migrating to Oracle in the near future. Could you
elaborate on why this approach might not be viable on Oracle?

First of all: my condolences. :-D

Creating a "database" on MySQL is essentially the same as creating a
directory.  Tables are files, so a collection of tables (a database) is
just a collection of files (i.e. a directory).  However, in other RDBMSes
(such as Sybase or Informix--I lack enough experience with Postgres to
comment there) a database is a more complex creature, and takes a bit more
effort to create.

The situation in Oracle is much worse.  What Oracle calls a "database" is
actually a server.  That is, on Sybase or Informix (also I believe DB2
works this way), you can have several different databases on a single
server.  Not so in Oracle.  You need a whole new server for a new database,
which means a new port, and new entry in oranames.tns, etc etc etc.  It's
quite a PITA.  I've never seen a dev create a database in Oracle--it's
_always_ been something that the DBAs do.  Maybe there's a way to do it,
particularly if you have Oracle's "personal" version, but I've just never
seen it done.

Other remarkably painful things to look forward to:  Say goodbye to
autoincrement columns, and hello to "sequences."  You know how you think
that NULL and the empty string are two different things?  HA!  No more temp
tables--Oracle has "global" (i.e. permanent) temp tables instead, which are
often useless for how you normally use temp tables.  Probably there are
more things, but those are the most egregious that spring to mind ATM.


            -- Buddy

Reply via email to