Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stellation-res] MySql Port

Jonathan:

Looks terrific. I haven't integrated into my workspace yet, because
it's in the middle of a boatload of incomplete changes. I've done
an eyeball check of your changes to AbstractDatabase, BasicDatabase,
and MySQLDatabase. It looks really good. I'm going to be spending
most of today building a swingset for my daughter, so I won't have
much hacking time today. But getting this integrated is moving up
to the top of my priority queue. This is a very impressive piece of
work!

	-Mark


On Sun, 2002-09-29 at 13:44, Jonathan Gossage wrote:
> I have finally got the coding and testing portion of the MySql port
> completed. I apologize for the time it took but I was also involved in the
> final phase of a product release cycle at work. Testing has only been done
> on Windows XP using MySql and Postgres as databases.
> 
> The central problem in providing support for MySql within Stellation is that
> MySql does not support the implicit generation of indexes when handling
> foreign key constraints, unlike other databases. Such indexes may be needed
> in both the source (child) and referenced (parent) tables. Thus we are faced
> with the problem of dealing with cross-table relationships when generating
> the database schema.
> 
> We are also faced with the problem of adding tables to the database after
> the initial tables have been generated. Currently, this problem arises when
> adding the tables for the various artifacts. We need to be able to handle
> the possible need for additional indexes to be created in existing tables.
> 
> I took the following approach in building a solution for this problem.
> 
> 1. I decoupled the generation of the abstract tables describing the
> Stellation database from the process of actually creating the tables in the
> database. The set of tables is now accumulated in a collection stored in
> BasicDatabase. This has the additional long-term advantage of making a
> programmatically accessible version of the schema available to any component
> that may need it.
> 
> 2. I created additional nested classes within the Table class to allow the
> recording of cross table relationships. This bookeeping is needed to support
> the correct generation of indexes in tables that are created before other
> tables that reference them.
> 
> 3. I extended the BasicDatabase.createTable method to recognize when it may
> be necessary to generate the additional indexes required by MySql and to do
> so at the appropriate time.
> 
> 4. I extended the BasicDatabase.createTable method to recognize when
> additional indexes might be required for already existing tables and to
> generate the additional indexes for those tables.
> 
> In addition a few smaller problems also had to be dealt with.
> 1. MySql treats BLOBS as case sensitive character data. If you want to store
> binary data in a BLOB you must escape certain characters. This has been
> implemented.
> 
> 2. MySql specific data format requirements have been addressed.
> 
> I looked at one related area at the same time. All the databases except
> Postgres have JDBC drivers that support/require TCP/IP connections.
> Accordingly, I defined an extended format for the location option that is
> supported by all database types. The general form of the location option is
> now
> 
> database type:[database name]:[hostname]:[port]:[database user]:[database
> user password]
> 
> The following defaults are provided:
> database name          - Stellation
> hostname               - localhost
> port                   - database specific
> database user          - stellation
> database user password - ignored
> 
> Trailing fields can be omitted. You can also omit the content of a
> positional field by coding consecutive ::.
> 
> I have not yet addressed the documentation requirements since I believe that
> significant restructuring is needed to accomodate both database specific and
> platform specific sections.
> 
> Modified files are attached. I hope thay are all there as I do not know how
> to easily determine which files I have modified.
> 
> Regards
> 
> Jonathan Gossage
> 
> Personal Email
> jgossage@xxxxxxxx
> 
> Business Email
jonathan@xxxxxxxxxxxxxx
-- 
Mark Craig Chu-Carroll,  IBM T.J. Watson Research Center  
*** The Stellation project: Advanced SCM for Collaboration
***		http://www.eclipse.org/stellation
*** Work Email: mcc@xxxxxxxxxxxxxx  ------- Personal Email: markcc@xxxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part


Back to the top