Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [stellation-res] A database question

> >-----Original Message-----
> >From: stellation-res-admin@xxxxxxxxxxxxxxx
> >[mailto:stellation-res-admin@xxxxxxxxxxxxxxx]On Behalf Of Rodolfo M.Raya
> >Sent: November 27, 2002 6:52 AM
> >To: stellation-res@xxxxxxxxxxxxxxx
> >Subject: Re: [stellation-res] A database question
> >
> >
> >On Tue, 2002-11-26 at 16:11, Mark C. Chu-Carroll wrote:
> >> I've been working on a unit test suite, initially for testing ACLs, but
> >> with the intention of using it to create a fixture that will also be
> >> easy to expand into a general client-independent repository test suite.
> >>
> >> One thing that I've come up against is the need to be able to create
> >> and destroy databases. Since unit tests need to be independent, and I
> >> expect the suite to wind up with dozens of tests, it's not reasonable
> >> to expect the user to set the databases up in advance, and it's not
> >> really reasonable to leave all of those databases lingering after the
> >> tests have run.
> >>
> >> My question is: for the databases that you know about, can you create
> >> and destroy databases using JDBC?
> >>
> >> In postgres, as long as you are connected to a database, you
> >can execute
> >> "create database" and "drop database" commands. So starting with an
> >> initial seed database owned by Stellation, it's easy to create and drop
> >> databases entirely through JDBC.
> >>
> >> In DB2, we create one database, and then create tablespaces for
> >> repositories. According to the DB2 docs, creating tablespaces can be
> >> done from JDBC.
> >>
> >> The Firebird docs are ambiguous. They discuss the "create database"
> >> command in the SQL language guide, and say that it's usable from a
> >> variety of places, but that document never discusses JDBC. I suspect
> >> that it will work much like postgres, but since I don't
> >> have Firebird properly configured an my machine (yet), I haven't been
> >> able to test it.
> >
> >I think that you can create Firebird databases using JDBC, but I will
> >have to check. It may depend on the JDBC driver that you use
> >(InterClient or JayBird).
> >
> >InterClient is a type 3 JDBC driver. This means that you have to install
> >InterServer to handle all comunications with the RDBMS. Also,
> >InterClient is not open source anymore.
> >
> >JayBird is a type 4 driver. You only need a few jars somewhere in your
> >classpath. This driver is still evolving and lacks several features.
> >However, it's usable and stable but I don't know if it supports database
> >creation.

I have just finished installing Firebird with JayBird on Windows XP so I
should be able to try this out in the next day or so.


> >
> >> I don't know about MySQL, or Oracle. If you can give a
> >definitive answer
> >> about Firebird, MySQL, or Oracle, please let me know.
> >>
> >> If the answer to this is yes for all of the databases that interest us,
> >> then I'm going to add methods to the AbstractDatabase class
> >for database
> >> creation and deletion. This makes the tests easier to write, and it
> >> means that once a database is installed and the stellation user is
> >> configured, you can just create repositories without having to know
> >> the particular incantation for database creation in your database.
> >>
> >> Thanks,
> >>
> >> 	-Mark
> >
> >Regards,
> >Rodolfo
>

Regards

Jonathan

Personal Email
jgossage@xxxxxxxx

Business Email
jonathan@xxxxxxxxxxxxxx




Back to the top