You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Rainer Döbele (JIRA)" <em...@incubator.apache.org> on 2015/05/12 11:08:00 UTC

[jira] [Commented] (EMPIREDB-217) Consistency check for data model defintion vs deployed data model

    [ https://issues.apache.org/jira/browse/EMPIREDB-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14539556#comment-14539556 ] 

Rainer Döbele commented on EMPIREDB-217:
----------------------------------------

Hi Jan,

first I want to apologize for not giving you some feedback earlier on your contribution.

Your contribution is really very useful and it fits perfectly in our architecture.
I have added it to our current trunk so it now available with our 2.4.4-SNAPSHOT release.

I have added your classes in the package
org.apache.empire.db.validation
from where it now available.
Only the Oracle specific extension class OracleDBModelChecker has been added to the package org.apache.empire.db.oracle.

The usage pattern is:

DBModelChecker checker = new DBModelChecker();
DBModelErrorHandler handler = new DBModelErrorLogger();
checker.checkModel(db, conn, "MY_SCHEMA", handler);

with the opportunity to override both the Checker and the Error Handler for individual purposes.

I have tested it with a few databases and it really does a great job.

The only things that I have found are:
1. A missing foreign key relation that contains more than one column gets reported once for each column it contains (i.e. a foreign-key over two columns gets reported twice). Once would be enough.
2. For decimal columns in views I get a type mismatch reported that the type DECIMAL does not match the database type of INTEGER. This is not a big issue, but maybe we should try to fix it at some point in time.

Again in the name of our project community I want to thank you very much for your great contribution Jan.
This feature will be a major benefit for our next release.

Rainer

> Consistency check for data model defintion vs deployed data model
> -----------------------------------------------------------------
>
>                 Key: EMPIREDB-217
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-217
>             Project: Empire-DB
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Rainer Döbele
>         Attachments: Empire-db Check v0.2.zip, Empire-db Check.zip
>
>
> Suggestion from Jan on the user mailing list:
> I want to validate the consistency of my DB schema against my empire-db schema on application startup.
>  
> It would be nice to be able to check:
>  
> - Tables (names, primary keys)
> - Columns (names, data types, size)
> - Existence foreign keys
> - Existence of indexes



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)